|
|
@ -124,18 +124,19 @@ class HttpHandler(BaseHTTPRequestHandler): |
|
|
|
if swap_client._show_notifications: |
|
|
|
if swap_client._show_notifications: |
|
|
|
args_dict['notifications'] = swap_client.getNotifications() |
|
|
|
args_dict['notifications'] = swap_client.getNotifications() |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# TODO: Remove _withids |
|
|
|
if 'messages' in args_dict: |
|
|
|
if 'messages' in args_dict: |
|
|
|
messages_with_ids = [] |
|
|
|
messages_with_ids = [] |
|
|
|
for msg in args_dict['messages']: |
|
|
|
for msg in args_dict['messages']: |
|
|
|
messages_with_ids.append((self.server.msg_id_counter, msg)) |
|
|
|
messages_with_ids.append((self.server.msg_id_counter, msg)) |
|
|
|
self.server.msg_id_counter += 1 |
|
|
|
self.server.msg_id_counter += 1 |
|
|
|
args_dict['messages'] = messages_with_ids |
|
|
|
args_dict['messages_withids'] = messages_with_ids |
|
|
|
if 'err_messages' in args_dict: |
|
|
|
if 'err_messages' in args_dict: |
|
|
|
err_messages_with_ids = [] |
|
|
|
err_messages_with_ids = [] |
|
|
|
for msg in args_dict['err_messages']: |
|
|
|
for msg in args_dict['err_messages']: |
|
|
|
err_messages_with_ids.append((self.server.msg_id_counter, msg)) |
|
|
|
err_messages_with_ids.append((self.server.msg_id_counter, msg)) |
|
|
|
self.server.msg_id_counter += 1 |
|
|
|
self.server.msg_id_counter += 1 |
|
|
|
args_dict['err_messages'] = err_messages_with_ids |
|
|
|
args_dict['err_messages_withids'] = err_messages_with_ids |
|
|
|
|
|
|
|
|
|
|
|
if self.server.msg_id_counter >= 0x7FFFFFFF: |
|
|
|
if self.server.msg_id_counter >= 0x7FFFFFFF: |
|
|
|
self.server.msg_id_counter = 0 |
|
|
|
self.server.msg_id_counter = 0 |
|
|
|