add local GigaChatRepository
This commit is contained in:
+2
-2
@@ -22,7 +22,7 @@ class BackendChatRepository(
|
||||
return history.sortedBy { it.timestamp }
|
||||
}
|
||||
|
||||
override suspend fun send(message: Message) {
|
||||
storage.insert(userId, message)
|
||||
override suspend fun send(message: Message): Message {
|
||||
error("Must be not called")
|
||||
}
|
||||
}
|
||||
|
||||
+2
-2
@@ -33,8 +33,8 @@ class RemoteChatRepository(
|
||||
).content.asReversed()
|
||||
}
|
||||
|
||||
override suspend fun send(message: Message) {
|
||||
httpClient.post {
|
||||
override suspend fun send(message: Message): Message {
|
||||
return httpClient.post {
|
||||
setBody(message)
|
||||
serverConfigurationRepository.getServerConfiguration().apply(
|
||||
this,
|
||||
|
||||
Reference in New Issue
Block a user