mautrix / meta

A Matrix-Facebook Messenger and Instagram DM puppeting bridge.
GNU Affero General Public License v3.0
155 stars 11 forks source link

Fix referer header for upload requests #54

Closed javiercr closed 4 months ago

javiercr commented 4 months ago

Upload requests should pass /direct/t/[threadID] (IG) and /t/[threadID] (FB) as the referer header rather than /direct/inbox (IG) and /messages (FB) to mimic IG/FB web behavior.

This change could potentially help alleviate the "refresh error; please retry in a few minutes" when uploading files, in case there is any request flagging on the IG/FB side based on uncommon headers.

Tested by running the bridge locally and sending some attachments.