Skip to content

Commit

Permalink
rref #5367
Browse files Browse the repository at this point in the history
rref #5366

ref #66
ref #65
  • Loading branch information
evrenesat committed Jul 19, 2016
1 parent 86c5fa8 commit 09da78b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions zengine/messaging/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -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()]
}
Expand Down Expand Up @@ -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):
Expand Down
4 changes: 2 additions & 2 deletions zengine/tornado_server/ws_to_queue.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)

0 comments on commit 09da78b

Please sign in to comment.