add message notifications
This commit is contained in:
@@ -84,7 +84,7 @@ export default class ChatModel {
|
||||
|
||||
chatMessage.status = ChatMessageStatus.Received;
|
||||
this.addMessage(chatMessage);
|
||||
|
||||
|
||||
this.setReadStatus(true);
|
||||
};
|
||||
|
||||
@@ -271,6 +271,10 @@ export default class ChatModel {
|
||||
}
|
||||
|
||||
// utility
|
||||
static splitChannel(channelString: string): string[] {
|
||||
return channelString.split("/");
|
||||
}
|
||||
|
||||
static generateChatInfo = (primaryChannel: string): ChatInfo => {
|
||||
return {
|
||||
dataVersion: DATA_VERSION,
|
||||
|
||||
@@ -227,6 +227,7 @@ export enum StorageModelSubPath {
|
||||
Chat = "chat",
|
||||
|
||||
ConnectionModel = "connection",
|
||||
NotificationModel = "notifications",
|
||||
SettingsModel = "settings",
|
||||
}
|
||||
|
||||
@@ -253,6 +254,10 @@ export const filePaths = {
|
||||
files: (id: string) => [...filePaths.chat.chatBase(id), "files"],
|
||||
},
|
||||
|
||||
notificationModel: {
|
||||
base: [],
|
||||
},
|
||||
|
||||
settingsModel: {
|
||||
username: ["user-name"],
|
||||
firstDayOfWeek: ["first-day-of-week"],
|
||||
|
||||
Reference in New Issue
Block a user