summaryrefslogtreecommitdiffstats
path: root/Swift
diff options
context:
space:
mode:
Diffstat (limited to 'Swift')
-rw-r--r--Swift/Controllers/Roster/RosterController.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/Swift/Controllers/Roster/RosterController.cpp b/Swift/Controllers/Roster/RosterController.cpp
index 75acaa9..4fbdea4 100644
--- a/Swift/Controllers/Roster/RosterController.cpp
+++ b/Swift/Controllers/Roster/RosterController.cpp
@@ -334,6 +334,11 @@ void RosterController::handleIncomingPresence(Presence::ref newPresence) {
return;
}
Presence::ref accountPresence = presenceOracle_->getAccountPresence(newPresence->getFrom().toBare());
+ if (!accountPresence) {
+ accountPresence = Presence::create();
+ accountPresence->setFrom(newPresence->getFrom());
+ accountPresence->setType(Presence::Unavailable);
+ }
roster_->applyOnItems(SetPresence(accountPresence));
}