fix: notice anonymous user
This commit is contained in:
@ -26,6 +26,7 @@ class NoticeManager:
|
|||||||
'user': ProfileSerializer(consumer.user.profilemodel).data})
|
'user': ProfileSerializer(consumer.user.profilemodel).data})
|
||||||
|
|
||||||
def remove(self, consumer: NoticeConsumer):
|
def remove(self, consumer: NoticeConsumer):
|
||||||
|
if consumer.user.is_authenticated:
|
||||||
for friend in consumer.user.profilemodel.get_friends():
|
for friend in consumer.user.profilemodel.get_friends():
|
||||||
self.notify_user(friend.user, {'type': 'offline',
|
self.notify_user(friend.user, {'type': 'offline',
|
||||||
'user': ProfileSerializer(consumer.user.profilemodel).data})
|
'user': ProfileSerializer(consumer.user.profilemodel).data})
|
||||||
|
Reference in New Issue
Block a user