I'm thinking about adding a "message history backfilling" for 1:1 chats in my gateway. is there anything wrong with the following flow?
1. query the XMPP user's message archives (with "privileged IQs")
2. send missing messages with a "delay" tag (incoming messages from "puppet" JIDs, and outgoing messages with the privilege thing again)
3. profit (?)
marc0shas left
marc0shas joined
marc0shas left
marc0shas joined
jubalhhas left
MSavoritias (fae,ve)has left
marc0shas left
marc0shas joined
MSavoritias (fae,ve)has joined
marc0shas left
marc0shas joined
marc0shas left
marc0shas joined
marc0shas left
marc0shas joined
marc0shas left
marc0shas joined
marc0shas left
marc0shas joined
mhhas left
pep.has left
mhhas joined
goffihas left
heartyhas left
goffihas joined
atomicwatchhas left
atomicwatchhas joined
norayrhas left
norayrhas joined
atomicwatchhas left
Mjolnir Archonhas joined
Marandahas joined
inkyhas left
atomicwatchhas joined
norayrhas left
norayrhas joined
goffihas left
goffihas joined
marc0shas left
marc0shas joined
goffihas left
goffihas joined
inkyhas joined
Alexhas left
Alexhas joined
pep.has joined
inkyhas left
pep.
nicoco: have a look at MAM, that's what you want I guess
nicoco
it is what I want indeed, but for 1:1 chats the gateway component does not manage MAM, hence my idea to "privilege query MAM data" and only send "missing" messages
nephelehas joined
larmahas joined
debaclehas joined
heartyhas joined
Laurahas left
Laurahas joined
inkyhas joined
marc0shas left
norayrhas left
norayrhas joined
marc0shas joined
atomicwatchhas left
atomicwatchhas joined
marc0shas left
marc0shas joined
debaclehas left
atomicwatchhas left
atomicwatchhas joined
nephelehas left
techmetx11has left
pulkomandyhas joined
norayrhas left
norayrhas joined
xnamedhas joined
inkyhas left
nicocohas left
nicocohas joined
Samhas left
Laurahas left
Laurahas joined
Alexhas left
Ingolfhas left
Alexhas joined
Ingolfhas joined
norayrhas left
norayrhas joined
atomicwatchhas left
inkyhas joined
Matrix Traveler (bot)has left
homebeachhas left
homebeachhas joined
Matrix Traveler (bot)has joined
atomicwatchhas joined
marc0shas left
marc0shas joined
marc0shas left
marc0shas joined
marc0shas left
marc0shas joined
inkyhas left
selurveduhas joined
marc0shas left
marc0shas joined
Holgerhas left
keyzerhas left
keyzerhas joined
marc0shas left
marc0shas joined
pulkomandyhas left
selurveduhas left
selurveduhas joined
pulkomandyhas joined
marc0shas left
marc0shas joined
PapaTutuWawahas joined
marc0shas left
marc0shas joined
Laurahas left
marc0shas left
marc0shas joined
pulkomandyhas left
kikuchiyohas joined
goffihas left
goffihas joined
marc0shas left
kikuchiyohas left
marc0shas joined
Millesimushas left
Holgerhas joined
Millesimushas joined
inkyhas joined
Alexhas left
Alexhas joined
marc0shas left
kikuchiyohas joined
marc0shas joined
marc0shas left
marc0shas joined
keyzerhas left
keyzerhas joined
techmetx11has joined
marc0shas left
marc0shas joined
marc0shas left
marc0shas joined
marc0shas left
marc0shas joined
marc0shas left
marc0shas joined
marc0shas left
marc0shas joined
nikhas joined
nikhas left
nikhas joined
marc0shas left
marc0shas joined
norayrhas left
nikhas left
kikuchiyohas left
jubalhhas joined
PapaTutuWawahas left
nikhas joined
nikhas left
nikhas joined
kikuchiyohas joined
marc0shas left
marc0shas joined
goffihas left
TheCoffeMakerhas joined
nikhas left
jubalhhas left
junaidhas left
junaidhas joined
marc0shas left
marc0shas joined
selurveduhas left
selurveduhas joined
nikhas joined
debaclehas joined
Dele Olajidehas joined
Dele Olajidehas left
larmahas left
norayrhas joined
PapaTutuWawahas joined
thomaslewishas joined
marc0shas left
marc0shas joined
goffihas joined
nikhas left
thomaslewishas left
selurveduhas left
serge90has joined
selurveduhas joined
selurveduhas left
serge90has left
larmahas joined
nikhas joined
debaclehas left
heartyhas left
Ingolfhas left
junaidhas left
atomicwatchhas left
heartyhas joined
Ingolfhas joined
nikhas left
heartyhas left
heartyhas joined
marc0shas left
marc0shas joined
heartyhas left
heartyhas joined
norayrhas left
rq77has joined
rq77has left
heartyhas left
larmahas left
heartyhas joined
kikuchiyohas left
inkyhas left
kikuchiyohas joined
inkyhas joined
marc0shas left
marc0shas joined
pulkomandyhas joined
TheCoffeMakerhas left
lovetox
i dont understand what you want to do
marc0shas left
marc0shas joined
lovetox
1:1 messages are in the users archive on the server
lovetox
the client querys that archive when it comes online
moparisthebest
PSA: if any of your code does SHA3 please check the implementation immediately https://mouha.be/sha-3-buffer-overflow/
Schimon_has left
xnamedhas left
norayrhas joined
larmahas joined
nicoco
lovetox: when the gateway comes online, I want it to fill the archive with messages exchanged while it was offline. But I'd like these messages to be correctly timestamped. I believe.
about the gajim #11048. what does it look like when the "delay is added by the server"? cause a component is "sortof a server" so I might be able to add this delay at the right place...
xnamedhas joined
Beherithas left
norayrhas left
norayrhas joined
kujiuhas left
kujiuhas joined
Beherithas joined
mhhas left
mhhas joined
debaclehas joined
inkyhas left
adxhas left
Samhas joined
larmahas left
marc0shas left
marc0shas joined
lovetox
No it's not a server
lovetox
Simply send the messages with a delay timestamp that's it
lovetox
To the user
lovetox
This has nothing to do with mam or archives
jubalhhas joined
lovetox
Some clients will show the delay others not that's nothing you can control
lovetox
You should add all information that clients can do the right thing
Samhas left
pep.
Wouldn't that be better if people could just use MAM instead of being shoved messages whenever the gateway decides
lovetox
No it's easier we follow what we did always, if someone wants to write me a message he needs to send it to my server
lovetox
Why would we change that fundamental process?
adxhas joined
inkyhas joined
Mx2has joined
nicoco
you're mistaken lovetox, I don't want to change any fundamental process and it's perfectly fine if you don't want the UI to reflect the delay added by the gateway, I can fork if I'm not happy (I won't ^^)
lovetox
You misunderstood, I replied to pep.
pep.
hmm, there are clients (mobile mostly?) that send delayed messages if they weren't connected when the user sent them
lovetox
And also I never said I don't want ui for displaying delays
lovetox
I try to help you implement the gateway, and I'm trying to tell you that you overthink the whole process, you add a delay and send the message to the server , there is not more to do
PapaTutuWawahas left
nicoco
great then :)
>you add a delay and send the message
yes that's what I do for incoming message (legacy→XMPP)
for "outgoing messages sent from $legacy_client", I use https://xmpp.org/extensions/xep-0356.html#sending_mess and I was wondering if it made sense/was OK to put the <delay> one level up (in <forwarded> instead of <message>) because of your comment.
marc0shas left
marc0shas joined
lovetox
How can you send forwarded?
lovetox
That's business of my server to forward something or not?
nicoco
just following this syntax: https://xmpp.org/extensions/xep-0356.html#example-6 (and it works)
pep.
nicoco, yeah no I agree that's weird to use MAM. Does that mean you do that for every message you send?
nope, and I don't do it (yet?), that's why I'm asking for opinions to the wise XMPP gurus here :)
Zash
Oh no, do we need sync between MAMs?
Zash
Plz no
lovetox
But if I register at your component I doubt my server would consider you privileged
inkyhas left
nicoco
pep.: nope, no MAM here, and no direct filling the MAM or anything that weird. However, with this: https://xmpp.org/extensions/xep-0356.html#iq_stanzas I could query MAM for a user
moparisthebest
Yo dog I heard you liked MAM so I put some MAM into your MAM
nicoco
and *IF* there are some missing messages, up to XXX days (which would be a parameter exposed to the user and/or the server admin), I just send them. I think that should work.
Kev
> Oh no, do we need sync between MAMs?
I actually think MAM-aggregation might be quite handy.
alhas joined
TheCoffeMakerhas joined
nicoco
there are several reasons why I'd like to do that:
- the bad one, sorry: matrix bridges do that. but it's actually quite nice to have a conversation context when you start using the gateway
pep.
nicoco, I guess it would be weird if, whenever your gateway reconnects it fills MAM archive for messages that were sent while it was disconnected, and for new live messages it would just send them as usual. If the account using the bridge has been connected this whole time, they may not think about requesting MAM and they'd miss part of the chat
nicoco
pep. there's no filling MAM directly, the gateway just sends messages, the server handles carboning and MAMing if appropriate
pep.
Ok
pep.
So yeah do that, send delayed messages :)
pep.
As your gateway
pep.
Well as your bridged user
nicoco
now the good reason for wanting to do that:
on some legacy networks, for instance mattermost, facebook messenger, skype (AFAIK) the socket for receiving incoming messages is sometimes dropped for a few seconds (or worse). when it reconnects, the client does not get messages that were received while disconnected.
I have 2 options to ensure that no message was dropped during this lapse of time:
- keep track of which messages were not sent on my side
- take advantage of MAM to know which messages needs sending
I was contemplating option 2 because why reimplement message history when the server takes care of it? I also thought this might work for "backfilling"✎
nicoco
now the good reason for wanting to do that:
on some legacy networks, for instance mattermost, facebook messenger, skype (AFAIK) the socket for receiving incoming messages is sometimes dropped for a few seconds (or worse). when it reconnects, the client does not get messages that were sent while disconnected.
I have 2 options to ensure that no message was dropped during this lapse of time:
- keep track of which messages were not sent on my side
- take advantage of MAM to know which messages needs sending
I was contemplating option 2 because why reimplement message history when the server takes care of it? I also thought this might work for "backfilling" ✏
hoshhas joined
nicoco
now the good reason for wanting to do that:
on some legacy networks, for instance mattermost, facebook messenger, skype (AFAIK) the socket for receiving incoming messages is sometimes dropped for a few seconds (or worse). when it reconnects, the client does not get messages that were sent while disconnected.
I have 2 options to ensure that no message was dropped during this lapse of time:
- keep track of which messages were sent on the component side
- take advantage of MAM to know which messages needs sending
I was contemplating option 2 because why reimplement message history when the server takes care of it? I also thought this might work for "backfilling" ✏
pep.
Is that a requirement of your bridge? That the server supports MAM
nicoco
Zash: don't worry, you don't have to do anything, and there's a single MAM, no need to sync multiple MAMs
pep.
(even though it's probably a rare thing by now, not supporting it)
nicoco
pep.: not at all, but well, if I choose to implement option#2, MAM would be the way to ensure that you don't lose any message
adxhas left
nicoco
you have a valid point, implementing option 1 is actually needed to ensure no message are dropped without MAM, *for some networks*. it's just a lot of hassle to keep track of all sent messages, and probably write them to disk to persist in case of component upgrade/host restart/whatever, and it seems to be double use
pep.
Yeah I may also choose #2
nicoco
why reinvent the wheel right?
nicoco
I did not even thought about that before the latest XEP0356 update that allows sending IQ on behalf of users, so blame "jp" :P
pep.
You can issue MAM requests just as a client would?
nicoco
I think, yes, it's just an IQ, right?
nicoco
>Yeah I may also choose #2
I'll probably do that, and if MAM is disabled for this user/server/whatever, notify the user every time the connection is dropped, "you're offline on the legacy network, messages may be lost", or something like that.
Laurahas joined
alhas left
nephelehas joined
PapaTutuWawahas joined
nephelehas left
Ingolfhas left
marc0shas left
marc0shas joined
Ingolfhas joined
inkyhas joined
adxhas joined
marc0shas left
marc0shas joined
marc0shas left
marc0shas joined
marc0shas left
marc0shas joined
marc0shas left
marc0shas joined
sonnyhas left
sonnyhas joined
Mx2has left
Mx2has joined
marc0shas left
marc0shas joined
marc0shas left
marc0shas joined
selurveduhas joined
selurveduhas left
selurveduhas joined
marc0shas left
marc0shas joined
marc0shas left
marc0shas joined
marc0shas left
marc0shas joined
marc0shas left
marc0shas joined
marc0shas left
marc0shas joined
nephelehas joined
nephelehas left
Mx2has left
nephelehas joined
nephelehas left
Samhas joined
xnamedhas left
Vaulorhas left
Vaulorhas joined
Ingolfhas left
marc0shas left
marc0shas joined
xnamedhas joined
Samhas left
antranigvhas left
atomicwatchhas joined
nephelehas joined
nephelehas left
thomaslewishas joined
larmahas joined
Mx2has joined
thomaslewishas left
thomaslewishas joined
omightyhas joined
Yagizаhas left
xeckshas left
thomaslewishas left
selurveduhas left
selurveduhas joined
jubalhhas left
omightyhas left
omightyhas joined
amee2khas joined
nephelehas joined
thomaslewishas joined
Mx2has left
thomaslewishas left
thomaslewishas joined
Laurahas left
nephelehas left
Laurahas joined
thomaslewishas left
xeckshas joined
jubalhhas joined
omightyhas left
MSavoritias (fae,ve)has left
MSavoritias (fae,ve)has joined
debaclehas left
inkyhas left
Ingolfhas joined
atomicwatchhas left
omightyhas joined
Mx2has joined
selurvedu
nicoco, what bridge are you developing, if that's not a secret?
amee2khas left
omightyhas left
pep.
selurvedu, https://git.sr.ht/~nicoco/slidge
selurvedu
pep., oh, right, I've got a tab open with https://duckduckgo.com/?tq=slixmpp+slidge open, forgot about it