mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-05-02 12:56:02 -04:00
Replace returnValue with return (#5736)
This commit is contained in:
parent
18a466b84e
commit
4806651744
177 changed files with 1359 additions and 1513 deletions
|
@ -69,7 +69,7 @@ class SearchHandler(BaseHandler):
|
|||
# Scan through the old room for further predecessors
|
||||
room_id = predecessor["room_id"]
|
||||
|
||||
defer.returnValue(historical_room_ids)
|
||||
return historical_room_ids
|
||||
|
||||
@defer.inlineCallbacks
|
||||
def search(self, user, content, batch=None):
|
||||
|
@ -186,13 +186,11 @@ class SearchHandler(BaseHandler):
|
|||
room_ids.intersection_update({batch_group_key})
|
||||
|
||||
if not room_ids:
|
||||
defer.returnValue(
|
||||
{
|
||||
"search_categories": {
|
||||
"room_events": {"results": [], "count": 0, "highlights": []}
|
||||
}
|
||||
return {
|
||||
"search_categories": {
|
||||
"room_events": {"results": [], "count": 0, "highlights": []}
|
||||
}
|
||||
)
|
||||
}
|
||||
|
||||
rank_map = {} # event_id -> rank of event
|
||||
allowed_events = []
|
||||
|
@ -455,4 +453,4 @@ class SearchHandler(BaseHandler):
|
|||
if global_next_batch:
|
||||
rooms_cat_res["next_batch"] = global_next_batch
|
||||
|
||||
defer.returnValue({"search_categories": {"room_events": rooms_cat_res}})
|
||||
return {"search_categories": {"room_events": rooms_cat_res}}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue