|
@@ -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)
|
|
|
|