Skip to content

Commit 3271998

Browse files
committed
minor
1 parent 7da1d4c commit 3271998

File tree

1 file changed

+9
-6
lines changed
  • services/static-webserver/client/source/class/osparc/info

1 file changed

+9
-6
lines changed

services/static-webserver/client/source/class/osparc/info/CommentAdd.js

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -227,12 +227,15 @@ qx.Class.define("osparc.info.CommentAdd", {
227227
osparc.study.Conversations.notifyUser(this.__studyData["uuid"], this.__conversationId, userGroupId)
228228
.then(data => {
229229
this.fireDataEvent("commentAdded", data);
230-
// OM: push redis notification
231-
osparc.store.Users.getInstance().getUser(userGroupId)
232-
.then(user => {
233-
const msg = user ? user.getLabel() + this.tr(" was notified") : this.tr("Notification sent");
234-
osparc.FlashMessenger.logAs(msg, "INFO");
235-
});
230+
const potentialCollaborators = osparc.store.Groups.getInstance().getPotentialCollaborators();
231+
if (userGid in potentialCollaborators) {
232+
if ("getUserId" in potentialCollaborators[userGid]) {
233+
const uid = potentialCollaborators[userGid].getUserId();
234+
osparc.notification.Notifications.pushConversationNotification(uid, studyData["uuid"]);
235+
}
236+
const msg = "getLabel" in potentialCollaborators[userGid] ? potentialCollaborators[userGid].getLabel() + this.tr(" was notified") : this.tr("Notification sent");
237+
osparc.FlashMessenger.logAs(msg, "INFO");
238+
}
236239
});
237240
}
238241
},

0 commit comments

Comments
 (0)