前端:

1、更新界面图标
2、修改消息缓存逻辑
3、新增清空未读消息数
后端:
1、修复不同时区导致的时间显示问题
2、新增清空未读消息数接口
This commit is contained in:
2026-01-21 18:48:05 +08:00
parent bedcf97c9d
commit 77744015de
21 changed files with 943 additions and 42 deletions
+12
View File
@@ -60,5 +60,17 @@ namespace IM_API.Hubs
}
return;
}
public async Task ClearUnreadCount(int conversationId)
{
if (!Context.User.Identity.IsAuthenticated)
{
await Clients.Caller.SendAsync("ReceiveMessage", new BaseResponse<object?>(CodeDefine.AUTH_FAILED));
Context.Abort();
return;
}
var userIdStr = Context.User.FindFirstValue(ClaimTypes.NameIdentifier);
await _conversationService.ClearUnreadCountAsync(int.Parse(userIdStr), conversationId);
return;
}
}
}