mautrix / whatsapp

A Matrix-WhatsApp puppeting bridge
https://maunium.net/go/mautrix-whatsapp
GNU Affero General Public License v3.0
1.29k stars 175 forks source link

Leaving a portal and re-joining later should trigger backfill again #563

Closed dbutti closed 2 years ago

dbutti commented 2 years ago

Hello; on a bridge with backfill enabled, if a user leaves a portal and later uses the "pm" or "open" for the same contact/group, no backfill happens. As tulir explained when commenting in #562, backfill in the current version only happens upon login, but of course it would be useful to have it working also when simply re-creating a portal which used to exist before.

When re-creating a portal under the current version, several attempts to launch backfill are triggered indeed (both IMMEDIATE and DEFERRED), but they all fail with the message "Could not find history sync conversation data for ".

Please advise if I'm misunderstood, or if more information is needed for this issue.

Thank-you very much,

sumnerevans commented 2 years ago

We delete each message's data after it gets backfilled, so this isn't really possible.

dbutti commented 2 years ago

I see that the messages are deleted from the bridge DB, but it should be possible to get them back through the Whatsapp API just like it's done the first time, shouldn't it?

tulir commented 2 years ago

History can't be requested, you only get it when logging in.

dbutti commented 2 years ago

Oh, I see - sorry, didn't know that.