前端:
1、更新界面图标 2、修改消息缓存逻辑 3、新增清空未读消息数 后端: 1、修复不同时区导致的时间显示问题 2、新增清空未读消息数接口
This commit is contained in:
@@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user