This commit is contained in:
Artemy
2026-03-01 18:10:21 +07:00
parent eab0d746b8
commit dc6bf14e43
3 changed files with 12 additions and 6 deletions
@@ -50,9 +50,9 @@ public class ChatNotificationService : IChatNotificationService
var privateChat = await _privateChatsRepository.GetByIdAsync(message.RecipientId);
var text = message.EncryptedContent.Substring(0, Math.Min(40, message.EncryptedContent.Length));
var userId = message.SenderId == privateChat.UserAId ? privateChat.UserAId : privateChat.UserBId;
var userId = message.SenderId == privateChat.UserAId ? privateChat.UserBId : privateChat.UserAId;
var profile = await _profileService.GetUserProfileAsync(userId);
var profile = await _profileService.GetUserProfileAsync(message.SenderId);
var title = profile.Username;
await _notificationService.SendToUserAsync(userId, title,text, "chat_messages");