Skip to content

Commit 8d0cd00

Browse files
authored
feat: omit 'appId' from SendbirdChatInitParams (#693)
Omit `appId` from SendbirdChatInitParams type
1 parent 1b2ce8e commit 8d0cd00

File tree

3 files changed

+6
-4
lines changed

3 files changed

+6
-4
lines changed

src/lib/hooks/useConnect/setupConnection.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,13 +34,14 @@ export function setUpParams({
3434
sdkInitParams?: SendbirdChatInitParams;
3535
}): SendbirdChat {
3636
const params = {
37-
appId,
3837
modules: [
3938
new GroupChannelModule(),
4039
new OpenChannelModule(),
4140
],
4241
newInstance: true,
43-
...sdkInitParams,
42+
...(sdkInitParams ?? {}),
43+
// appId shouldn't be overrided
44+
appId,
4445
};
4546
if (customApiHost) {
4647
params['customApiHost'] = customApiHost;

src/lib/types.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -247,4 +247,4 @@ export type UIKitOptions = PartialDeep<{
247247
openChannel: SBUConfig['openChannel']['channel'];
248248
}>;
249249

250-
export type SendbirdChatInitParams = SendbirdChatParams<Module[]>;
250+
export type SendbirdChatInitParams = Omit<SendbirdChatParams<Module[]>, 'appId'>;

src/modules/App/types.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,10 @@ import {
99
UserListQuery,
1010
RenderUserProfileProps,
1111
SendBirdProviderConfig,
12-
SendbirdChatInitParams,
1312
} from '../../types';
1413

14+
import { SendbirdChatInitParams } from '../../lib/types';
15+
1516
export interface AppLayoutProps {
1617
isReactionEnabled?: boolean;
1718
replyType?: 'NONE' | 'QUOTE_REPLY' | 'THREAD';

0 commit comments

Comments
 (0)