|
|
@ -404,11 +404,7 @@ class EventPushActionsWorkerStore(ReceiptsWorkerStore, StreamWorkerStore, SQLBas |
|
|
|
SELECT e.room_id, notif_count, e.stream_ordering, e.thread_id, last_receipt_stream_ordering, |
|
|
|
SELECT e.room_id, notif_count, e.stream_ordering, e.thread_id, last_receipt_stream_ordering, |
|
|
|
ev.stream_ordering AS receipt_stream_ordering |
|
|
|
ev.stream_ordering AS receipt_stream_ordering |
|
|
|
FROM event_push_summary AS e |
|
|
|
FROM event_push_summary AS e |
|
|
|
INNER JOIN local_current_membership AS lcm ON ( |
|
|
|
INNER JOIN local_current_membership USING (user_id, room_id) |
|
|
|
e.user_id = lcm.user_id |
|
|
|
|
|
|
|
AND e.room_id = lcm.room_id |
|
|
|
|
|
|
|
AND lcm.membership = 'join' |
|
|
|
|
|
|
|
) |
|
|
|
|
|
|
|
LEFT JOIN receipts_linearized AS r ON ( |
|
|
|
LEFT JOIN receipts_linearized AS r ON ( |
|
|
|
e.user_id = r.user_id |
|
|
|
e.user_id = r.user_id |
|
|
|
AND e.room_id = r.room_id |
|
|
|
AND e.room_id = r.room_id |
|
|
@ -476,11 +472,7 @@ class EventPushActionsWorkerStore(ReceiptsWorkerStore, StreamWorkerStore, SQLBas |
|
|
|
SELECT e.room_id, e.stream_ordering, e.thread_id, |
|
|
|
SELECT e.room_id, e.stream_ordering, e.thread_id, |
|
|
|
ev.stream_ordering AS receipt_stream_ordering |
|
|
|
ev.stream_ordering AS receipt_stream_ordering |
|
|
|
FROM event_push_actions AS e |
|
|
|
FROM event_push_actions AS e |
|
|
|
INNER JOIN local_current_membership AS lcm ON ( |
|
|
|
INNER JOIN local_current_membership USING (user_id, room_id) |
|
|
|
e.user_id = lcm.user_id |
|
|
|
|
|
|
|
AND e.room_id = lcm.room_id |
|
|
|
|
|
|
|
AND lcm.membership = 'join' |
|
|
|
|
|
|
|
) |
|
|
|
|
|
|
|
LEFT JOIN receipts_linearized AS r ON ( |
|
|
|
LEFT JOIN receipts_linearized AS r ON ( |
|
|
|
e.user_id = r.user_id |
|
|
|
e.user_id = r.user_id |
|
|
|
AND e.room_id = r.room_id |
|
|
|
AND e.room_id = r.room_id |
|
|
@ -522,11 +514,7 @@ class EventPushActionsWorkerStore(ReceiptsWorkerStore, StreamWorkerStore, SQLBas |
|
|
|
SELECT e.room_id, e.stream_ordering, e.thread_id, |
|
|
|
SELECT e.room_id, e.stream_ordering, e.thread_id, |
|
|
|
ev.stream_ordering AS receipt_stream_ordering |
|
|
|
ev.stream_ordering AS receipt_stream_ordering |
|
|
|
FROM event_push_actions AS e |
|
|
|
FROM event_push_actions AS e |
|
|
|
INNER JOIN local_current_membership AS lcm ON ( |
|
|
|
INNER JOIN local_current_membership USING (user_id, room_id) |
|
|
|
e.user_id = lcm.user_id |
|
|
|
|
|
|
|
AND e.room_id = lcm.room_id |
|
|
|
|
|
|
|
AND lcm.membership = 'join' |
|
|
|
|
|
|
|
) |
|
|
|
|
|
|
|
LEFT JOIN receipts_linearized AS r ON ( |
|
|
|
LEFT JOIN receipts_linearized AS r ON ( |
|
|
|
e.user_id = r.user_id |
|
|
|
e.user_id = r.user_id |
|
|
|
AND e.room_id = r.room_id |
|
|
|
AND e.room_id = r.room_id |
|
|
|