Notifications accept.

This commit is contained in:
retoor 2025-03-05 18:17:43 +01:00
parent afbf53938b
commit 8d3d7327d7

View File

@ -21,6 +21,7 @@ class NotificationService(BaseService):
model["object_type"] = object_type
model["user_uid"] = user_uid
model["message"] = message
model['new_count'] = 1337
if await self.save(model):
return model
raise Exception(f"Failed to create notification: {model.errors}.")
@ -40,7 +41,7 @@ class NotificationService(BaseService):
channel_member['new_count'] = 0
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"