Weakify self on presence notifications observers

This commit is contained in:
aringenbach
2022-04-05 15:21:53 +02:00
parent 10cebea479
commit d492f6764c
3 changed files with 7 additions and 1 deletions
@@ -150,7 +150,9 @@
if (contact.isMatrixContact)
{
// Observe contact presence change
MXWeakify(self);
mxPresenceObserver = [[NSNotificationCenter defaultCenter] addObserverForName:kMXKContactManagerMatrixUserPresenceChangeNotification object:nil queue:[NSOperationQueue mainQueue] usingBlock:^(NSNotification *notif) {
MXStrongifyAndReturnIfNil(self);
NSString* matrixId = self.firstMatrixId;