Files
Govor/Govor.Domain/Models/Reactions/DefaultReactionPack.cs
T
Artemy 29cc51ee0c Add reactions, reliable push & session checks
Implements message reactions and reaction packs (domain models, services, admin HTTP API, media processing via ImageSharp and limits) and adds reliable push delivery (ChatPushNotification, ChatPushDispatcher, ChatPushWorker, improved ChatNotificationService). Enhances message reading (ReadChat API, unread counts, concurrency-safe receipts) and tightens session security (access-token session validation in JWT, hub filter, SessionAuthorization). Improves SignalR behavior (session groups, reaction/channel events, hub/error mappings). Adds EF migrations, many controller fixes (Forbid handling, password API), tests (Govor.Server.Tests), docs, CI and tooling updates (Dockerfile → .NET 10, GH Actions matrix for sqlite/postgres, Govor.Server.slnx, global.json), and small infra changes (AutoMapper bump, NullPushProvider, storage/token handling).
2026-10-03 17:42:24 +07:00

20 lines
964 B
C#

namespace Govor.Domain.Models.Reactions;
public static class DefaultReactionPack
{
public static readonly Guid Id = Guid.Parse("b3000000-0000-0000-0000-000000000001");
private static readonly DateTime CreatedAt = new(2026, 10, 3, 0, 0, 0, DateTimeKind.Utc);
public static ReactionPack Create() => new()
{
Id = Id, Name = "Emoji", Description = "Default public emoji reactions",
ShareCode = "default", IsDefault = true, IsEnabled = true, CreatedAt = CreatedAt
};
public static ReactionItem[] Items() => new[] { "👍", "👎", "❤️", "🔥", "🥰", "👏", "😁", "🤔", "😢", "🎉", "🤯", "🙏" }
.Select((emoji, index) => new ReactionItem
{
Id = Guid.Parse($"b3000000-0000-0000-0001-{index + 1:000000000000}"),
PackId = Id, Code = emoji, Name = emoji, Emoji = emoji,
Kind = ReactionKind.Emoji, IsEnabled = true, CreatedAt = CreatedAt
}).ToArray();
}