1.3.6 add unanswered_msgs_count to all responses

This commit is contained in:
SDE
2024-06-29 14:44:19 +03:00
parent 75258f1706
commit 0e184f0b87
12 changed files with 147 additions and 45 deletions

View File

@@ -17,6 +17,9 @@ from AuthApp.funcs import get_user_timezone_Dict
def get_unanswered_msgs_count_for_user(user):
if not user or not user.is_authenticated:
return 0
msgs = Message.objects.filter(receiver=user, status='sended', group=None)
return msgs.count()