Add push notifications for chat participants
This commit is contained in:
@@ -2,6 +2,7 @@ var express = require('express');
|
||||
var router = express.Router();
|
||||
|
||||
const DB = require("../mongoDB.js");
|
||||
const Notifications = require("../notifications.js");
|
||||
const { getUserId, getProfileId } = require("../utils/sessionUtils.js");
|
||||
const { normalizeLanguageCode, translateText } = require("../utils/chatTranslation.js");
|
||||
|
||||
@@ -190,6 +191,8 @@ DB.getDB.then((DB) => {
|
||||
return res.status(500).json({ status: "Could not save message" });
|
||||
}
|
||||
|
||||
Notifications.youGotANewChatMessage(profileId, text);
|
||||
|
||||
activeUsers.set(profileId + "", {
|
||||
profileId: profileId + "",
|
||||
userId: userId + "",
|
||||
|
||||
Reference in New Issue
Block a user