join channel with alias bug fixed
This commit is contained in:
parent
c9b1a062ce
commit
80d4a2b242
1 changed files with 6 additions and 3 deletions
|
@ -53,7 +53,7 @@ function TryJoinWithAlias({ alias, onRequestClose }) {
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
setStatus({
|
setStatus({
|
||||||
isJoining: false,
|
isJoining: false,
|
||||||
error: `Unable to join ${alias}. Either room is private or doesn't exist.`,
|
error: `Unable to join ${alias}. Either channel is private or doesn't exist.`,
|
||||||
roomId: null,
|
roomId: null,
|
||||||
tempRoomId: null,
|
tempRoomId: null,
|
||||||
});
|
});
|
||||||
|
@ -145,7 +145,10 @@ function PublicChannels({ isOpen, searchTerm, onRequestClose }) {
|
||||||
}
|
}
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
updatePublicChannels([]);
|
updatePublicChannels([]);
|
||||||
updateSearchQuery({ error: 'Something went wrong!' });
|
updateSearchQuery({
|
||||||
|
error: 'Something went wrong!',
|
||||||
|
alias: isInputAlias ? inputChannelName : null,
|
||||||
|
});
|
||||||
updateIsSearching(false);
|
updateIsSearching(false);
|
||||||
updateNextBatch(undefined);
|
updateNextBatch(undefined);
|
||||||
updateIsViewMore(false);
|
updateIsViewMore(false);
|
||||||
|
@ -247,7 +250,7 @@ function PublicChannels({ isOpen, searchTerm, onRequestClose }) {
|
||||||
{ searchQuery.error && (
|
{ searchQuery.error && (
|
||||||
<>
|
<>
|
||||||
<Text className="public-channels__search-error" variant="b2">{searchQuery.error}</Text>
|
<Text className="public-channels__search-error" variant="b2">{searchQuery.error}</Text>
|
||||||
{searchQuery.alias !== null && (
|
{typeof searchQuery.alias === 'string' && (
|
||||||
<TryJoinWithAlias onRequestClose={onRequestClose} alias={searchQuery.alias} />
|
<TryJoinWithAlias onRequestClose={onRequestClose} alias={searchQuery.alias} />
|
||||||
)}
|
)}
|
||||||
</>
|
</>
|
||||||
|
|
Loading…
Reference in a new issue