Giter VIP home page Giter VIP logo

meta's Introduction

meta's People

Contributors

tulir avatar javiercr avatar fizzadar avatar 0xzer avatar

Stargazers

Loïc Kalbermatter avatar  avatar Rehan avatar  avatar M avatar Bradley Newman avatar Sufyan Dahalan avatar Trygve Aaberge avatar Alex Hall avatar David Akopov avatar ilyshirai avatar  avatar  avatar Attila Szabó avatar Michael Setzer avatar Dhruv Anand avatar Pontus Jensen Karlsson avatar Shun Sakai avatar Aman Verasia avatar  avatar Amelie Ostertag avatar AgentofPhoenix avatar Draggie avatar  avatar yump avatar Paul Chanvin avatar Maor Kadosh avatar GreenYoshi (Wang Han) avatar Mon avatar Louis Chauvet-Villaret avatar  avatar Nguyễn Hoài Thương avatar  avatar László Várady avatar  avatar Vive avatar Connor Forsyth avatar Mr. Čajíček avatar  avatar Pavlos Vinieratos avatar Rayen Ouni avatar Alireza Gharib avatar DoctorsPeppers avatar Bence Ferdinandy avatar LEBOEUF Eliott avatar Nuno Facha avatar tbjep avatar Arshad Hosein avatar Kyriakos Nikoletti avatar  avatar Tomas Pohanka avatar Alexios Mavronas avatar :Domai 🌳 avatar Jared Klingenberger avatar Per Modin avatar Miguel Leiva-Gomez avatar jose_d avatar  avatar hafx avatar Ryan Gibb avatar Asger Geel Weirsøe avatar  avatar Florian Richer avatar  avatar  avatar Jan Pechek avatar Miłosz avatar Michael Hoang avatar Joe Carstairs avatar Hwajin Lee avatar Will Lewis avatar  avatar Ruby Marx avatar Alex Babel avatar Lasta Apps avatar  avatar GilDev avatar Maciej Lebiest avatar  avatar Arran Ubels avatar miruchigawa avatar Piotr K avatar Sebastian Schubotz avatar Ngo Phuong avatar Yuri Levin avatar Techno TTV avatar Krzysztof Matuszak avatar Nikolas Spiridakis avatar  avatar Blake avatar Marco Diversi avatar  avatar Philipp B. avatar Arthur Brugière avatar Madeline avatar nicolas avatar Nicolas Derumigny avatar  avatar Samy Djemaï avatar Devenda avatar

Watchers

 avatar Sumner Evans avatar  avatar  avatar

meta's Issues

Facebook community group chat

When I first set the Bridge up it pulls all the messages from the community group chat then it never updates again it will allow me to message from it but, not receive any messages

Messenger, can't upload video timeout awaiting response headers

After uploading a video, size was 64Mb, 2min long~, basic screen recording stuff

I can't send any video, original or compressed (using element android or web)

Here's the error, logs doesn't gives more info

<@ storm1er:server.redacted> 1000008195.mp4

⚠ Your message may not have been bridged: failed to upload media: failed to send MercuryUploadRequest: maximum retries reached: failed to send request: Post "https://www.messenger.com/ajax/mercury/upload.php..........": http2: timeout awaiting response headers

I'm on latest docker image available (682c4d75b0fdfe102af4b6d88bb5c76453adc86d-arm64)

Multi-account support

I know this was already dismissed as not planned/low priority, but I'd still love for this to be runable as a single bridge either creating two admin rooms, or One room with commands like login-fb and login-ig.

There was also some talk that encryption might be powered by whatsmeow and WhatsApp might be a part of this bridge's code. I doubt that's in any short term plans, though.

When user tweaks permissions, make sure to warn the user about possible consenquences.

Hello!
I manage a Meta bridge for Messenger. I recently expermineted so some users could hook into the chat for read-only. When tweaking the Send messages permission, turns out (as it should) this affected the puppeting bridges. In the future (if this is even detecteable) the bridge should send a warning about possible messeages not arriving properly.

Regards.

Meta Bridge Facebook Messenger Integration Issue with End-to-End Encryption

I set up the Meta Bridge for Facebook Messenger using double puppeting, running both the bridge and my Synapse Matrix home server in Docker containers. However, I'm facing an issue when trying to send messages to users who turned on the new end-to-end encryption in Messenger. On the flip side, I can still chat with users who haven't enabled this encryption feature. Since I couldn't find anything about this in the documentation, I'm reporting it as a bug.

Please find the relevant logs below:

2024-01-29T11:37:50Z DBG decode.go:129:Decode() > Facebook server log: Write error response from server global_log=true

2024-01-29T11:37:50Z WRN decode.go:210:handleStoredProcedure() > Failed to set int64 field_index=2 field_name=TaskValue global_log=true struct_name=LSIssueNewTask val="{\"force_upsert\":false,\"use_open_messenger_transport\":false,\"metadata_only\":false,\"preview_only\":false,\"thread_fbid\":6...8,\"sync_group\":95}" val_type=string

2024-01-29T11:37:50Z TRC Meta send response action="handle matrix event" event_id=$K9wbrRtuloOAI39TPCThcy2jAJbVf7bbmGuE6wTzFkY event_type=m.room.message response={"LSIssueNewTask":[{"Context":209,"QueueName":"invalid_send_task_queue","Unrecognized":{"10":0,"2":"{\"force_upsert\":false,\"use_open_messenger_transport\":false,\"metadata_only\":false,\"preview_only\":false,\"thread_fbid\":6...8,\"sync_group\":95}"}}],"LSMailboxTaskCompletionApiOnTaskCompletion":[{"TaskId":73}],"LSMarkOptimisticMessageFailed":[{"Message":"Couldn't send.","OTID":"7157698346855956522"}],"LSRemoveTask":[{"TaskId":74}],"LSTaskExists":[{"TaskId":73},{"TaskId":73},{"TaskId":73},{"TaskId":73},{"TaskId":73},{"TaskId":73},{"TaskId":73},{"TaskId":74},{"TaskId":74}],"LSUpdateMessagesOptimisticContext":[{"Unrecognized":{"0":73}}],"LSUpdateSubscriptErrorMessage":[{"Message":"Couldn't send.","OTID":"7157698346855956522","ThreadKey":100009247374828}],"LSUpdateThreadSnippet":[{"IsAdminSnippet":true,"Snippet":"Message failed to send","ThreadKey":100009247374828,"Unrecognized":{"7":false}}],"LSWriteCTAIdToThreadsTable":[{"ThreadKey":100009247374828}]} thread_id=100009247374828 thread_receiver=1...1

2024-01-29T11:37:50Z WRN Sending message failed action="handle matrix event" event_id=$K9wbrRtuloOAI39TPCThcy2jAJbVf7bbmGuE6wTzFkY event_type=m.room.message thread_id=100009247374828 thread_receiver=1...1

2024-01-29T11:37:50Z ERR Sending message metrics for event error="server rejected message: Couldn't send." event_id=$K9wbrRtuloOAI39TPCThcy2jAJbVf7bbmGuE6wTzFkY event_type=m.room.message handling_step="Error sending" sender=@username:matrix.server.name thread_id=100009247374828 thread_receiver=1...1

2024-01-29T11:37:50Z DBG Sent message checkpoint message_checkpoint={"event_id":"$K9wbrRtuloOAI39TPCThcy2jAJbVf7bbmGuE6wTzFkY","event_type":"m.room.message","info":"server rejected message: Couldn't send.","message_type":"m.text","reported_by":"BRIDGE","retry_num":0,"room_id":"!vUTGHXtXdWONcrTDFL:matrix.server.name","status":"UNSUPPORTED","step":"REMOTE","timestamp":1706528270047}

2024-01-29T11:37:50Z DBG Request completed duration=65.162364 event_id=$K9wbrRtuloOAI39TPCThcy2jAJbVf7bbmGuE6wTzFkY event_type=m.room.message handling_step="Error sending" method=PUT req_body={"typing":false} req_id=2785 response_length=2 response_mime=application/json sender=@username:matrix.server.name status_code=200 thread_id=100009247374828 thread_receiver=1...1 url=http://matrixserver:8008/_matrix/client/v3/rooms/%21vUTGHXtXdWONcrTDFL:matrix.server.name/typing/@facebook_1...8:matrix.server.name?user_id=%40facebook_1...8%3Amatrix.server.name

2024-01-29T11:37:50Z DBG Request completed action="handle meta read receipt" duration=63.017916 method=POST read_at_ms=1706528270047 read_up_to_ms=1706528269495 req_body={"com.beeper.fully_read.extra":{"fi.mau.double_puppet_source":"mautrix-meta"},"com.beeper.read.extra":{"fi.mau.double_puppet_source":"mautrix-meta"},"m.fully_read":"$1EAN-dN4q2dzjPRK4Sg8OZU8slI_4EutEADpG9vp3bk","m.read":"$1EAN-dN4q2dzjPRK4Sg8OZU8slI_4EutEADpG9vp3bk"} req_id=2786 response_length=2 response_mime=application/json sender_id=1...1 status_code=200 thread_id=100009247374828 thread_receiver=1...1 url=http://matrixserver:8008/_matrix/client/v3/rooms/%21vUTGHXtXdWONcrTDFL:matrix.server.name/read_markers?user_id=%40username%3Amatrix.server.name

2024-01-29T11:37:50Z DBG Sent read receipt to Matrix action="handle meta read receipt" event_id=$1EAN-dN4q2dzjPRK4Sg8OZU8slI_4EutEADpG9vp3bk read_at_ms=1706528270047 read_up_to_ms=1706528269495 sender_id=1...1 thread_id=100009247374828 thread_receiver=1...1

2024-01-29T11:37:50Z DBG Starting handling of transaction content={"pdu":0,"unstable_edu":3,"unstable_to_device":0} transaction_id=1701

2024-01-29T11:37:50Z DBG Finished dispatching events from transaction transaction_id=1701

2024-01-29T11:37:50Z DBG Request completed duration=185.698493 event_id=$K9wbrRtuloOAI39TPCThcy2jAJbVf7bbmGuE6wTzFkY event_type=m.room.message handling_step="Error sending" method=PUT req_body={"body":"\u003e \u003c@username:matrix.server.name\u003e Test 123 Test\n\n⚠ Your message was not bridged: server rejected message: Couldn't send.","format":"org.matrix.custom.html","formatted_body":"\u003cmx-reply\u003e\u003cblockquote\u003e\u003ca href=\"https://matrix.to/#/!vUTGHXtXdWONcrTDFL:matrix.server.name/$K9wbrRtuloOAI39TPCThcy2jAJbVf7bbmGuE6wTzFkY\"\u003eIn reply to\u003c/a\u003e \u003ca href=\"https://matrix.to/#/@username:matrix.server.name\"\u003e@username:matrix.server.name\u003c/a\u003e\u003cbr\u003eTest 123 Test\u003c/blockquote\u003e\u003c/mx-reply\u003e⚠ Your message was not bridged: server rejected message: Couldn\u0026#39;t send.","m.relates_to":{"m.in_reply_to":{"event_id":"$K9wbrRtuloOAI39TPCThcy2jAJbVf7bbmGuE6wTzFkY"}},"msgtype":"m.notice"} req_id=2787 response_length=59 response_mime=application/json sender=@username:matrix.server.name status_code=200 thread_id=100009247374828 thread_receiver=1...1 url=http://matrixserver:8008/_matrix/client/v3/rooms/%21vUTGHXtXdWONcrTDFL:matrix.server.name/send/m.room.message/mautrix-go_1706528270115250745_18?user_id=%40facebook_1...8%3Amatrix.server.name

2024-01-29T11:37:50Z DBG Timings for event event_id=$K9wbrRtuloOAI39TPCThcy2jAJbVf7bbmGuE6wTzFkY event_type=m.room.message handling_step="Error sending" sender=@username:matrix.server.name thread_id=100009247374828 thread_receiver=1...1 timings={"bridge":{"decrypt":"0s","init_receive":"197.8ms","queue":"0s","total_hs_to_portal":"198.8ms"},"portal":{"convert":"9.222µs","implicit_rr":"93ns","preproc":"182.443µs","total_send":"0s"}}

2024-01-29T11:37:50Z DBG Starting handling of transaction content={"pdu":1,"unstable_edu":0,"unstable_to_device":0} transaction_id=1703

2024-01-29T11:37:50Z DBG Finished dispatching events from transaction transaction_id=1703

2024-01-29T11:37:50Z DBG Sent message checkpoint message_checkpoint={"event_id":"$MnfCtuY2-ZblUfaiywgMxRUliYMlkjYIPLSnMUkDe_4","event_type":"m.room.message","message_type":"m.notice","reported_by":"BRIDGE","retry_num":0,"room_id":"!vUTGHXtXdWONcrTDFL:matrix.server.name","status":"SUCCESS","step":"BRIDGE","timestamp":1706528270347}

2024-01-29T11:37:51Z DBG Starting handling of transaction content={"pdu":0,"unstable_edu":1,"unstable_to_device":0} transaction_id=1704

2024-01-29T11:37:51Z DBG Finished dispatching events from transaction transaction_id=1704

2024-01-29T11:37:51Z DBG Creating task component=messagix label=21 payload={"last_read_watermark_ts":1706528271296,"sync_group":1,"thread_id":100009247374828} queueName=100009247374828 taskId=75 user_id=@username:matrix.server.name

2024-01-29T11:37:51Z DBG Updating sync groups LSExecuteFirstBlockForSyncTransaction=[{"CurrentCursor":"HCwAABbUmK4BFrKk7asGEwUWiuiVvuu8LQA","DatabaseId":1,"EpochId":7157693973903966250,"NextCursor":"HCwAABbWmK4BFrKk7asGEwUWiuiVvuu8LQA","SyncChannel":1,"SyncStatus":2}] LSUpsertSyncGroupThreadsRange=null component=messagix user_id=@username:matrix.server.name

2024-01-29T11:37:51Z INF Updated database by transaction... component=messagix database_id=1 new_cursor=HCwAABbWmK4BFrKk7asGEwUWiuiVvuu8LQA sendSyncParams=false syncChannel=1 user_id=@username:matrix.server.name

2024-01-29T11:37:51Z TRC Got new event table={"LSExecuteFinallyBlockForSyncTransaction":[{"EpochId":7157693973903966250,"SyncDatabaseId":1}],"LSExecuteFirstBlockForSyncTransaction":[{"CurrentCursor":"HCwAABbUmK4BFrKk7asGEwUWiuiVvuu8LQA","DatabaseId":1,"EpochId":7157693973903966250,"NextCursor":"HCwAABbWmK4BFrKk7asGEwUWiuiVvuu8LQA","SyncChannel":1,"SyncStatus":2}],"LSMarkThreadRead":[{"LastReadWatermarkTimestampMs":1706528271296,"ThreadKey":100009247374828}],"LSUpdateParentFolderReadWatermark":[{"ThreadKey":100009247374828,"Unrecognized":{"1":{"all_read":"","unread_plural":" nieuwe chatberichten","unread_singular":" nieuw chatbericht"}}}],"LSUpsertSequenceId":[{"LastAppliedMailboxSequenceId":1426987}],"LSWriteCTAIdToThreadsTable":[{"ThreadKey":100009247374828}]} user_id=@username:matrix.server.name

2024-01-29T11:37:51Z DBG Request completed action="handle meta read receipt" duration=25.939217 method=POST read_at_ms=1706528271797 read_up_to_ms=1706528271296 req_body={"com.beeper.fully_read.extra":{"fi.mau.double_puppet_source":"mautrix-meta"},"com.beeper.read.extra":{"fi.mau.double_puppet_source":"mautrix-meta"},"m.fully_read":"$1EAN-dN4q2dzjPRK4Sg8OZU8slI_4EutEADpG9vp3bk","m.read":"$1EAN-dN4q2dzjPRK4Sg8OZU8slI_4EutEADpG9vp3bk"} req_id=2788 response_length=2 response_mime=application/json sender_id=1...1 status_code=200 thread_id=100009247374828 thread_receiver=1...1 url=http://matrixserver:8008/_matrix/client/v3/rooms/%21vUTGHXtXdWONcrTDFL:matrix.server.name/read_markers?user_id=%40username%3Amatrix.server.name

2024-01-29T11:37:51Z DBG Sent read receipt to Matrix action="handle meta read receipt" event_id=$1EAN-dN4q2dzjPRK4Sg8OZU8slI_4EutEADpG9vp3bk read_at_ms=1706528271797 read_up_to_ms=1706528271296 sender_id=1...1 thread_id=100009247374828 thread_receiver=1...1

2024-01-29T11:37:52Z TRC Read receipt send response action="handle matrix receipt" event_id=$MnfCtuY2-ZblUfaiywgMxRUliYMlkjYIPLSnMUkDe_4 response={"LSRemoveTask":[{"TaskId":75}],"LSTaskExists":[{"TaskId":75},{"TaskId":75}],"LSWriteCTAIdToThreadsTable":[{"ThreadKey":100009247374828}]} thread_id=100009247374828 thread_receiver=1...1

2024-01-29T11:37:52Z DBG Read receipt sent action="handle matrix receipt" event_id=$MnfCtuY2-ZblUfaiywgMxRUliYMlkjYIPLSnMUkDe_4 read_watermark=2024-01-29T11:37:51.296Z thread_id=100009247374828 thread_receiver=1...1

2024-01-29T11:37:56Z TRC Got ping response component=messagix user_id=@username:matrix.server.name

Thank you for your attention to this matter. I am happy to provide any further information or clarification needed to resolve this issue.
I appreciate the efforts put into developing and maintaining this integration.

It seems that the function of replying to messages to the messenger is missing

Hi @tulir good day , I checked the code and found that portal.matrixMessages seems not in use which means the bridge has not yet implemented sending messages to the messenger or meta, has it? thanks for your watching.

func (portal *Portal) ReceiveMatrixEvent(user bridge.User, evt *event.Event) {
	if user.GetPermissionLevel() >= bridgeconfig.PermissionLevelUser || portal.HasRelaybot() {
		portal.matrixMessages <- portalMatrixMessage{user: user.(*User), evt: evt}
	}
}

Migration from old Python bridge

Hello,

I am currently using the old Python bridge for FB Messenger bridging (https://github.com/mautrix/facebook) and am considering switching to this bridge in order to gain support for Messenger E2E Encrypted messages. Wondering if it is possible to migrate chat history from the old bridge, or if I'll end up with orphaned rooms from the old bridge and new rooms for this one?

No `sb` cookie from messenger.com

I just migrated from an old mautrix-facebook to mautrix-meta

Trying to login to FB messenger, I noticed I don't have a cookie sb set in Firefox. I could still login by just smuggling a sb=1; into my curl string, but that's probably too much for most users. which purpose does it anyway fulfill?

Failure to upload image to FB Messenger

Sending photos in FB Messenger has been failing with the following message:

 Your message may not have been bridged: failed to upload attachment: fbid not received

From the logs:

Apr 24 12:21:52 atlas matrix-reloaded_bridge-meta_1[27134]: 2024-04-24T04:21:52Z WRN No fbid received for upload action="handle matrix event" event_id=$hDhOJWcRPLTyRVvG3g1B8EHmkwz1hCwCcCDXCDR900M event_type=m.room.message response={"__ar":1,"dtsgToken":"NAcO8pp2z3GiMf01LrAajm0_9YmtXRymOZ_Nyjh9_xbwrMxXSXQr2AA:11:1710329737","lid":"7361284086991797096","payload":{"metadata":{"0":{"fbid":412640354853594,"filename":"1000025656.jpg","filetype":"image/jpeg","image_id":412640354853594,"src":"https://scontent.fper11-1.fna.fbcdn.net/v/t1.15752-9/435128500_1747742349052957_311666362089642159_n.jpg?_nc_cat=102\u0026ccb=1-7\u0026_nc_sid=5f2048\u0026_nc_ohc=XuGknekTfcUAb6XOWSb\u0026_nc_ht=scontent.fper11-1.fna\u0026oh=03_Q7cD1QEGkPiWlXhmq-P_0FQB-FkctUCcM5DNA6cLoCGaTWrROQ\u0026oe=664FFE54"}},"uploadID":null}} room_id=!HXapaLKNFEXfapGIYO:nop.chat thread_id=2404118289665795
Apr 24 12:21:52 atlas matrix-reloaded_bridge-meta_1[27134]: 2024-04-24T04:21:52Z ERR Failed to convert message error="failed to upload attachment: fbid not received" action="handle matrix event" event_id=$hDhOJWcRPLTyRVvG3g1B8EHmkwz1hCwCcCDXCDR900M event_type=m.room.message room_id=!HXapaLKNFEXfapGIYO:nop.chat thread_id=2404118289665795
Apr 24 12:21:52 atlas matrix-reloaded_bridge-meta_1[27134]: 2024-04-24T04:21:52Z ERR Sending message metrics for event error="failed to upload attachment: fbid not received" event_id=$hDhOJWcRPLTyRVvG3g1B8EHmkwz1hCwCcCDXCDR900M event_type=m.room.message handling_step="Error converting" room_id=!HXapaLKNFEXfapGIYO:nop.chat sender=@coolbug:nop.chat thread_id=2404118289665795

Looks like the upload to the servers works ok, but over at https://github.com/mautrix/meta/blob/9ab9bb08a402653f3880a72aff14311e65bb4699/msgconv/from-matrix.go#L78C2-L78C54 the FB ID isn't pulled out of the JSON response. In this case it seems like it should have been able to get 412640354853594 assuming that's the right ID

Messenger not working with Facebook's new encryption stuff.

I just switched to this bridge from mautrix-facebook the other day because messages were failing to send with a "Please update your app" response from Facebook, and things worked mostly fine for a couple of days.

Now Facebook forced my hand with enabling their chat history encryption stuff, and now all chats that have the encryption stuff enabled have stopped working with the bridge.
Trying to send a message results in a reply saying "⚠ Your message may not have been bridged: server rejected message: Couldn't send.", and messages sent to me simply don't appear in the bridge.

I knew enabling the encryption was likely to cause problems, but Facebook wouldn't let me look at messages in the web UI or mobile app without enabling it.
Since some messages were coming through the bridge a little bit wrong (shared reels/posts just showed a screenshot and no link) I had to check them in Facebook to get the whole message. :(

Unable to send media over Messenger

I'm unable to send any media over Messenger, using any client (Element Web, Element X, SchildiChat, FluffyChat), with the message
⚠ Your message may not have been bridged: failed to upload media: failed to parse mercury response: got invalid metadata type, cannot proceed with type assertion: <nil>

The source for one of the images I tried to send

{
  "type": "m.room.message",
  "sender": "@vrkknn:vrkknn.net",
  "content": {
    "body": "1058358960625059369.png",
    "info": {
      "h": 534,
      "mimetype": "image/png",
      "size": 9737,
      "thumbnail_info": {
        "h": 534,
        "mimetype": "image/jpeg",
        "size": 25937,
        "w": 534
      },
      "thumbnail_url": "mxc://vrkknn.net/uJnXGjXSgBuWSZiftBDUvniM",
      "w": 534,
      "xyz.amorgan.blurhash": "KDL.Y2I=0E=OWV^h05od~2"
    },
    "msgtype": "m.image",
    "url": "mxc://vrkknn.net/EoPJwGUCxOEmQKVcExtUeMyP"
  },
  "origin_server_ts": 1708680797774,
  "unsigned": {
    "age": 54
  },
  "event_id": "$37TrB5QvKymCLx42NUAl8g9AFtNxcYCfwWBi9jVnZWs",
  "room_id": "!exwpRQianGBrZdaKqY:vrkknn.net"
}

I was able to send media messages up until yesterday (22/02) without any issues. I haven't pulled any changes/updated the bridge since then.

Messenger voice messages (Element X)

I used old messenger bridge, and now was forced to move to this one, because of encryption.

The behavior of messenger bridge was, that the received voice messages showed like playable message, same as when sending voice message, or in messenger app or IG app etc...

But the meta bridge receives file voice.mp3 and I am not able to play it back in the app.

Handle messenger-mode forced selection of deactivated or full-fb account usage through bridge

Relates to this "bug" report: #28

At the least in "messenger" mode this is now mandatory to select, and currently only possible way is through by installing official Messenger app and make the selection, user is literally just thrown out from bridge before this is selection is made.
Could it be possible to have selection to be made by user on bridge side when logging in and decision is needed to be made?

Broken Messenger search functionality

I've seen some mentions of it in the dev chat, but it seems like no one reported it here - the search functionality is broken.
Any kind of lookup on a Messenger bridge ends up with "No results" message.
Possible that it's also broken for other platform integrations.

Relevant log lines:

2024-03-20T00:17:15+01:00 DBG Received command event_id=xxxx mx_command=search room_id=xxx sender=xxx
2024-03-20T00:17:16+01:00 DBG Request completed duration=581.078532 event_id=xxx method=PUT mx_command=search req_body={"body":"No results","msgtype":"m.notice"} req_id=59 response_length=59 response_mime=application/json room_id=xxx sender=xxx status_code=200 url=xxx

Failing to bridge to facebook messenger "Missing some cookies"

Following the steps here: https://docs.mau.fi/bridges/go/meta/authentication.html I cannot get this to work.

Pasting JSON of cookies (from Cookie-Editor firefox extension) results in the bridge bot saying Failed to parse input as JSON: json: cannot unmarshal array into Go value of type cookies.InstagramCookies.

Copying the websocket request as cURL makes the bot say: Missing some cookies even though I can clearly see they are all there in the request. The instructions for copying this network info from chrome just tells you to copy, but there is no way to just copy. The copy as cURL in chrome doesn't include cookies.

I don't expect this issue to be specific to only me and my setup.

Feature request: The ability to prevent certain portals from being created

Hey, first I wanted to say thank you for all the work you've done turning matrix into a multi-protocol system :)

The main reason for requesting this feature is that there are about 36 portals getting opened when mautrix-meta is started. I'm aware of your position here #36 - but a good chunk of the portals that are getting opened are for people I've never talked to and who aren't in my friends list. Some of those people had sent a friend request at one point (probably bots), but others I've never heard of, including a user named "Unknown user". If I block the associated matrix account and close the chat, it re-opens the next time mautrix-meta is started.

I'm not necessarily looking for a way to avoid having portals getting opened in the first place (though only opening when a message is sent seems like it would fix this issue), but is there a way to at least tell mautrix-meta that I want to close a particular portal and not have it re-open?

Thanks!

failed to get group session: group session has been withheld: com.beeper.redacted (Session redacted: expired)

When trying to send messages the bot was responding with:

⚠ Your message was not bridged: failed to get group session: group session has been withheld: com.beeper.redacted (Session redacted: expired).

I tried a few times with the same problem. After restarting the bridge everything seemed back to normal.

Logs

There weren't really any logs. Just the one error that was also presented in the response from the bot. I've included a few previous log messages but they are quite a bit before I sent the message that failed to get bridged.

{"level":"error","user_id":"REDACTED","component":"messagix","error":"error in read loop: failed to read message: websocket: close 1006 (abnormal closure): unexpected EOF","reconnect_in":2000,"time":"2024-04-14T19:59:09.843817066Z","message":"Error in connection, reconnecting"}
{"level":"warn","user_id":"REDACTED","component":"messagix","database_id":1,"payload":"{\"database\":1,\"last_applied_cursor\":\"REDACTED\",\"sync_params\":null,\"epoch_id\":REDACTED,\"version\":REDACTED,\"failure_count\":null}","response":{"request_id":30,"payload":"{\"name\":null,\"step\":[1,[1],[1,[5,\"updateLastSyncCompletedTimestampMsToNow\",[19,\"1\"]]],[1]]}","sp":["updateLastSyncCompletedTimestampMsToNow"],"target":3},"table":{"LSUpdateLastSyncCompletedTimestampMsToNow":[{"Unknown0":1}]},"time":"2024-04-14T19:59:23.177764966Z","message":"No transactions found"}
{"level":"error","user_id":"REDACTED","component":"messagix","error":"failed to make lightspeed socket request with DatabaseQuery byte payload (databaseId=2): publish response timeout","database_id":2,"time":"2024-04-14T19:59:52.927456714Z","message":"Failed to sync database through socket"}
{"level":"warn","event_id":"REDACTED","session_id":"REDACTED","error":"failed to get group session: group session has been withheld: com.beeper.redacted (Session redacted: expired)","time":"2024-04-14T21:16:31.439353574Z","message":"Failed to decrypt event"}

Version: 61f9c39

bug(instagram): replies from IG don't show on mobile

The incoming replies (from IG) don't display properly on mobile (Element Desktop vs Element Mobile).

While this misinterpretation might be related to a bug on Element Mobile, this does not happen with the other Mautrix bridges (namely Signal and Telegram).
As you can see with the following snippets, the raw contents of an incoming message differ quite a lot beteen the Telegram bridge and the IG bridge, I believe this could be the cause of the issue.

Source of an incoming message (mautrix-meta Instagram)
{
  "room_id": "![...]:[...]",
  "type": "m.room.message",
  "content": {
    "body": "reply from IG",
    "m.mentions": {
      "user_ids": [
        "@phorcys:[...]"
      ]
    },
    "m.relates_to": {
      "m.in_reply_to": {
        "event_id": "[...]"
      }
    },
    "msgtype": "m.text"
  }
}
Source of an incoming message (mautrix-telegram)
{
  "room_id": "![...]:[...]",
  "type": "m.room.message",
  "content": {
    "msgtype": "m.text",
    "body": "> <User (TG)> original message\n\nreply",
    "m.relates_to": {
      "m.in_reply_to": {
        "event_id": "[...]"
      }
    },
    "format": "org.matrix.custom.html",
    "formatted_body": "<mx-reply><blockquote><a href='https://matrix.to/#/![...]:[...]/[...]'>In reply to</a> <a href='https://matrix.to/#/@telegram_[...]:[...]'>User (TG)</a><br/>original message</blockquote></mx-reply>reply",
    "fi.mau.telegram.source": {
      "space": [...],
      "chat_id": [...],
      "peer_type": "user",
      "id": [...]
    }
  }
}

Alternative to WebUI login

I'd love to see an improvement/alternative in the current authentication.

One mentioned way was using some kind of electron app using Facebook's API.

How to reload websocket connection when it's down?

Sometimes something goes wrong in the meta messenger bridge resulting in messages like the one below appearing in the "Messenger bridge bot" room:
Error in WhatsApp connection: CAT refresh failed

Afterwards, sending messages results in these messages appearing in the personal chat rooms:
⚠ Your message may not have been bridged: failed to send message node: websocket not connected

However I'm unable to reconnect to the websocket, there appears to be no 'refresh' command.
Failed to parse input as JSON: invalid character 'r' looking for beginning of value

Only logging out and in again appears to fix the issue, however this is not really feasible as there is no easy way to get the cookies on mobile.

Is there an other possibility to reconnect?

feat(instagram): differentiate messages from content description

(Instagram vs Element Desktop)

Content description could be better differentiated from regular messages, maybe highlighted or spaced out, I don't know.
This made me miss a message the other day.

Also, it would be nice if the content type was shown (e.g Carousel/Reel even though Reel description seems unsupported ATM, I can open an issue for that if needed) in the message aswell, I can also open an issue for that.

Backfill: replies are not handled

Reply target message not found on messages with replies to self or others. Message is bridged without reply info.

Running docker built from source (682c4d7)

What's your debugging setup? Debugging my docker stuff as-is is currently very annoying with networking. Haven't migrated everything to k8s yet (storage + backup issues).

Matrix->FB read receipts not working

After upgrading from mautrix-facebook to mautrix-meta I can't get Matrix->FB read receipts to work. I'm running version 0.1.0 with latest synapse provided by matrix-docker-ansible-deploy. Here's my relevant ansible config:

matrix_mautrix_meta_messenger_enabled: true
matrix_mautrix_meta_messenger_meta_mode: 'facebook'
matrix_mautrix_meta_messenger_bridge_federate_rooms: false
matrix_mautrix_meta_messenger_logging_min_level: 'debug'
matrix_mautrix_meta_messenger_metrics_enabled: false   
matrix_mautrix_meta_messenger_configuration_extension_yaml: |
  bridge:
    backfill:
      enabled: false
    delivery_receipts: false

Double puppeting is working, ephemeral events are enabled and read receipts work fine on other bridges, toggling delivery_recepts to true has no effect. Am I missing something? According to the roadmap it should work both ways like in the older python bridge.

Here are hopefully relevant logs starting from typing on FB, sending, receiving on Matrix and clicking in chat to create read recepit event, but nothing is happening on FB:

Mar 07 00:33:10 matrix matrix-mautrix-meta-messenger[652794]: 2024-03-06T23:33:10Z DBG Request completed action="insert meta message" duration=13.340528 message_id=mid.$cAAAAAGPntiGUR2JleWOFh0cx_ZtI method=PUT otid=7171286721508514632 req_body={"typing":false} req_id=49 response_length=2 response_mime=application/json room_id=!gThfFTAirLrA7PnEnA:redact.ed sender_id=xxxxxxxxxxxxxxx status_code=200 thread_id=xxxxxxxxxxxxxxx thread_receiver=yyyyyyyyyyyyyyy url=http://matrix-traefik:8008/_matrix/client/v3/rooms/%21gThfFTAirLrA7PnEnA:redact.ed/typing/@facebook_xxxxxxxxxxxxxxx:redact.ed?user_id=%40facebook_xxxxxxxxxxxxxxx%3Aredact.ed
Mar 07 00:33:10 matrix matrix-mautrix-meta-messenger[652794]: 2024-03-06T23:33:10Z DBG Updating sync groups LSExecuteFirstBlockForSyncTransaction=[{"CurrentCursor":"HCwAABa8gogBFpi867INEwUWkIjZ-OW8LQA","DatabaseId":1,"EpochId":7171286481418321962,"NextCursor":"HCwAABa-gogBFpi867INEwUWkIjZ-OW8LQA","SyncChannel":1,"SyncStatus":2}] LSUpsertSyncGroupThreadsRange=null component=messagix user_id=@acc:redact.ed
Mar 07 00:33:10 matrix matrix-mautrix-meta-messenger[652794]: 2024-03-06T23:33:10Z INF Updated database by transaction... component=messagix database_id=1 new_cursor=HCwAABa-gogBFpi867INEwUWkIjZ-OW8LQA sendSyncParams=false syncChannel=1 user_id=@acc:redact.ed
Mar 07 00:33:10 matrix matrix-mautrix-meta-messenger[652794]: 2024-03-06T23:33:10Z DBG Request completed action="insert meta message" duration=95.210955 message_id=mid.$cAAAAAGPntiGUR2JleWOFh0cx_ZtI method=PUT otid=7171286721508514632 req_body={"body":"-----","m.mentions":{},"msgtype":"m.text"} req_id=50 response_length=59 response_mime=application/json room_id=!gThfFTAirLrA7PnEnA:redact.ed sender_id=xxxxxxxxxxxxxxx status_code=200 thread_id=xxxxxxxxxxxxxxx thread_receiver=yyyyyyyyyyyyyyy url=http://matrix-traefik:8008/_matrix/client/v3/rooms/%21gThfFTAirLrA7PnEnA:redact.ed/send/m.room.message/mautrix-go_1709767990790901039_1?ts=1709767990649&user_id=%40facebook_xxxxxxxxxxxxxxx%3Aredact.ed
Mar 07 00:33:10 matrix matrix-mautrix-meta-messenger[652794]: 2024-03-06T23:33:10Z DBG Starting handling of transaction content={"pdu":1} transaction_id=717975
Mar 07 00:33:10 matrix matrix-mautrix-meta-messenger[652794]: 2024-03-06T23:33:10Z DBG Finished dispatching events from transaction transaction_id=717975
Mar 07 00:33:10 matrix matrix-mautrix-meta-messenger[652794]: 2024-03-06T23:33:10Z DBG Sent message checkpoint message_checkpoint={"event_id":"$0JovxjjVRsnBXkYuTUxrPu1a2y4IiCufdXzf7kSjA7c","event_type":"m.room.message","message_type":"m.text","reported_by":"BRIDGE","retry_num":0,"room_id":"!gThfFTAirLrA7PnEnA:redact.ed","status":"SUCCESS","step":"BRIDGE","timestamp":1709767990904}
Mar 07 00:33:10 matrix matrix-mautrix-meta-messenger[652794]: 2024-03-06T23:33:10Z DBG Request completed action="handle meta read receipt" duration=54.12685 method=POST read_at_ms=0 read_up_to_ms=1709767990649 req_body={} req_id=51 response_length=2 response_mime=application/json room_id=!gThfFTAirLrA7PnEnA:redact.ed sender_id=xxxxxxxxxxxxxxx status_code=200 thread_id=xxxxxxxxxxxxxxx thread_receiver=yyyyyyyyyyyyyyy url=http://matrix-traefik:8008/_matrix/client/v3/rooms/%21gThfFTAirLrA7PnEnA:redact.ed/receipt/m.read/$0JovxjjVRsnBXkYuTUxrPu1a2y4IiCufdXzf7kSjA7c?user_id=%40facebook_xxxxxxxxxxxxxxx%3Aredact.ed
Mar 07 00:33:10 matrix matrix-mautrix-meta-messenger[652794]: 2024-03-06T23:33:10Z DBG Sent read receipt to Matrix action="handle meta read receipt" event_id=$0JovxjjVRsnBXkYuTUxrPu1a2y4IiCufdXzf7kSjA7c read_at_ms=0 read_up_to_ms=1709767990649 room_id=!gThfFTAirLrA7PnEnA:redact.ed sender_id=xxxxxxxxxxxxxxx thread_id=xxxxxxxxxxxxxxx thread_receiver=yyyyyyyyyyyyyyy
Mar 07 00:33:10 matrix matrix-mautrix-meta-messenger[652794]: 2024-03-06T23:33:10Z DBG Request completed as_user_id=@facebook_xxxxxxxxxxxxxxx:redact.ed duration=9.778115 method=PUT req_body={"timeout":15000,"typing":false} req_id=52 response_length=2 response_mime=application/json status_code=200 url=http://matrix-traefik:8008/_matrix/client/v3/rooms/%21gThfFTAirLrA7PnEnA:redact.ed/typing/@facebook_xxxxxxxxxxxxxxx:redact.ed?user_id=%40facebook_xxxxxxxxxxxxxxx%3Aredact.ed
Mar 07 00:33:10 matrix matrix-mautrix-meta-messenger[652794]: 2024-03-06T23:33:10Z DBG Request completed action="handle meta read receipt" duration=9.05812 method=POST read_at_ms=1709767990664 read_up_to_ms=1709767990471 req_body={} req_id=53 response_length=2 response_mime=application/json room_id=!gThfFTAirLrA7PnEnA:redact.ed sender_id=xxxxxxxxxxxxxxx status_code=200 thread_id=xxxxxxxxxxxxxxx thread_receiver=yyyyyyyyyyyyyyy url=http://matrix-traefik:8008/_matrix/client/v3/rooms/%21gThfFTAirLrA7PnEnA:redact.ed/receipt/m.read/$Ld-FLAo4GYZa01GEejK1L6ct5kg-EYXBvGyy8-HJqmE?user_id=%40facebook_xxxxxxxxxxxxxxx%3Aredact.ed
Mar 07 00:33:10 matrix matrix-mautrix-meta-messenger[652794]: 2024-03-06T23:33:10Z DBG Sent read receipt to Matrix action="handle meta read receipt" event_id=$Ld-FLAo4GYZa01GEejK1L6ct5kg-EYXBvGyy8-HJqmE read_at_ms=1709767990664 read_up_to_ms=1709767990471 room_id=!gThfFTAirLrA7PnEnA:redact.ed sender_id=xxxxxxxxxxxxxxx thread_id=xxxxxxxxxxxxxxx thread_receiver=yyyyyyyyyyyyyyy
Mar 07 00:33:22 matrix matrix-mautrix-meta-messenger[652794]: 2024-03-06T23:33:22Z DBG <iq id="178.55-5" to="s.whatsapp.net" type="get" xmlns="w:p"/> component=whatsmeow sublogger=Send user_id=@acc:redact.ed
Mar 07 00:33:22 matrix matrix-mautrix-meta-messenger[652794]: 2024-03-06T23:33:22Z DBG <iq from="s.whatsapp.net" id="178.55-5" t="1709768002" type="result"/> component=whatsmeow sublogger=Recv user_id=@acc:redact.ed

Thank you

Can not receive new message from Meta-Messenger

Can not receive new message from Meta-Messenger.

  1. Login facebook, open the messenger web page in facebook;
  2. Copy the cookies and login this application;
  3. Watching the log output.

when new message comming in messenger, the app can't receive it.

图片 图片

Message from Facebook: "We suspect automated behaviour on your account."

To prevent your account from being temporarily restricted or permanently disabled, ensure that no other users or tools have access to your account and that you're following our Terms of Use. Also consider changing your password to a stronger one to prevent unauthorised access to your account by third parties.

Could this be related to this bridge at all?

Allow verifying encryption keys.

When end-to-end encryption is enabled there is currently no way for a bridge user to see which encryption key is being used. It would be great if the key fingerprint could be shown to the user so that they can verify if their conversation is secure with the right key on each side. This would be a powerful way to chat over Meta services while verifying that the message contents are end-to-end encrypted by a key controlled by the bridge.

Failed to connect to Facebook Messenger:

failed to load inbox: messagix-moduleparser: failed to handle hastesupportdata module (failed to unmarshal ssjs data into bbox container: json: cannot unmarshal number into Go value of type messagix.BBoxContainer)

I am unable to login after the Facebook login outtage, the container is the latest version. Is this a bug or a misconfiguratuon on my side?

Server never responds to outgoing MQTT messages

I followed the installation guide, login works fine, messages are bridged from Instagram to Matrix, double puppeting is enable and works too, but sending a message from Matrix yields:

Jan 28 19:10:47 rpi mautrix-meta[1505]: 2024-01-28T19:10:47+01:00 ERR events.go:283:Finish() > failed to unmarshal PublishResponseData JSON payload into lightspeed.LightSpeedData struct error="unexpected end of JSON input" global_log=true
Jan 28 19:10:47 rpi mautrix-meta[1505]: 2024-01-28T19:10:47+01:00 WRN Message send response didn't include message ID action="handle matrix event" event_id=$jyBbAynS9FIwW43XBdXYHlUFTvqfJP3XSk-3Nfp9QUk event_type=m.room.message room_id=!xAbcCelJnZjMJqWvGT:example.com thread_id=17843764169642852 thread_receiver=100962061305819

And the message is not transferred.

I have not done anything specific in the setup. I am running Synapse 1.99.0 on a raspberry pi 4, along with another facebook Meta bridge.

login not possible ("cannot unmarshal number into Go value of type string")

Having issues to login for the first time. Tried with the cURL method and as JSON object following the guide.

Version: mautrix-meta v0.1.0+dev.c4157b6a (Mar 7 2024, 13:37:02)

When pasting as cURL:

Failed to log in: failed to load inbox: messagix-moduleparser: failed to handle hastesupportdata module (failed to unmarshal ssjs data into bbox container: json: cannot unmarshal number into Go value of type messagix.BBoxContainer)

When pasting as json:

{ "datr":"redacted", "c_user":"redacted", "sb":"redacted", "xs":"redacted" }

or with c_user not quoted:

{ "datr":"redacted", "c_user":redacted, "sb":"redacted", "xs":"redacted" }

or with xs URL "decoded" (checkbox enabled)

all result in:

Failed to parse input as JSON: json: cannot unmarshal number into Go value of type string

Media sent to Messenger over WhatsApp can't be viewed on Messenger

Media sent to Messenger over WhatsApp can't be viewed on Messenger, where pictures display as a blank message and when tapped a toast appear saying "Couldn't load high-resolution image" and videos are just an empty spot that can't be interacted with.
The issue happens both on a self hosted instance running mautrix-meta v0.2.0+dev.fc1de15f (Mar 18 2024, 21:32:15) on Facebook mode and a secret chat, and via Beeper.
Media is viewable without issues over Element Web, Element X and the new Beeper client, but not on the Messenger app.

Source for an image:

{
  "type": "m.room.message",
  "room_id": "!exwpRQianGBrZdaKqY:vrkknn.net",
  "sender": "@vrkknn:vrkknn.net",
  "content": {
    "body": "image.png",
    "info": {
      "size": 43972,
      "mimetype": "image/png",
      "w": 726,
      "h": 327,
      "xyz.amorgan.blurhash": "L24_-B%NMas7.A%N%2xaxFxu%Oxa"
    },
    "msgtype": "m.image",
    "m.mentions": {},
    "url": "mxc://vrkknn.net/iVcgxfSALekvxQsdjcihjQdt"
  },
  "origin_server_ts": 1710863079352,
  "unsigned": {
    "age": 7055875,
    "transaction_id": "m1710863081720.9"
  },
  "event_id": "$FK-e--g2Hm87rwzRQJZyT9CzbiKLFMYcVVVjyNCpNOo",
  "user_id": "@vrkknn:vrkknn.net",
  "age": 7055875
}

Source for a video:

{
  "type": "m.room.message",
  "room_id": "!exwpRQianGBrZdaKqY:vrkknn.net",
  "sender": "@vrkknn:vrkknn.net",
  "content": {
    "body": "video.mp4",
    "fi.mau.double_puppet_source": "mautrix-meta",
    "info": {
      "mimetype": "video/mp4",
      "size": 4229418
    },
    "m.mentions": {},
    "msgtype": "m.video",
    "url": "mxc://vrkknn.net/HFoXnlQmVjwfocNklUZhepSh"
  },
  "origin_server_ts": 1710757134911,
  "unsigned": {
    "age": 113468464
  },
  "event_id": "$poHEXAC4mnnUe4RniotAG0Vx9QLCtv-PhwmvPxKeBvE",
  "user_id": "@vrkknn:vrkknn.net",
  "age": 113455542
}

tempFileForShare_20240319-183517
tempFileForShare_20240319-183613
tempFileForShare_20240319-183652

The bridge not working on https://business.facebook.com/

Hello @tulir, thank you for your contribution.

My issue is according to the instructions, when I use the bridge, I use it in the https://www.facebook.com/ It's normal. But in the https://business.facebook.com/ When it was discovered that it could not be received wss://edge-chat.facebook.com/chat... Is this normal for socket messages?

Intermittent "Unsupported message" sending link via Messenger web

I sent the following (intentionally bad link) via messenger.com web to someone else.

The link was tiktok.com/random_video (no http or anything).

When viewing in beeper, I got an Unsupported message error.

Decrypted event source
{
  "room_id": "!xxxxxxxxxx:beeper.local",
  "type": "m.room.message",
  "content": {
    "body": "Unsupported message (*waArmadilloApplication.Armadillo_Content_ExtendedContentMessage)",
    "fi.mau.double_puppet_source": "mautrix-meta",
    "m.mentions": {},
    "msgtype": "m.notice",
    "_isEmojiBody": null
  }
}

I found reference to that property (Armadillo_Content_ExtendedContentMessage) in from-whatsapp code, but not in the meta code.

I tried multiple times to reproduce the error, but all worked as expected and came through with expected message type and preview.

Just posting bug in case it relates to missing functionality.

Your message may not have been bridged: failed to send LS request: not connected

I would often get the Your message may not have been bridged: failed to send LS request: not connected message when trying to send something via the bridge and, indeed, the message does not get bridged. Restarting the service helps… for a while.

Please let me know what kind of debug information I can provide to help tracking this down.

getClientPayload() SIGSEGV

I've been using the FB Messenger integration here for a bit, but I've started to encounter a pesky crash.
So the following chain of events has been happening to me since last week at least once per few days:

  1. My session times out or something, messages don't get sent and bridge responds with "Your message may not have been bridged: failed to send LS request: not connected"
  2. I delete my session, login into FB from browser, get the cURL and dump it for the bridge
  3. It takes a while to process, but after a while returns info that I'm logged in
  4. Nothing works and then I find out that the process has crashed.

Relevant logs:

2024-04-12T13:43:17+02:00 DBG Initial connect to Meta socket completed user_id=xxx
2024-04-12T13:43:17+02:00 DBG Sending cached initial table to handler user_id=xx
2024-04-12T13:43:17+02:00 DBG Dialing wss://web-chat-e2ee.facebook.com/ws/chat component=whatsmeow sublogger=Socket user_id=xxx
2024-04-12T13:43:17+02:00 DBG Got media response, reading data action="handle table" content_length=3732 function=Puppet.UpdateInfo user_id=xxx
2024-04-12T13:43:17+02:00 DBG Media download complete action="handle table" data_length=3732 function=Puppet.UpdateInfo user_id=xxxx
2024-04-12T13:43:18+02:00 DBG Frame websocket read pump starting 0xc0009764e0 component=whatsmeow sublogger=Socket user_id=xxxxx
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0x14d4050]

goroutine 20175 [running]:
go.mau.fi/mautrix-meta/messagix.(*Client).getClientPayload(0xc000c7c500)
        /var/synapse_addons/mautrix-meta/messagix/e2ee-client.go:108 +0x30
go.mau.fi/whatsmeow.(*Client).doHandshake(0xc000ac6000, 0xc0009764e0, {0xc00071e4c0?, 0xc00071e480?})
        /var/synapse/go/pkg/mod/go.mau.fi/[email protected]/handshake.go:95 +0xadd
go.mau.fi/whatsmeow.(*Client).Connect(0xc000ac6000)
        /var/synapse/go/pkg/mod/go.mau.fi/[email protected]/client.go:354 +0x74c
main.(*User).connectE2EE(0xc0002d2280)
        /var/synapse_addons/mautrix-meta/user.go:934 +0x89a
main.(*User).eventHandler.func2()
        /var/synapse_addons/mautrix-meta/user.go:1095 +0x1c
created by main.(*User).eventHandler in goroutine 20179
        /var/synapse_addons/mautrix-meta/user.go:1094 +0x41b

Bridge itself is compiled from master branch, commit 95b8615.

Every reboot results in room change (MyName changed their avatar)

Basically the title. Before I updated today it showed two room updates every morning (my server restarts on midnight), Now after update and starting server it shows just one update.
Every time it is My Name changed their avatar. Chats fill up with room changes quickly this way.

Edit: It still happens two times after reboot.

Allow disabling of Message Request bridging

As the title says, it is kinda a must-have to be able to disable bridging of message requests.

They didn't seem to be bridged with the mautrix-facebook bridge either. Since the migration to mautrix-meta, the constant lovebot spam has become really annoying.

Add support for mentions

When I tag a user via the bridged matrix room (e.g. @User) they are tagged and it is clickable on the Matrix side. This used to also work on the FB side. However, it no longer does, and it just sends the text "User (FB)" to them as a message instead.

Let me know if I can add any actual useful data points for you to debug or logs etc.

The bridge fails to start because some table in Synapse DB does not exist

I think the upgrade routine fails.
This repeats many times in the log of my Postgres container:

synapse-db-1 | 2024-03-06 17:30:20.942 UTC [40] ERROR: relation "events_room_stream2" does not exist
synapse-db-1 | 2024-03-06 17:30:20.942 UTC [40] STATEMENT: ALTER INDEX events_room_stream2 RENAME TO events_room_stream

Any solution?

I am replacing mautrix-facebook with mautrix-meta. If you need more info just let me know. Thank you.

Shared videos don't include link to video

I use this bridge for Facebook Messenger hosted in Beeper Cloud. When people share video links, I'm just getting a screenshot/thumbnail of the video and no link to the source where it was posted. I've confirmed this to be happening for Facebook, Instagram, and YouTube video links so far.

Disabling backfilling does not work

I have set backfilling to enable: false in the config, still the bridge starts backfilling every time the container is restarted.
If I remove all portals using delete-all-portals the bridge will create and backfill all of them on restart.

FTL Error initializing end-to-bridge encryption error="the pickled object is too new"

I did setup v0.1.0 with conduit. matrix and facebook login was working. However, I got a websocket error ("Your message may not have been bridged: failed to send LS request: failed to write to websocket: use of closed network connection",). Recommended by #21, I tried with the latest dev version (arm64). Logs:

INF Initializing bridge built_at="Mar  6 2024, 21:54:13" go_version=go1.22.1 name=mautrix-meta version=0.1.0+dev.4dd9a43d
DBG Initializing database connection
DBG Initializing state store
DBG Initializing Matrix event processor
DBG Initializing Matrix event handler
INF Bridge initialization complete, starting...
DBG Running database upgrades
INF Database is up to date current_version=6 db_section=main latest_known_version=6 oldest_compatible_version=3
INF Database is up to date current_version=5 db_section=matrix_state latest_known_version=5 oldest_compatible_version=5
DBG Starting application service HTTP server
DBG Checking connection to homeserver
INF Starting HTTP listener address=0.0.0.0:29319
DBG Request completed duration=89.781814 method=GET req_id=1 response_length=118 response_mime=application/json status_code=200 url=https://redacted/_matrix/client/versions?user_id=%40metabot%3Aredacted
DBG Request completed duration=3.047284 method=GET req_id=2 response_length=39 response_mime=application/json status_code=200 url=https://redacted/_matrix/client/v3/account/whoami?user_id=%40metabot%3Aredacted
DBG Homeserver does not support checking status of homeserver -> bridge connection
DBG Initializing end-to-bridge encryption... component=crypto
DBG Request completed duration=4.0207 method=GET req_id=3 response_length=26 response_mime=application/json status_code=200 url=https://redacted/_matrix/media/v3/config?user_id=%40metabot%3Aredacted
INF Database is up to date current_version=14 db_section=crypto latest_known_version=14 oldest_compatible_version=9
DBG Found existing device ID for bot in database component=crypto device_id=redacted
DBG Request completed duration=3.077932 method=GET req_id=4 response_length=78 response_mime=application/json status_code=200 url=https://redacted/_matrix/client/v3/login?user_id=%40metabot%3Aredacted
DBG Request completed duration=6.090272 method=POST req_body={"device_id":"redacted","identifier":{"type":"m.id.user","user":"@metabot:redacted"},"initial_device_display_name":"Facebook Messenger bridge","type":"m.login.application_service"} req_id=5 response_length=147 response_mime=application/json status_code=200 url=https://redacted/_matrix/client/v3/login?user_id=%40metabot%3Aredacted
DBG Stored credentials after login as_user_id=@metabot:redacted device_id=redacted user_id=@metabot:redacted
DBG Logged in as bridge bot component=crypto device_id=redacted
FTL Error initializing end-to-bridge encryption error="the pickled object is too new"

Thanks for the product, btw, it is heroic.

Shared reels only bridged as single picture, not actual video (`Unrecognized CTA data`)

Only started to happen recently. Still affects the just released v0.3.0.

CTA data in question (extracted from log):

{
    "ActionUrl": "https://l.facebook.com/l.php?u=https%3A%2F%2Fwww.instagram.com%2Freel%2FC42okxEMpP2%2F%3Fid%3Dcensored_17891792131&h=AT32qRSTehFuwYjIIqX0oV9otNp090uPxjv5u0iQOlp3rYiXiO_qxCWUwNJJNw_l8RuxeCwjMbjX-1K3sd-Qe96CDKF6TLb1FN0wgIJheZo8eliAO2IrXX8KwIKWgf2s4XCOYhWCbXcLVNkV",
    "AttachmentFbid": "ee.mid.$cAAA1JWsotaGVF_WaCGO5rBRJqIqk",
    "CtaId": 1,
    "MessageId": "mid.$cAAA1JWsotaGVF_WaCGO5rBRJqIqk",
    "NativeUrl": "instagram://reels_share/?shortcode=C42okxEMpP2",
    "TargetId": "censored",
    "ThreadKey": "censored",
    "Type_": "igd_web_post_share",
    "Unrecognized": {
        "4": 0
    }
}

Full log entry

mautrix-instagram 2024-04-16T11:34:59Z DBG Unrecognized CTA data action="insert meta message" cta_data={"ActionUrl":"https://l.facebook.com/l.php?u=https%3A%2F%2Fwww.instagram.com%2Freel%2FC42okxEMpP2%2F%3Fid%3Dcensored_17891792131\u0026h=AT32qRSTehFuwYjIIqX0oV9otNp090uPxjv5u0iQOlp3rYiXiO_qxCWUwNJJNw_l8RuxeCwjMbjX-1K3sd-Qe96CDKF6TLb1FN0wgIJheZo8eliAO2IrXX8KwIKWgf2s4XCOYhWCbXcLVNkV","AttachmentFbid":"ee.mid.$cAAA1JWsotaGVF_WaCGO5rBRJqIqk","CtaId":1,"MessageId":"mid.$cAAA1JWsotaGVF_WaCGO5rBRJqIqk","NativeUrl":"instagram://reels_share/?shortcode=C42okxEMpP2","TargetId":censored,"ThreadKey":censored,"Type_":"igd_web_post_share","Unrecognized":{"4":0}} message_id=mid.$cAAA1JWsotaGVF_WaCGO5rBRJqIqk otid=7185963883581442724 room_id=!NzPJbPGdcfBSIGPvAn:myhomeserver sender_id=censored thread_id=censored thread_receiver=censored xma_data={"AttachmentFbid":"ee.mid.$cAAA1JWsotaGVF_WaCGO5rBRJqIqk","AttachmentType":7,"AuthorityLevel":80,"HeaderImageUrl":"https://scontent.cdninstagram.com/v/t51.2885-19/387666800_23996086353339136_6336747632547778656_n.jpg?stp=dst-jpg_s50x50\u0026_nc_cat=1\u0026ccb=1-7\u0026_nc_sid=3fd06f\u0026_nc_ohc=94zR159Wp5UAb7ABJVw\u0026_nc_ad=z-m\u0026_nc_cid=0\u0026_nc_ht=scontent.cdninstagram.com\u0026oh=00_AfCp5RK4BZBCJBoi7yCXYaR1YO0GdIj7aSeHXe-A35mCIw\u0026oe=662435D1\u0026ig_cache_key=MTc4OTE3OTIxMzE%3D.2-ccb7-5","HeaderImageUrlExpirationTimestampMs":1713649105000,"HeaderImageUrlFallback":"https://i.instagram.com/api/v1/direct_v2/media_fallback/?entity_id=17841417763946474\u0026entity_type=1","HeaderTitle":"tabithandflorian","MaxTitleNumOfLines":2,"MessageId":"mid.$cAAA1JWsotaGVF_WaCGO5rBRJqIqk","PlayableUrlMimeType":"video/mp4","PreviewHeight":200,"PreviewImageDecorationType":8,"PreviewUrl":"https://scontent.cdninstagram.com/v/t51.29350-15/434261145_440238285014235_5708929623404853314_n.jpg?stp=dst-jpg_s150x200\u0026_nc_cat=104\u0026ccb=1-7\u0026_nc_sid=18de74\u0026_nc_ohc=-Mw8xD7ndQgAb7fkC21\u0026_nc_ad=z-m\u0026_nc_cid=0\u0026_nc_ht=scontent.cdninstagram.com\u0026oh=00_AfDzg6JPN1VD6MdI74KEVEy0stg9-aXjeH8ZmzhPS5tQSA\u0026oe=66243685\u0026ig_cache_key=MzMzMDAyNzQyMjkzMjQ0MDA1NA%3D%3D.2-ccb7-5","PreviewUrlExpirationTimestampMs":1713649285000,"PreviewUrlFallback":"https://i.instagram.com/api/v1/direct_v2/media_fallback/?entity_id=18014757662224105\u0026entity_type=13","PreviewUrlLarge":"https://scontent.cdninstagram.com/v/t51.29350-15/434261145_440238285014235_5708929623404853314_n.jpg?_nc_cat=104\u0026ccb=1-7\u0026_nc_sid=18de74\u0026_nc_ohc=-Mw8xD7ndQgAb7fkC21\u0026_nc_ad=z-m\u0026_nc_cid=0\u0026_nc_ht=scontent.cdninstagram.com\u0026oh=00_AfCV8mI_vymF2wk-TBqajNcYY22irYNFYKqXyqHREpA_2w\u0026oe=66z243685","PreviewUrlMimeType":"image/jpeg","PreviewWidth":150,"ShouldHighlightHeaderTitleInTitle":true,"ThreadKey":censored,"TimestampMs":1713267298824,"Unrecognized":{"26":0,"28":"","68":0},"XMATypeOne":"generic_share","XMATypeTwo":"generic_share","XmaLayoutType":4}
mautrix-instagram 2024-04-16T11:34:59Z DBG Request completed action="insert meta message" duration=67.339681 message_id=mid.$cAAA1JWsotaGVF_WaCGO5rBRJqIqk method=PUT otid=7185963883581442724 req_body={"body":"image.jpg","external_url":"https://www.instagram.com/reel/C42okxEMpP2/?id=censored_17891792131","fi.mau.double_puppet_source":"mautrix-meta","fi.mau.meta.xma_fetch_status":"unrecognized","info":{"h":200,"mimetype":"image/jpeg","size":4258,"w":150},"m.mentions":{},"msgtype":"m.image","url":"mxc://myhomeserver/FmNspTbojftpyghFfuVQxxnn"} req_id=12 response_length=59 response_mime=application/json room_id=!NzPJbPGdcfBSIGPvAn:myhomeserver sender_id=censored status_code=200 thread_id=censored thread_receiver=censored url=http://matrix-synapse:8008/_matrix/client/v3/rooms/%21NzPJbPGdcfBSIGPvAn:myhomeserver/send/m.room.message/mautrix-go_1713267299249194336_1?ts=1713267298824

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.