XSF Discussion - 2021-01-09


  1. jonas’

    was xmpp:user:password@domain.example valid or not?

  2. MattJ

    xmpp://user:password@domain.example should be, I don't think xmpp: is, no

  3. jonas’

    thanks

  4. Zash

    For some value of "valid" that may include "deprecated for a decade"... 😕

  5. Zash

    Without replacement, since passing credentials around like that is not that great.

  6. Zash

    🤷️

  7. MattJ

    Yes, better embed them in JSON instead ;)

  8. MattJ hides

  9. Zash

    Still supported by URI/URL parsers tho.. so I'd lean towards the sorta-standardized over made up JSON formats.

  10. Zash

    Re https://xmpp.org/extensions/xep-0313.html#query-limit-id Those two queries should give the same results if they had 'after-id' in RSM instead?

  11. lovetox

    hm no the second would not end at the before id

  12. Zash

    Wouldn't that be subject to page sizes in both cases?

  13. lovetox

    only because a page is finished

  14. lovetox

    does not mean you get a complete=true iq

  15. lovetox

    not sure what you are after, of course you can get the same messages with rsm, and then simply abort once you reach that stanza-id

  16. lovetox

    but that is a bit weird given that this is a query protocol

  17. lovetox

    do you make open ended SQL queries and abort once you think your done?

  18. lovetox

    no you query exactly what you need, start -> end

  19. lovetox

    and thats what these filter options allow now

  20. Zash

    In this code, the RSM before/after was translated to SQL WHERE. after-id and before-id would too.

  21. Zash

    Or would it? That's the question.

  22. Zash

    `WHERE id > (rsm.after OR after-id) AND id < (rsm.before OR before-id)` or somesuch

  23. lovetox

    there is no rsm before AND after

  24. lovetox

    its either or

  25. Zash

    That's not the point

  26. lovetox

    if i understand you correctly you try to translate something, that cant be translated

  27. lovetox

    the second example in the xep is not doable with rsm in an efficient manner

  28. lovetox

    you could get lucky with the page size ending exactly on that stanza-id, and then you could abort

  29. lovetox

    but thats luck

  30. Zash

    form.before-id=09af3-cc343-b409f rsm.after=28482-98726-73623

  31. lovetox

    yes thats equivalent

  32. lovetox

    now i understand you

  33. Zash

    🙂

  34. lovetox

    rsm after == form after-id

  35. lovetox

    so it does not matter which of the two you set

  36. lovetox

    of course this depends on the implementation on the server

  37. lovetox

    if the server like prosody only querys exactly the page it servs, then its equivalent

  38. lovetox

    if some server would maybe prepare the whole result set, then this is performance wise maybe not equivalent

  39. Zash

    One difference I can think of is how the rsm count field is calculated. I'm assuming that should be calculated/estimated while ignoring the RSM bits

  40. lovetox

    hm but count is a rsm feature

  41. lovetox

    would be weird to igore the other rsm fields

  42. lovetox

    hm no the XEP says it has to show the ful result set

  43. lovetox

    yes, without the mam filter fields you would have to calc the count on each rsm query again

  44. lovetox

    hm no only in the case no filter option was given

  45. lovetox

    i dont see how this changes something Zash

  46. lovetox

    count should always depend on the mam filter fields

  47. lovetox

    now there are more filter fields but thats it

  48. lovetox

    if i do a mam query without filters, no start date, no end date, the typical sign on and catchup after stanza-id

  49. lovetox

    then count should be the count of all messages in the database for that account

  50. Zash

    yes. count should reflect how many messages match the base mam query.