XSF Discussion - 2021-10-02


  1. edhelas

    hey

  2. edhelas

    from the MAM XEP

  3. edhelas

    > The 'start' field is used to filter out messages before a certain date/time. If specified, a server MUST only return messages whose timestamp is equal to or later than the given timestamp.

  4. edhelas

    (I have issues to publish messages there)

  5. edhelas

    so, I was asking if there was not a typo there, i should not be "filter out messages _after_ a certain date/time" ?

  6. edhelas

    *it

  7. MattJ

    filter *out* message before a certain time

  8. edhelas

    (there is hell of a delay to publish messages on the room)

  9. MattJ

    Oh?

  10. MattJ

    Working fine here

  11. edhelas

    to be sure, if I send a MAM request with a <end> but without a start AND a max=50 it will return : "only the 50 latest messages before the end date"

  12. edhelas

    then I can properly request pages in the history by scrolling up

  13. Holger

    edhelas: You use plain XEP-0059 for that. `<before>$id</before>`

  14. Holger

    Not sure about the use cases for filtering by timestamp. Maybe restrictions such as "don't return messages older than two weeks" in order to avoid a flood of MAM messages?

  15. Holger

    edhelas: > `<before>$id</before>` Or simply `<before/>` without `$id` if you want the most recent messages.

  16. edhelas

    with before/end, the question is the same, if there is no start/after at all, but with max, will it only take the 50 latest messages before the end date/before_id

  17. Holger

    The answer is different.

  18. edhelas

    ah

  19. Holger

    With before you get the latest.

  20. Holger

    start/end just adds filters on top.

  21. Holger

    max will limit to the first n messages before or after the specified ID depending on whether your '59 request says <before/> or <after/>.

  22. MattJ

    Holger: the original use case for timestamp was literally for querying specific time ranges, e.g. a calendar view or something

  23. Holger

    Ah, makes sense.