mirror of
https://gitlab.opencode.de/bwi/bundesmessenger/clients/bundesmessenger-ios.git
synced 2026-04-20 00:24:43 +02:00
Weakify self on presence notifications observers
This commit is contained in:
@@ -142,8 +142,10 @@ NSString *const kMXKContactCellContactIdKey = @"kMXKContactCellContactIdKey";
|
||||
if (! self.hideMatrixPresence)
|
||||
{
|
||||
// Observe contact presence change
|
||||
MXWeakify(self);
|
||||
mxPresenceObserver = [[NSNotificationCenter defaultCenter] addObserverForName:kMXKContactManagerMatrixUserPresenceChangeNotification object:nil queue:[NSOperationQueue mainQueue] usingBlock:^(NSNotification *notif) {
|
||||
|
||||
MXStrongifyAndReturnIfNil(self);
|
||||
|
||||
// get the matrix identifiers
|
||||
NSArray* matrixIdentifiers = self->contact.matrixIdentifiers;
|
||||
if (matrixIdentifiers.count > 0)
|
||||
|
||||
Reference in New Issue
Block a user