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") {
|
} else if (ev.event.type == "m.room.member") {
|
||||||
if (ev.event.state_key !== MatrixClientPeg.get().credentials.userId && "join" === ev.getContent().membership) {
|
if (ev.event.state_key !== MatrixClientPeg.get().credentials.userId && "join" === ev.getContent().membership) {
|
||||||
// Notify when another user joins
|
// 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) {
|
} else if (ev.event.state_key === MatrixClientPeg.get().credentials.userId && "invite" === ev.getContent().membership) {
|
||||||
// notify when you are invited
|
// notify when you are invited
|
||||||
message = senderDisplayName + " invited you to a room";
|
message = senderDisplayName + " invited you to a room";
|
||||||
|
@ -59,9 +59,9 @@ var NotifierView = {
|
||||||
if (!msg) return;
|
if (!msg) return;
|
||||||
|
|
||||||
var title;
|
var title;
|
||||||
if (room.name == ev.sender.name) {
|
if (!ev.sender || room.name == ev.sender.name) {
|
||||||
title = room.name;
|
title = room.name;
|
||||||
} else {
|
} else if (ev.sender) {
|
||||||
title = ev.sender.name + " (" + room.name + ")";
|
title = ev.sender.name + " (" + room.name + ")";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue