0
0
Fork 1
mirror of https://mau.dev/maunium/synapse.git synced 2024-12-15 09:23:50 +01:00

HandleRoomMember: handle correctly prev_content

This commit is contained in:
giomfo 2014-10-27 14:16:59 +01:00
parent 6603e39e6a
commit cf1feee21d

View file

@ -256,7 +256,7 @@ function(matrixService, $rootScope, $q, $timeout, mPresence) {
// could be a membership change, display name change, etc.
// Find out which one.
var memberChanges = undefined;
if (event.prev_content && (event.prev_content.membership !== event.content.membership)) {
if ((event.prev_content === undefined && event.content.membership) || (event.prev_content && (event.prev_content.membership !== event.content.membership))) {
memberChanges = "membership";
}
else if (event.prev_content && (event.prev_content.displayname !== event.content.displayname)) {