Notifications accept.

This commit is contained in:
retoor 2025-03-05 18:05:34 +01:00
parent d7851e6457
commit e1324e99bf
2 changed files with 4 additions and 3 deletions

View File

@ -17,7 +17,10 @@ class ChatService(BaseService):
message
)
channel_message_uid = channel_message["uid"]
if not channel_message['new_count']:
channel_message['new_count'] = 0
channel_message['new_count'] += 1
await self.services.channel_message.save(channel_message)
user = await self.services.user.get(uid=user_uid)
await self.services.notification.create_channel_message(channel_message_uid)
sent_to_count = await self.services.socket.broadcast(channel_uid, dict(

View File

@ -36,8 +36,6 @@ class NotificationService(BaseService):
is_muted=False,
deleted_at=None,
):
channel_member['new_count'] += 1
await self.services.channel_member.save(channel_member)
model = await self.new()
model["object_uid"] = channel_message_uid
model["object_type"] = "channel_message"