This commit is contained in:
mmrbnjd
2025-08-09 18:55:06 +03:30
parent 278bf2f601
commit 8d69dbc946
2 changed files with 90 additions and 3 deletions

View File

@@ -63,6 +63,24 @@ namespace HushianWebApp.Service
}
// Send chat response with optional file attachment (e.g., image)
public async Task<ChatItemResponseDto?> ADDChatResponse(int conversationID, string text, ConversationType type,
string? fileName, string? fileType, byte[]? fileContent)
{
var response = await _baseController.Post($"{BaseRoute}ADDChatResponse", new ADD_ConversationResponseDto()
{
ConversationID = conversationID,
Text = text,
Type = type,
FileName = fileName,
FileType = fileType,
FileContent = fileContent
});
if (response.IsSuccessStatusCode)
return await response.Content.ReadFromJsonAsync<ChatItemResponseDto>();
return null;
}
public async Task<bool> OpenChat(int ChatID)
{
var response = await _baseController.Put($"{BaseRoute}OpenChat/{ChatID}");