diff --git a/web/chat/thread-menu.react.js b/web/chat/thread-menu.react.js --- a/web/chat/thread-menu.react.js +++ b/web/chat/thread-menu.react.js @@ -5,6 +5,8 @@ import { leaveThread, leaveThreadActionTypes, + changeThreadSettingsActionTypes, + changeThreadSettings, } from 'lib/actions/thread-actions'; import { childThreadInfos } from 'lib/selectors/thread-selectors'; import { @@ -156,6 +158,7 @@ const dispatchActionPromise = useDispatchActionPromise(); const callLeaveThread = useServerCall(leaveThread); + const callChangeThreadSettings = useServerCall(changeThreadSettings); const onConfirmLeaveThread = React.useCallback(() => { dispatchActionPromise( @@ -196,7 +199,19 @@ ); }, [onClickLeaveThread, threadInfo]); - const onClickPromoteThread = React.useCallback(() => {}, []); + const onClickPromoteThread = React.useCallback(() => { + try { + dispatchActionPromise( + changeThreadSettingsActionTypes, + callChangeThreadSettings({ + threadID: threadInfo.id, + changes: { type: threadTypes.COMMUNITY_OPEN_SUBTHREAD }, + }), + ); + } catch (e) { + console.error(e); + } + }, [callChangeThreadSettings, dispatchActionPromise, threadInfo.id]); const promoteSubchannelItem = React.useMemo(() => { return (