mirror of
https://github.com/Govor-team/Govor.git
synced 2026-07-21 19:54:55 +00:00
Refactor message loading API and add message query support
Reworked message loading endpoints and services to support flexible message querying with 'before' and 'after' parameters via a new MessageQuery contract. Updated controller actions, service interfaces, and implementations to use the new query model, and improved error handling. Added integration tests for ChatLoadController and introduced IUserPresenceService interface. Minor fixes and help text improvements in console client commands.
This commit is contained in:
@@ -4,6 +4,6 @@ namespace Govor.Application.Interfaces;
|
||||
|
||||
public interface IMessagesLoader
|
||||
{
|
||||
Task<List<Message>> LoadLastMessagesInUserChat(Guid userId,Guid currentId, Guid? startMessageId, int pageSize = 20);
|
||||
Task<List<Message>> LoadLastMessagesInChatGroup(Guid chatId,Guid currentId, Guid? startMessageId, int pageSize = 20);
|
||||
Task<List<Message>> LoadMessagesInUserChat(Guid userId,Guid currentId, Guid? startMessageId, int before = 20, int after = 2);
|
||||
Task<List<Message>> LoadMessagesInChatGroup(Guid chatId,Guid currentId, Guid? startMessageId, int before = 20, int after = 2);
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
namespace Govor.Application.Interfaces;
|
||||
|
||||
public interface IUserPresenceService
|
||||
{
|
||||
DateTime WhenUserWasOnline(Guid userId);
|
||||
}
|
||||
Reference in New Issue
Block a user