...
This commit is contained in:
@@ -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}");
|
||||
|
Reference in New Issue
Block a user