From 793b32d807278cec6d80f1582f77e6c0e9b928d0 Mon Sep 17 00:00:00 2001 From: Andrew Urban Date: Thu, 13 Apr 2017 15:57:04 +0300 Subject: [PATCH] Fixed the wrong initial presence bug (#108) --- .../Roster/CoreDataStorage/XMPPUserCoreDataStorageObject.m | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Extensions/Roster/CoreDataStorage/XMPPUserCoreDataStorageObject.m b/Extensions/Roster/CoreDataStorage/XMPPUserCoreDataStorageObject.m index f7f9b82610..22cbd9eda2 100644 --- a/Extensions/Roster/CoreDataStorage/XMPPUserCoreDataStorageObject.m +++ b/Extensions/Roster/CoreDataStorage/XMPPUserCoreDataStorageObject.m @@ -313,6 +313,10 @@ - (void)recalculatePrimaryResource - (void)updateWithPresence:(XMPPPresence *)presence streamBareJidStr:(NSString *)streamBareJidStr { + if (!presence.from.isFull) { + return; + } + XMPPResourceCoreDataStorageObject *resource = (XMPPResourceCoreDataStorageObject *)[self resourceForJID:[presence from]];