jdev - 2023-07-22

  1. 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.

  2. singpolyma

    atomicwatch: yes, unless you ask it not to

  3. atomicwatch

    got it thanks

  4. singpolyma

    You can also ask for a certain number of messages or messages since some time

  5. singpolyma

    MAM allows for pagination and other optimizations, but it's never been needed just to get room history

  6. MattJ

    That's the "old" history method. Most clients disable it in favour of using MAM these days.

  7. 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

  8. lovetox

    thanks theTedd will check it out

  9. lovetox

    is it possible to query the last message in a mam archive?

  10. Zash

    https://xmpp.org/extensions/xep-0313.html#sect-idm46703187351248 like that?

  11. Zash

    max=1 you want only the very last single message

  12. lovetox

    ah great thanks

  13. MattJ

    There is also https://xmpp.org/extensions/xep-0313.html#archive-metadata if you just want the id

  14. MattJ

    It's newer though, so not as widely deployed as original MAM stuff

  15. lovetox

    yes thats exactly what i wanted

  16. lovetox

    the question is for me though, its hard to do this without races

  17. lovetox

    i join a muc, now i send the query for the state of the archiv

  18. lovetox

    while this is in flight, new messages arrive

  19. 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.

  20. 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

  21. Zash

    Not sure what tho and I don't think I ever got any positive response to that, so I haven't pursued it

  22. MattJ

    Yeah, the archive metadata element 🙂

  23. lovetox

    yeah, that would be great

  24. 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

  25. lovetox

    and simply ignore the response of the IQ

  26. 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

  27. lovetox

    like i request the metadata, and the last stanza id is a message, that i will receive after the iq response