mirror of
https://github.com/spacebarchat/client.git
synced 2024-11-22 10:22:30 +01:00
fix being able to navigate to category channels via mentions
This commit is contained in:
parent
a90ab4b205
commit
5da4bccdab
@ -69,6 +69,7 @@ function ChannelMention({ id }: MentionProps) {
|
||||
|
||||
const click = () => {
|
||||
if (!channel) return;
|
||||
if (!channel.isGuildTextChannel) return;
|
||||
navigate(`/channels/${channel.guildId}/${channel.id}`);
|
||||
};
|
||||
|
||||
|
@ -236,6 +236,22 @@ export default class Channel {
|
||||
);
|
||||
}
|
||||
|
||||
@computed
|
||||
get isGuildTextChannel() {
|
||||
return (
|
||||
this.type === ChannelType.GuildText ||
|
||||
this.type === ChannelType.GuildVoice ||
|
||||
this.type === ChannelType.GuildStageVoice ||
|
||||
this.type === ChannelType.GuildForum ||
|
||||
this.type === ChannelType.GuildAnnouncement ||
|
||||
this.type === ChannelType.AnnouncementThread ||
|
||||
this.type === ChannelType.Encrypted ||
|
||||
this.type === ChannelType.EncryptedThread ||
|
||||
this.type === ChannelType.PrivateThread ||
|
||||
this.type === ChannelType.PublicThread
|
||||
);
|
||||
}
|
||||
|
||||
@computed
|
||||
get typingUsers(): User[] {
|
||||
return Array.from(this.typingIds.keys())
|
||||
|
Loading…
Reference in New Issue
Block a user