This commit is contained in:
mmrbnjd
2025-08-08 18:10:25 +03:30
parent 0736632a59
commit f6013e482b
5 changed files with 242 additions and 148 deletions

View File

@@ -206,12 +206,12 @@ namespace Hushian.WebApi.Controllers.v1
[Authorize(Roles = "Company,User,Exper")]
public async Task<ActionResult> MarkAsReadChatItem(int ConversationItemID)
{
int? ExperID = null;
int? ID = null;
ConversationType Type = ConversationType.UE;
if (User.IsInRole("Exper"))
{
string strExperID = User.Claims.Where(w => w.Type == CustomClaimTypes.Uid).Select(s => s.Value).First();
ExperID = Convert.ToInt32(strExperID);
ID = Convert.ToInt32(strExperID);
Type = ConversationType.EU;
}
@@ -225,7 +225,7 @@ namespace Hushian.WebApi.Controllers.v1
}
else return Unauthorized();
return await _chatService.MarkAsReadChatItem(ConversationItemID, Type, ExperID) ? NoContent()
return await _chatService.MarkAsReadChatItem(ConversationItemID, Type, ID) ? NoContent()
: BadRequest(new List<string>() { "خطا در بروزرسانی گفتگو" });
}