fix: align backend APIs and upload flow

This commit is contained in:
2026-09-11 18:18:59 +08:00
parent 32177a7293
commit 898cf5dba0
69 changed files with 1081 additions and 153 deletions
+15 -16
View File
@@ -57,24 +57,22 @@ namespace MessageService.Domain.Entities
AddDomainEvent(new ConversationCreatedDomainEvent(this));
}
public void Update(long? LastReadSequenceId = default, int? unreadCount = default, string? lastMsg = default)
public void SetLastReadSequence(long sequenceId)
{
if (LastReadSequenceId != null)
{
LastReadSequenceId = LastReadSequenceId.Value;
this.NotifyModified();
}
if (unreadCount != null)
{
UnreadCount += unreadCount.Value;
NotifyModified();
}
LastReadSequenceId = sequenceId;
NotifyModified();
}
if (lastMsg != null)
{
LastMessage = lastMsg;
NotifyModified();
}
public void IncrementUnread()
{
UnreadCount += 1;
NotifyModified();
}
public void UpdateLastMessage(string lastMessage)
{
LastMessage = lastMessage;
NotifyModified();
}
@@ -86,6 +84,7 @@ namespace MessageService.Domain.Entities
UnreadCount = 0;
if (lastReadSequenceId.HasValue)
LastReadSequenceId = lastReadSequenceId.Value;
NotifyModified();
}
public void UpdateProfile(string name, string avatar)