fix minor bug with notification handling
This commit is contained in:
Vendored
+3
-1
@@ -1255,7 +1255,8 @@
|
|||||||
if (chatMessage == null) return;
|
if (chatMessage == null) return;
|
||||||
chatMessage.status = "received" /* Received */;
|
chatMessage.status = "received" /* Received */;
|
||||||
this.addMessage(chatMessage);
|
this.addMessage(chatMessage);
|
||||||
if (chatMessage.stringifiedFile != void 0) return;
|
console.log("MESSAGE", chatMessage.stringifiedFile);
|
||||||
|
if (chatMessage.stringifiedFile) return;
|
||||||
this.setReadStatus(true);
|
this.setReadStatus(true);
|
||||||
};
|
};
|
||||||
this.handleReaction = (reaction) => {
|
this.handleReaction = (reaction) => {
|
||||||
@@ -3762,6 +3763,7 @@
|
|||||||
this.showNotification = (message) => {
|
this.showNotification = (message) => {
|
||||||
const notification = _NotificationViewModel.createNotification(message);
|
const notification = _NotificationViewModel.createNotification(message);
|
||||||
if (this.seenMessageIds.has(message.id)) return;
|
if (this.seenMessageIds.has(message.id)) return;
|
||||||
|
if (this.chatListViewModel.selectedChat.value == void 0) return;
|
||||||
const currentChat = this.chatListViewModel.selectedChat.value.chatModel.info.primaryChannel;
|
const currentChat = this.chatListViewModel.selectedChat.value.chatModel.info.primaryChannel;
|
||||||
const currentPage = this.chatListViewModel.selectedChat.value.selectedPage.value;
|
const currentPage = this.chatListViewModel.selectedChat.value.selectedPage.value;
|
||||||
if (notification.chat == currentChat && currentPage == "messages" /* Messages */)
|
if (notification.chat == currentChat && currentPage == "messages" /* Messages */)
|
||||||
|
|||||||
@@ -103,7 +103,7 @@ export default class ChatModel {
|
|||||||
|
|
||||||
this.addMessage(chatMessage);
|
this.addMessage(chatMessage);
|
||||||
|
|
||||||
if (chatMessage.stringifiedFile != undefined) return;
|
if (chatMessage.stringifiedFile) return;
|
||||||
this.setReadStatus(true);
|
this.setReadStatus(true);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -17,6 +17,8 @@ export default class NotificationViewModel {
|
|||||||
NotificationViewModel.createNotification(message);
|
NotificationViewModel.createNotification(message);
|
||||||
if (this.seenMessageIds.has(message.id)) return;
|
if (this.seenMessageIds.has(message.id)) return;
|
||||||
|
|
||||||
|
if (this.chatListViewModel.selectedChat.value == undefined) return;
|
||||||
|
|
||||||
const currentChat =
|
const currentChat =
|
||||||
this.chatListViewModel.selectedChat.value.chatModel.info
|
this.chatListViewModel.selectedChat.value.chatModel.info
|
||||||
.primaryChannel;
|
.primaryChannel;
|
||||||
|
|||||||
Reference in New Issue
Block a user