// SPDX-License-Identifier: AGPL-3.0-or-later // Copyright (C) 2022-2026 Aykut Alparslan KOC using Ferrite.TL; using Ferrite.TL.baseLayer; using Ferrite.TL.baseLayer.dto; namespace Ferrite.Data.Repositories; public interface IChannelMessagesRepository { public bool PutMessage(long channelId, TLMessage message, int pts); public ValueTask GetMessageAsync(long channelId, int messageId); public ValueTask> GetMessagesAsync(long channelId, int minId = 0, int maxId = 0); public ValueTask> GetMessagesByPtsAsync(long channelId, int minPts, int maxPts = 0); public bool PutUpdate(long channelId, int pts, TLUpdate update); public ValueTask> GetUpdatesByPtsAsync(long channelId, int minPts, int maxPts = 0); public ValueTask DeleteMessageAsync(long channelId, int messageId); public bool DeleteMessages(long channelId); public bool PutReadState(TLChannelReadState readState); public ValueTask GetReadStateAsync(long userId, long channelId); public bool DeleteReadState(long userId, long channelId); }