♻️ Refactor notification meta
This commit is contained in:
@@ -241,10 +241,10 @@ public partial class ChatService(
|
||||
Body = !string.IsNullOrEmpty(message.Content)
|
||||
? message.Content[..Math.Min(message.Content.Length, 100)]
|
||||
: "<no content>",
|
||||
Meta = GrpcTypeHelper.ConvertObjectToByteString(metaDict),
|
||||
ActionUri = $"/chat/{room.Id}",
|
||||
IsSavable = false,
|
||||
};
|
||||
notification.Meta.Add(GrpcTypeHelper.ConvertToValueMap(metaDict));
|
||||
|
||||
List<Account> accountsToNotify = [];
|
||||
foreach (var member in members)
|
||||
|
@@ -78,10 +78,10 @@ public class PublisherSubscriptionService(
|
||||
Topic = "posts.new",
|
||||
Title = localizer["PostSubscriptionTitle", post.Publisher.Name, title],
|
||||
Body = message,
|
||||
Meta = GrpcTypeHelper.ConvertObjectToByteString(data),
|
||||
IsSavable = true,
|
||||
ActionUri = $"/posts/{post.Id}"
|
||||
};
|
||||
notification.Meta.Add(GrpcTypeHelper.ConvertToValueMap(data));
|
||||
|
||||
// Notify each subscriber
|
||||
var notifiedCount = 0;
|
||||
|
Reference in New Issue
Block a user