-
singpolyma
If I do a full mam sync before i set presence to available I'm likely to get duplicate messages from offline delivery, yes?
-
lovetox
also if you do the mam sync after available
-
lovetox
just the duplicates come from mam then and not offline delivery
-
lovetox
was there no some way to disable offline delivery✎ -
lovetox
was there not some way to disable offline delivery ✏
-
lovetox
i solved this by the realization that i need deduplication anyway
-
lovetox
even if you do everything perfect, as you dont know the mam id of messages you sent yourself, these will arrive as duplcates for sure
-
singpolyma
Well, if I do mam sync after I send presence I might miss messages I think, vut shouldn't get dupes. Depends what you use as your id to sync from i guess
-
singpolyma
> even if you do everything perfect, as you dont know the mam id of messages you sent yourself, these will arrive as duplcates for sure Only if you sync back that far ↺
-
singpolyma
I'm mostly thinking about JMI and detecting calls
-
singpolyma
Which I can dedupe by id just need to be careful
-
lovetox
far? you send one message and go offline, when you come online you sync from a message you received, so you will immediately receive the one you sent last
-
Zash
Wasn't there some magic to get rid of offline messages in favor of MAM?
-
lovetox
> Well, if I do mam sync after I send presence I might miss messages I think no, why do you think that?
-
Zash
https://chat.modernxmpp.org/log/modernxmpp/2021-08-31#2021-08-31-8518a542bd283686 https://hg.prosody.im/trunk/rev/906ea5e1ec75 https://hg.prosody.im/trunk/rev/d66738eeb875
-
singpolyma
>> Well, if I do mam sync after I send presence I might miss messages I think > no, why do you think that? Because if I get a message live, mrm sync isn't done yet, then something goes wrong when I come back I may sync from that live message and miss the part of mam that wasn't done yet ↺
-
lovetox
hm .. sounds like a really easy problem to solve
-
lovetox
dont accept mam-ids as sync point from live messages, while a sync is going on
-
lovetox
i mean how do you do this in a MUC? where you cant sync before presence?
-
singpolyma
So keep track of the mam id from live, but don't save it until sync is done? Hmm
-
lovetox
no i dont keep track of it, i simply ignore them
-
Zash
Who doesn't let you MUC MAM before presence?
-
lovetox
the last mam-id from the sync is the last message
-
singpolyma
So you only ever sync from the end of your last sync?
-
lovetox
yes
-
singpolyma
Won't you dupe all live messages from your last session that way?
-
lovetox
no you misunderstood me
-
lovetox
i ignore the mam-id of live messages *while* a sync is ongoing
-
lovetox
afterwards of course i dont ignore them
-
lovetox
and i mistunderstood your question, my last yes should have been a no :D
-
singpolyma
Ah ok. So if you crash/quit after mam sync but before another live after that you'll get a few dupes, but that's probably small
-
lovetox
hm not sure i understand the scenario, but yes the goal is, as long as you are not *in sync* with the archive, dont accept any mam-ids from other sources
-
lovetox
for me that worked ok for now, never had complaints, but in anyway you need deduplication
-
lovetox
> Ah ok. So if you crash/quit after mam sync but before another live if i crash after mam sync, i have the latest mam-id, if i come online again i sync from that, and will receive exactly the one live message
-
lovetox
singpolyma, you operate that sms gateway or?
-
lovetox
is this jmp.chat?
-
lovetox
i want to test that in Gajim, whats the address of this gateway?
-
singpolyma
The gateway is at xmpp:cheogram.com
-
singpolyma
If you want an account with a number for full testing I can get you one free no problem