fix channel recognition

This commit is contained in:
marlon-erler
2024-07-09 18:51:46 +02:00
parent bc45992ecb
commit 7ce85688a2
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -415,7 +415,7 @@
onmessage = async (data) => {
if (!data.messageChannel) return;
const channels = data.messageChannel.split("/");
if (this.primaryChannel.value in channels == false) return;
if (channels.indexOf(this.primaryChannel.value) == -1) return;
if (data.subscribed != void 0) this.handleSubscription(data.subscribed);
if (!data.messageBody) return;
const { sender, body, channel, isoDate } = JSON.parse(data.messageBody);
+1 -1
View File
@@ -104,7 +104,7 @@ export class Chat {
onmessage = async (data: Message): Promise<void> => {
if (!data.messageChannel) return;
const channels = data.messageChannel.split("/");
if (this.primaryChannel.value in channels == false) return;
if (channels.indexOf(this.primaryChannel.value) == -1) return;
if (data.subscribed != undefined) this.handleSubscription(data.subscribed);