diff options
author | Amber Brown <hawkowl@atleastfornow.net> | 2018-09-07 00:22:23 +1000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-09-07 00:22:23 +1000 |
commit | 2608ebc04c8b7ffb3417eeb720801d70ddc7dccd (patch) | |
tree | 44cf4eae9b110f8f59af56ea1e302676b0fb1083 /synapse/handlers/search.py | |
parent | Merge branch 'master' into develop (diff) | |
download | synapse-2608ebc04c8b7ffb3417eeb720801d70ddc7dccd.tar.xz |
Port handlers/ to Python 3 (#3803)
Diffstat (limited to 'synapse/handlers/search.py')
-rw-r--r-- | synapse/handlers/search.py | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/synapse/handlers/search.py b/synapse/handlers/search.py index c464adbd0b..0c1d52fd11 100644 --- a/synapse/handlers/search.py +++ b/synapse/handlers/search.py @@ -54,7 +54,7 @@ class SearchHandler(BaseHandler): batch_token = None if batch: try: - b = decode_base64(batch) + b = decode_base64(batch).decode('ascii') batch_group, batch_group_key, batch_token = b.split("\n") assert batch_group is not None @@ -258,18 +258,18 @@ class SearchHandler(BaseHandler): # it returns more from the same group (if applicable) rather # than reverting to searching all results again. if batch_group and batch_group_key: - global_next_batch = encode_base64("%s\n%s\n%s" % ( + global_next_batch = encode_base64(("%s\n%s\n%s" % ( batch_group, batch_group_key, pagination_token - )) + )).encode('ascii')) else: - global_next_batch = encode_base64("%s\n%s\n%s" % ( + global_next_batch = encode_base64(("%s\n%s\n%s" % ( "all", "", pagination_token - )) + )).encode('ascii')) for room_id, group in room_groups.items(): - group["next_batch"] = encode_base64("%s\n%s\n%s" % ( + group["next_batch"] = encode_base64(("%s\n%s\n%s" % ( "room_id", room_id, pagination_token - )) + )).encode('ascii')) allowed_events.extend(room_events) |