Skip to content

handlematrix: support editing instagram room avatar#219

Open
rnons wants to merge 3 commits intomainfrom
rnons/plat-35083
Open

handlematrix: support editing instagram room avatar#219
rnons wants to merge 3 commits intomainfrom
rnons/plat-35083

Conversation

@rnons
Copy link
Contributor

@rnons rnons commented Feb 15, 2026

No description provided.

@rnons rnons requested a review from tulir February 15, 2026 06:31
@rnons rnons changed the title handlematrix: support editing room avatar handlematrix: support editing instagram room avatar Feb 15, 2026

type GraphQLDoc struct {
DocId string
ClientDocId string
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
ClientDocId string
ClientDocID string

For consistency, plus elsewhere

h.Set("image_type", "FILE_ATTACHMENT")
h.Set("x-entity-name", entityID)
h.Set("x-entity-length", strconv.Itoa(len(avatar)))
h.Set("x-entity-type", "image/jpeg")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems wrong? Although not entirely sure how we pass this from bridge side (@tulir?)

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

http.DetectContentType can be used to detect input format from bytes, if IG only allows jpeg then need to convert it with the image package first (image.Decode + jpeg.Encode)

h.Set("ig-intended-user-id", strconv.FormatInt(ig.client.cookies.GetUserID(), 10))
h.Set("ig-u-ds-user-id", strconv.FormatInt(ig.client.cookies.GetUserID(), 10))
h.Set("x-mid", ig.client.cookies.Get(cookies.IGCookieMachineID))
h.Set("x-ig-app-id", ig.client.configs.BrowserConfigTable.CurrentUserInitialData.AppID)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we be using an Android app ID here?

@rnons rnons force-pushed the rnons/plat-35083 branch from 7b16037 to 9609d31 Compare March 25, 2026 00:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

3 participants