1
0
mirror of https://github.com/matrix-org/matrix-js-sdk.git synced 2025-08-19 16:42:09 +03:00

fix NPE if our user does not yet appear to be in the queried room

This commit is contained in:
Matthew Hodgson
2015-09-18 01:55:32 +02:00
parent ac7457f532
commit 2f75bb75dd

View File

@@ -140,7 +140,8 @@ function PushProcessor(client) {
}
var room = client.getRoom(ev.room_id);
if (!room || !room.currentState || !room.currentState.members) { return false; }
if (!room || !room.currentState || !room.currentState.members ||
!room.currentState.getMember(client.credentials.userId) { return false; }
var displayName = room.currentState.getMember(client.credentials.userId).name;