Skip to content

Commit 61dcb47

Browse files
committed
fix: usage of global config
1 parent ad22ccd commit 61dcb47

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

package/src/components/MessageInput/MessageInput.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -302,6 +302,7 @@ const MessageInputWithContext = (props: MessageInputPropsWithContext) => {
302302
const threadId = messageComposer.threadId;
303303
if (!threadId || !messageComposer.channel || !messageComposer.compositionIsEmpty) return;
304304

305+
// This is for the offline db support for getting drafts for legacy thread composer.
305306
if (client.offlineDb && client.userID) {
306307
client.offlineDb
307308
.getDraft({

package/src/contexts/messageInputContext/hooks/useMessageComposer.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@ export const useCreateMessageComposer = ({
2323
channel,
2424
}: Pick<MessageComposerContextValue, 'channel' | 'threadInstance' | 'thread' | 'editing'>) => {
2525
const { client } = useChatContext();
26-
// legacy thread will receive new composer
2726

2827
const cachedEditedMessage = useMemo(() => {
2928
if (!editedMessage) return undefined;
@@ -68,6 +67,7 @@ export const useCreateMessageComposer = ({
6867
const cachedComposer = queueCache.get(tag);
6968
if (cachedComposer) return cachedComposer;
7069

70+
// legacy thread will receive new composer
7171
return new MessageComposer({
7272
client,
7373
compositionContext,

0 commit comments

Comments
 (0)