-
atomicwatch
Does an muc send recent messages to a user that just joined? I was amazed to find history in an muc I just joined even though no MAM request was sent.
-
singpolyma
atomicwatch: yes, unless you ask it not to
-
atomicwatch
got it thanks
-
singpolyma
You can also ask for a certain number of messages or messages since some time
-
singpolyma
MAM allows for pagination and other optimizations, but it's never been needed just to get room history
-
MattJ
That's the "old" history method. Most clients disable it in favour of using MAM these days.
-
theTedd
lovetox: "can i express a tuple like (100, -1) in one database field?" -- you can pack the value yourself by shifting 'zero' up to the middle of the range for the signed part, e.g. https://dpaste.org/zJF3v
-
lovetox
thanks theTedd will check it out
-
lovetox
is it possible to query the last message in a mam archive?
-
Zash
https://xmpp.org/extensions/xep-0313.html#sect-idm46703187351248 like that?
-
Zash
max=1 you want only the very last single message
-
lovetox
ah great thanks
-
MattJ
There is also https://xmpp.org/extensions/xep-0313.html#archive-metadata if you just want the id
-
MattJ
It's newer though, so not as widely deployed as original MAM stuff
-
lovetox
yes thats exactly what i wanted
-
lovetox
the question is for me though, its hard to do this without races
-
lovetox
i join a muc, now i send the query for the state of the archiv
-
lovetox
while this is in flight, new messages arrive
-
MattJ
With bind2 you get this automatically pushed to you to avoid the race. You're right that we need to do same with MUC.
-
Zash
I've been thinking that we ought to have something in the join stanza to indicate MUC support, better than <history maxstanzas=0> that might return some actually useful MAM info
-
Zash
Not sure what tho and I don't think I ever got any positive response to that, so I haven't pursued it
-
MattJ
Yeah, the archive metadata element 🙂
-
lovetox
yeah, that would be great
-
lovetox
i could do something like, send the iq, and when i receive a message while the IQ is in flight, i also know the end of the archive
-
lovetox
and simply ignore the response of the IQ
-
lovetox
i wonder if there could be races like, that iq response has a stanza-id in it, which is not yet delivered to me
-
lovetox
like i request the metadata, and the last stanza id is a message, that i will receive after the iq response