fix unread mesage from a deleted account
This commit is contained in:
@ -6,7 +6,7 @@
|
||||
# By: tomoron <tomoron@student.42.fr> +#+ +:+ +#+ #
|
||||
# +#+#+#+#+#+ +#+ #
|
||||
# Created: 2024/09/28 20:03:49 by tomoron #+# #+# #
|
||||
# Updated: 2024/09/29 03:09:32 by tomoron ### ########.fr #
|
||||
# Updated: 2024/11/15 22:00:54 by tomoron ### ########.fr #
|
||||
# #
|
||||
# **************************************************************************** #
|
||||
|
||||
@ -19,7 +19,7 @@ def getUnreadStatus(uid):
|
||||
if(uid == None or uid == 0):
|
||||
return(False)
|
||||
user = User.objects.get(id=uid)
|
||||
return(Message.objects.filter(Q(to=user) & Q(read=False)).exists())
|
||||
return(Message.objects.filter(Q(to=user) & Q(read=False) & Q(sender__isnull=False)).exists())
|
||||
|
||||
async def statusMessage(socket,content):
|
||||
try:
|
||||
|
Reference in New Issue
Block a user