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:
@@ -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)
|
||||
|
@@ -2632,8 +2632,7 @@ class UserMsgsView(APIView):
|
||||
'to_email' : to_email,
|
||||
'next_page' : next_page,
|
||||
'msgs' : [],})
|
||||
|
||||
if person_msgs.has_next():
|
||||
elif person_msgs.has_next():
|
||||
next_page = person_msgs.next_page_number()
|
||||
|
||||
msgs = []
|
||||
|
Reference in New Issue
Block a user