Skip to content
Snippets Groups Projects
Commit 71ef8f06 authored by Kegan Dougal's avatar Kegan Dougal
Browse files

SYWEB-102: Fix desktop notification msg when a user with no display name joins a room.

parent 20cf0b7a
No related branches found
No related tags found
No related merge requests found
......@@ -201,11 +201,14 @@ angular.module('RoomController', ['ngSanitize', 'matrixFilter', 'mFileInput'])
// Notify when a user joins
if ((document.hidden || matrixService.presence.unavailable === mPresence.getState())
&& event.state_key !== $scope.state.user_id && "join" === event.membership) {
var userName = event.content.displayname;
if (!userName) {
userName = event.state_key;
}
notificationService.showNotification(
event.content.displayname +
userName +
" (" + (matrixService.getRoomIdToAliasMapping(event.room_id) || event.room_id) + ")",
event.content.displayname + " joined",
userName + " joined",
event.content.avatar_url ? event.content.avatar_url : undefined,
function() {
console.log("notification.onclick() room=" + event.room_id);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment