diff --git a/packages/api/src/EmbeddedChatApi.ts b/packages/api/src/EmbeddedChatApi.ts index 72e25a046..7c8d07bc6 100644 --- a/packages/api/src/EmbeddedChatApi.ts +++ b/packages/api/src/EmbeddedChatApi.ts @@ -1120,8 +1120,12 @@ export default class EmbeddedChatApi { async getSearchMessages(text: string) { try { const { userId, authToken } = (await this.auth.getCurrentUser()) || {}; + const queryParams = new URLSearchParams({ + roomId: this.rid, + searchText: text, + }); const response = await fetch( - `${this.host}/api/v1/chat.search?roomId=${this.rid}&searchText=${text}`, + `${this.host}/api/v1/chat.search?${queryParams.toString()}`, { headers: { "Content-Type": "application/json",