...
This commit is contained in:
@@ -54,7 +54,7 @@ namespace Hushian.Application.Services
|
||||
IsRead = ss.IsRead,
|
||||
text = ss.Text,
|
||||
Type = ss.Type
|
||||
})
|
||||
}).ToList()
|
||||
|
||||
}).ToListAsync();
|
||||
public async Task<List<ChatItemDto>> GetChatsByCompanyID(int CompanyID, ConversationStatus status)
|
||||
@@ -88,7 +88,7 @@ namespace Hushian.Application.Services
|
||||
IsRead = ss.IsRead,
|
||||
text = ss.Text,
|
||||
Type = ss.Type
|
||||
})
|
||||
}).ToList()
|
||||
|
||||
}).ToListAsync();
|
||||
public async Task<List<ChatItemDto>> ChatsAwaitingOurResponse(int CompanyID)
|
||||
@@ -122,7 +122,7 @@ namespace Hushian.Application.Services
|
||||
IsRead = ss.IsRead,
|
||||
text = ss.Text,
|
||||
Type = ss.Type
|
||||
})
|
||||
}).ToList()
|
||||
|
||||
}).ToListAsync();
|
||||
//------------------------
|
||||
@@ -242,5 +242,20 @@ namespace Hushian.Application.Services
|
||||
|
||||
return Response;
|
||||
}
|
||||
public async Task<bool> FinishChat(int ChatID)
|
||||
{
|
||||
var convModel = await _ConversationRepository.Get()
|
||||
.Include(inc => inc.ConversationResponses)
|
||||
.FirstOrDefaultAsync(w => w.ID == ChatID);
|
||||
|
||||
if (convModel != null && convModel.Status != ConversationStatus.Finished)
|
||||
{
|
||||
convModel.Status = ConversationStatus.Finished;
|
||||
convModel.FinishedDateTime = DateTime.Now;
|
||||
return await _ConversationRepository.UPDATEBool(convModel);
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user