@@ -791,7 +791,7 @@ func (s *Server) SendMessage(ctx context.Context, req *chatpb.SendMessageRequest
791
791
}
792
792
793
793
s .onPersistChatMessage (log , chatId , chatMessage )
794
- s .sendPushNotifications (chatId , chatTitle , chatMessage )
794
+ s .sendPushNotifications (chatId , chatTitle , memberId , chatMessage )
795
795
796
796
return & chatpb.SendMessageResponse {
797
797
Result : chatpb .SendMessageResponse_OK ,
@@ -1409,7 +1409,7 @@ func (s *Server) onPersistChatMessage(log *logrus.Entry, chatId chat.ChatId, cha
1409
1409
}
1410
1410
}
1411
1411
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 ) {
1413
1413
log := s .log .WithFields (logrus.Fields {
1414
1414
"method" : "sendPushNotifications" ,
1415
1415
"chat_id" : chatId .String (),
@@ -1426,7 +1426,7 @@ func (s *Server) sendPushNotifications(chatId chat.ChatId, chatTitle string, mes
1426
1426
eg .SetLimit (min (32 , len (members )))
1427
1427
1428
1428
for _ , m := range members {
1429
- if m .IsMuted || m .IsUnsubscribed {
1429
+ if m .MemberId == sender || m . IsMuted || m .IsUnsubscribed {
1430
1430
continue
1431
1431
}
1432
1432
0 commit comments