diff --git a/zengine/messaging/views.py b/zengine/messaging/views.py index 5d6ae1e9..390fd6a3 100644 --- a/zengine/messaging/views.py +++ b/zengine/messaging/views.py @@ -157,7 +157,7 @@ def show_channel(current): 'member_list': [{'name': sb.user.full_name, 'is_online': sb.user.is_online(), 'avatar_url': sb.user.get_avatar_url() - } for sb in ch.subscriber_set], + } for sb in ch.subscriber_set.objects.filter()], 'last_messages': [msg.serialize(current.user) for msg in ch.get_last_messages()] } @@ -411,7 +411,7 @@ def search_user(current): } for user in UserModel(current).objects.search_on(*settings.MESSAGING_USER_SEARCH_FIELDS, contains=current.input['query']): - current.output['results'].append((user.full_name, user.key, user.avatar)) + current.output['results'].append((user.full_name, user.key, user.get_avatar_url())) def search_unit(current): diff --git a/zengine/tornado_server/ws_to_queue.py b/zengine/tornado_server/ws_to_queue.py index cf8e9f4b..037333e3 100644 --- a/zengine/tornado_server/ws_to_queue.py +++ b/zengine/tornado_server/ws_to_queue.py @@ -268,13 +268,13 @@ def on_message(self, channel, method, header, body): if user_id in self.websockets: log.info("write msg to client") self.websockets[user_id].write_message(body) - channel.basic_ack(delivery_tag=method.delivery_tag) + # channel.basic_ack(delivery_tag=method.delivery_tag) elif 'sessid_to_userid' in body: reply = json_decode(body) sys.sessid_to_userid[reply['sess_id']] = reply['user_id'] self.websockets[reply['user_id']] = self.websockets[reply['sess_id']] del self.websockets[reply['sess_id']] - channel.basic_ack(delivery_tag=method.delivery_tag) + channel.basic_ack(delivery_tag=method.delivery_tag) # else: # channel.basic_reject(delivery_tag=method.delivery_tag)