mirror of
https://github.com/vector-im/element-web.git
synced 2024-09-09 22:55:12 +00:00
More sender / sender display name fixes.
This commit is contained in:
parent
d4ef04dc41
commit
7a8eae09ff
1 changed files with 3 additions and 3 deletions
|
@ -38,7 +38,7 @@ var NotifierView = {
|
|||
} else if (ev.event.type == "m.room.member") {
|
||||
if (ev.event.state_key !== MatrixClientPeg.get().credentials.userId && "join" === ev.getContent().membership) {
|
||||
// Notify when another user joins
|
||||
message = ev.target.name + " joined";
|
||||
message = senderDisplayName + " joined";
|
||||
} else if (ev.event.state_key === MatrixClientPeg.get().credentials.userId && "invite" === ev.getContent().membership) {
|
||||
// notify when you are invited
|
||||
message = senderDisplayName + " invited you to a room";
|
||||
|
@ -59,9 +59,9 @@ var NotifierView = {
|
|||
if (!msg) return;
|
||||
|
||||
var title;
|
||||
if (room.name == ev.sender.name) {
|
||||
if (!ev.sender || room.name == ev.sender.name) {
|
||||
title = room.name;
|
||||
} else {
|
||||
} else if (ev.sender) {
|
||||
title = ev.sender.name + " (" + room.name + ")";
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue