1
0
mirror of https://github.com/haiwen/seahub.git synced 2025-09-14 06:11:16 +00:00

[api2] Fix some bugs

1. user last message timestamp
2. user messages while none
This commit is contained in:
poetwang
2014-04-17 10:56:31 +08:00
parent 416f42e064
commit f0de19eb58
2 changed files with 3 additions and 4 deletions

View File

@@ -197,8 +197,8 @@ def get_group_and_contacts(email):
group_json.append(group)
for contact in contacts:
msg = UserMessage.objects.get_messages_related_to_user(
contact).order_by('-timestamp')[:1]
msg = UserMessage.objects.get_messages_between_users(
contact, email).order_by('-timestamp')[:1]
mtime = 0
if len(msg) >= 1:
mtime = get_timestamp(msg[0].timestamp)