mirror of
https://git.anonymousland.org/anonymousland/synapse-product.git
synced 2024-12-20 04:44:22 -05:00
SYWEB-102: Fix desktop notification msg when a user with no display name joins a room.
This commit is contained in:
parent
20cf0b7aeb
commit
71ef8f0636
@ -201,11 +201,14 @@ angular.module('RoomController', ['ngSanitize', 'matrixFilter', 'mFileInput'])
|
|||||||
// Notify when a user joins
|
// Notify when a user joins
|
||||||
if ((document.hidden || matrixService.presence.unavailable === mPresence.getState())
|
if ((document.hidden || matrixService.presence.unavailable === mPresence.getState())
|
||||||
&& event.state_key !== $scope.state.user_id && "join" === event.membership) {
|
&& event.state_key !== $scope.state.user_id && "join" === event.membership) {
|
||||||
|
var userName = event.content.displayname;
|
||||||
|
if (!userName) {
|
||||||
|
userName = event.state_key;
|
||||||
|
}
|
||||||
notificationService.showNotification(
|
notificationService.showNotification(
|
||||||
event.content.displayname +
|
userName +
|
||||||
" (" + (matrixService.getRoomIdToAliasMapping(event.room_id) || event.room_id) + ")",
|
" (" + (matrixService.getRoomIdToAliasMapping(event.room_id) || event.room_id) + ")",
|
||||||
event.content.displayname + " joined",
|
userName + " joined",
|
||||||
event.content.avatar_url ? event.content.avatar_url : undefined,
|
event.content.avatar_url ? event.content.avatar_url : undefined,
|
||||||
function() {
|
function() {
|
||||||
console.log("notification.onclick() room=" + event.room_id);
|
console.log("notification.onclick() room=" + event.room_id);
|
||||||
|
Loading…
Reference in New Issue
Block a user