-
edhelas
hey
-
edhelas
from the MAM XEP
-
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.
-
edhelas
(I have issues to publish messages there)
-
edhelas
so, I was asking if there was not a typo there, i should not be "filter out messages _after_ a certain date/time" ?
-
edhelas
*it
-
MattJ
filter *out* message before a certain time
-
edhelas
(there is hell of a delay to publish messages on the room)
-
MattJ
Oh?
-
MattJ
Working fine here
-
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"
-
edhelas
then I can properly request pages in the history by scrolling up
-
Holger
edhelas: You use plain XEP-0059 for that. `<before>$id</before>`
-
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?
-
Holger
edhelas: > `<before>$id</before>` Or simply `<before/>` without `$id` if you want the most recent messages.
-
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
-
Holger
The answer is different.
-
edhelas
ah
-
Holger
With before you get the latest.
-
Holger
start/end just adds filters on top.
-
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/>.
-
MattJ
Holger: the original use case for timestamp was literally for querying specific time ranges, e.g. a calendar view or something
-
Holger
Ah, makes sense.