diff --git a/src/app/organisms/public-channels/PublicChannels.jsx b/src/app/organisms/public-channels/PublicChannels.jsx index 2f02ba0..624ea48 100644 --- a/src/app/organisms/public-channels/PublicChannels.jsx +++ b/src/app/organisms/public-channels/PublicChannels.jsx @@ -84,7 +84,7 @@ TryJoinWithAlias.propTypes = { onRequestClose: PropTypes.func.isRequired, }; -function PublicChannels({ isOpen, onRequestClose }) { +function PublicChannels({ isOpen, searchTerm, onRequestClose }) { const [isSearching, updateIsSearching] = useState(false); const [isViewMore, updateIsViewMore] = useState(false); const [publicChannels, updatePublicChannels] = useState([]); @@ -97,7 +97,7 @@ function PublicChannels({ isOpen, onRequestClose }) { const userId = initMatrix.matrixClient.getUserId(); async function searchChannels(viewMore) { - let inputChannelName = channelNameRef?.current?.value; + let inputChannelName = channelNameRef?.current?.value || searchTerm; let isInputAlias = false; if (typeof inputChannelName === 'string') { isInputAlias = inputChannelName[0] === '#' && inputChannelName.indexOf(':') > 1; @@ -214,7 +214,7 @@ function PublicChannels({ isOpen, onRequestClose }) {