Brendan Abolivier 855af069a4
Fix instantiation of message retention purge jobs
When figuring out which topological token to start a purge job at, we
need to do the following:

1. Figure out a timestamp before which events will be purged
2. Select the first stream ordering after that timestamp
3. Select info about the first event after that stream ordering
4. Build a topological token from that info

In some situations (e.g. quiet rooms with a short max_lifetime), there
might not be an event after the stream ordering at step 3, therefore we
abort the purge with the error `No event found`. To mitigate that, this
patch fetches the first event _before_ the stream ordering, instead of
after.
2020-01-15 18:56:18 +00:00
..
2020-01-13 12:48:22 +00:00
2020-01-12 21:53:47 +00:00
2019-10-02 05:29:01 -07:00
2019-12-31 11:01:06 +00:00
2019-09-12 11:42:47 +01:00
2019-12-12 15:21:12 +00:00
2020-01-09 11:39:29 +00:00
2019-12-05 17:58:25 +00:00
2019-06-20 19:32:02 +10:00
2019-12-18 10:45:12 +00:00