Notifications accept.
This commit is contained in:
		
							parent
							
								
									d7851e6457
								
							
						
					
					
						commit
						e1324e99bf
					
				| @ -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( | ||||
|  | ||||
| @ -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" | ||||
|  | ||||
		Loading…
	
		Reference in New Issue
	
	Block a user