mirror of
https://git.anonymousland.org/anonymousland/synapse-product.git
synced 2024-12-20 10:44:19 -05:00
Err, defer.gatherResults ftw
This commit is contained in:
parent
acb12cc811
commit
807229f2f2
@ -303,27 +303,18 @@ class MessageHandler(BaseHandler):
|
|||||||
if event.membership != Membership.JOIN:
|
if event.membership != Membership.JOIN:
|
||||||
return
|
return
|
||||||
try:
|
try:
|
||||||
# (messages, token), current_state = yield defer.gatherResults(
|
(messages, token), current_state = yield defer.gatherResults(
|
||||||
# [
|
[
|
||||||
# self.store.get_recent_events_for_room(
|
self.store.get_recent_events_for_room(
|
||||||
# event.room_id,
|
|
||||||
# limit=limit,
|
|
||||||
# end_token=now_token.room_key,
|
|
||||||
# ),
|
|
||||||
# self.state_handler.get_current_state(
|
|
||||||
# event.room_id
|
|
||||||
# ),
|
|
||||||
# ]
|
|
||||||
# ).addErrback(unwrapFirstError)
|
|
||||||
|
|
||||||
messages, token = yield self.store.get_recent_events_for_room(
|
|
||||||
event.room_id,
|
event.room_id,
|
||||||
limit=limit,
|
limit=limit,
|
||||||
end_token=now_token.room_key,
|
end_token=now_token.room_key,
|
||||||
)
|
),
|
||||||
current_state = yield self.state_handler.get_current_state(
|
self.state_handler.get_current_state(
|
||||||
event.room_id
|
event.room_id
|
||||||
)
|
),
|
||||||
|
]
|
||||||
|
).addErrback(unwrapFirstError)
|
||||||
|
|
||||||
start_token = now_token.copy_and_replace("room_key", token[0])
|
start_token = now_token.copy_and_replace("room_key", token[0])
|
||||||
end_token = now_token.copy_and_replace("room_key", token[1])
|
end_token = now_token.copy_and_replace("room_key", token[1])
|
||||||
|
Loading…
Reference in New Issue
Block a user