1
0
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:
Puyodead1 2023-12-08 12:42:37 -05:00
parent a90ab4b205
commit 5da4bccdab
No known key found for this signature in database
GPG Key ID: BA5F91AAEF68E5CE
2 changed files with 17 additions and 0 deletions

View File

@ -69,6 +69,7 @@ function ChannelMention({ id }: MentionProps) {
const click = () => {
if (!channel) return;
if (!channel.isGuildTextChannel) return;
navigate(`/channels/${channel.guildId}/${channel.id}`);
};

View File

@ -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())