Fix emoji sending and self push notifications
This commit is contained in:
@@ -26,6 +26,12 @@ public sealed class FirebasePushNotificationService(
|
||||
public async Task SendNewMessageAsync(Chat chat, Message message, CancellationToken cancellationToken)
|
||||
{
|
||||
var qmax = options.Value;
|
||||
if (message.Direction != MessageDirection.Incoming)
|
||||
{
|
||||
logger.LogDebug("Skipping push for non-incoming message {MessageId} in chat {ChatId}.", message.Id, chat.Id);
|
||||
return;
|
||||
}
|
||||
|
||||
if (!qmax.PushEnabled || chat.IsMuted)
|
||||
{
|
||||
return;
|
||||
@@ -70,7 +76,8 @@ public sealed class FirebasePushNotificationService(
|
||||
["body"] = body,
|
||||
["chatId"] = chat.Id.ToString(),
|
||||
["messageId"] = message.Id.ToString(),
|
||||
["chatTitle"] = chat.Title
|
||||
["chatTitle"] = chat.Title,
|
||||
["direction"] = message.Direction.ToString()
|
||||
};
|
||||
|
||||
foreach (var device in devices)
|
||||
|
||||
Reference in New Issue
Block a user