Skip to content

Commit

Permalink
fix addMessage
Browse files Browse the repository at this point in the history
Signed-off-by: Ping Yu <[email protected]>
  • Loading branch information
pingyu committed Jul 27, 2023
1 parent 1c31870 commit d89b7ca
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/controller/message.dart
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ class MessageController extends GetxController {

void addMessage(ChatRoom room, Message input, String ai_question) async {
// Add user input to message list
await ChatRoomRepository().addMessage(room, input);
await ChatRoomRepository().addMessage(room, [input]);

final chatRoomUuid = room.uuid;

Expand Down Expand Up @@ -67,7 +67,7 @@ class MessageController extends GetxController {
}, //
(Message res) async {
// if streaming is done ,load all the message
ChatRoomRepository().addMessage(room, res);
ChatRoomRepository().addMessage(room, [res]);
final messages =
await ChatRoomRepository().getMessagesByChatRoomUUid(room);
messageList.value = messages;
Expand Down

0 comments on commit d89b7ca

Please sign in to comment.