// SPDX-License-Identifier: AGPL-3.0-or-later // Copyright (C) 2022-2026 Aykut Alparslan KOC using Ferrite.TL.baseLayer.dto; namespace Ferrite.Data.Repositories; public static class MessageIdentityBox { public const int Logical = 0; public const int Channel = 1; } public readonly record struct MessageIdentity(int BoxType, long BoxId, int MessageId) { public static MessageIdentity ForLogical(long logicalId) => new(MessageIdentityBox.Logical, logicalId, 0); public static MessageIdentity ForChannel(long channelId, int messageId) => new(MessageIdentityBox.Channel, channelId, messageId); } public interface IMessageInteractionsRepository { bool PutViewReceipt(TLMessageViewReceipt receipt); ValueTask GetViewReceiptAsync(MessageIdentity identity, long userId); ValueTask> GetViewReceiptsAsync( MessageIdentity identity); bool PutInteractionInfo(TLMessageInteractionInfo info); ValueTask GetInteractionInfoAsync( MessageIdentity identity); bool DeleteInteractions(MessageIdentity identity); }