Fix chat update last seen bug
This commit is contained in:
parent
860560eb34
commit
5391304e12
1 changed files with 4 additions and 3 deletions
|
@ -375,7 +375,8 @@ def get_or_create_room(request):
|
|||
# TODO: each user can only create <= 300 rooms
|
||||
room = get_room(other_user, user)
|
||||
for u in [other_user, user]:
|
||||
user_room, _ = UserRoom.objects.get_or_create(user=u, room=room)
|
||||
user_room, created = UserRoom.objects.get_or_create(user=u, room=room)
|
||||
if created:
|
||||
user_room.last_seen = timezone.now()
|
||||
user_room.save()
|
||||
|
||||
|
|
Loading…
Reference in a new issue