@@ -791,7 +791,7 @@ func (s *Server) SendMessage(ctx context.Context, req *chatpb.SendMessageRequest
791791 }
792792
793793 s .onPersistChatMessage (log , chatId , chatMessage )
794- s .sendPushNotifications (chatId , chatTitle , chatMessage )
794+ s .sendPushNotifications (chatId , chatTitle , memberId , chatMessage )
795795
796796 return & chatpb.SendMessageResponse {
797797 Result : chatpb .SendMessageResponse_OK ,
@@ -1409,7 +1409,7 @@ func (s *Server) onPersistChatMessage(log *logrus.Entry, chatId chat.ChatId, cha
14091409 }
14101410}
14111411
1412- func (s * Server ) sendPushNotifications (chatId chat.ChatId , chatTitle string , message * chatpb.ChatMessage ) {
1412+ func (s * Server ) sendPushNotifications (chatId chat.ChatId , chatTitle string , sender chat. MemberId , message * chatpb.ChatMessage ) {
14131413 log := s .log .WithFields (logrus.Fields {
14141414 "method" : "sendPushNotifications" ,
14151415 "chat_id" : chatId .String (),
@@ -1426,7 +1426,7 @@ func (s *Server) sendPushNotifications(chatId chat.ChatId, chatTitle string, mes
14261426 eg .SetLimit (min (32 , len (members )))
14271427
14281428 for _ , m := range members {
1429- if m .IsMuted || m .IsUnsubscribed {
1429+ if m .MemberId == sender || m . IsMuted || m .IsUnsubscribed {
14301430 continue
14311431 }
14321432
0 commit comments