Skip to content

Commit 243f178

Browse files
committed
fix: keep editing message composer with up-to-date edited message reference
1 parent 1ba131b commit 243f178

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

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

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,10 @@ export const useCreateMessageComposer = ({
3838
const tag = MessageComposer.constructTag(cachedEditedMessage);
3939

4040
const cachedComposer = queueCache.get(tag);
41-
if (cachedComposer) return cachedComposer;
41+
if (cachedComposer) {
42+
cachedComposer.editedMessage = cachedEditedMessage;
43+
return cachedComposer;
44+
}
4245

4346
return new MessageComposer({
4447
client,

0 commit comments

Comments
 (0)