File tree Expand file tree Collapse file tree
src/components/MessageInput/hooks Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -38,7 +38,6 @@ export const useMessageComposer = ({
3838 // composer hierarchy
3939 // edited message (always new) -> thread instance (own) -> thread message (always new) -> channel (own)
4040 // editedMessage ?? thread ?? parentMessage ?? channel;
41-
4241 const messageComposer = useMemo ( ( ) => {
4342 if ( cachedEditedMessage ) {
4443 const composer = new MessageComposer ( { channel, composition : cachedEditedMessage } ) ;
Original file line number Diff line number Diff line change @@ -24,16 +24,16 @@ export const useSubmitHandler = (props: MessageInputProps) => {
2424 customMessageData ?: Omit < UpdatedMessage , 'mentioned_users' > ,
2525 ) => {
2626 event ?. preventDefault ( ) ;
27- const compostion = await messageComposer . compose ( ) ;
28- if ( ! compostion || ! compostion . message ) return ;
27+ const composition = await messageComposer . compose ( ) ;
28+ if ( ! composition || ! composition . message ) return ;
2929
3030 // todo: plug in the client's notification system
3131 // if (notification?.type === 'error') {
3232 // addNotification(t(notification.text), 'error');
3333 // return;
3434 // }
3535
36- const { localMessage, message, sendOptions } = compostion ;
36+ const { localMessage, message, sendOptions } = composition ;
3737
3838 if ( messageComposer . editedMessage && localMessage . type !== 'error' ) {
3939 try {
You can’t perform that action at this time.
0 commit comments