mautrix / imessage

A Matrix-iMessage puppeting bridge
https://go.mau.fi/mautrix-imessage/
GNU Affero General Public License v3.0
356 stars 38 forks source link

Fix backfilling #196

Closed trek-boldly-go closed 9 months ago

trek-boldly-go commented 9 months ago

BlueBubbles wasn't honoring the chatId filter used on the query messages endpoint so it was returning messages from all chats during the backfill process. I swapped the endpoint for the /chat/[chat id]/messages endpoint and updated the query with the proper params to account for the change. Notably, BlueBubbles has a maximum limit of 1000 messages, so the query function has also been updated accordingly.

Before anyone wonders, no, this still does not backfill tapbacks. That code doesn't appear to exist in the original bridge:

        if msg.Tapback != nil {
            // TODO handle tapbacks
            portal.log.Debugln("Skipping tapback", msg.GUID, "in backfill")
            continue
        }