summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'Swift/Controllers/PresenceNotifier.cpp')
-rw-r--r--Swift/Controllers/PresenceNotifier.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/Swift/Controllers/PresenceNotifier.cpp b/Swift/Controllers/PresenceNotifier.cpp
index 0c46f9b..74cb4b0 100644
--- a/Swift/Controllers/PresenceNotifier.cpp
+++ b/Swift/Controllers/PresenceNotifier.cpp
@@ -14,10 +14,11 @@
#include "Swiften/Roster/XMPPRoster.h"
#include "Swiften/Presence/PresenceOracle.h"
#include "Swiften/Network/TimerFactory.h"
+#include "Swift/Controllers/NickResolver.h"
namespace Swift {
-PresenceNotifier::PresenceNotifier(StanzaChannel* stanzaChannel, Notifier* notifier, const MUCRegistry* mucRegistry, AvatarManager* avatarManager, const XMPPRoster* roster, const PresenceOracle* presenceOracle, TimerFactory* timerFactory) : stanzaChannel(stanzaChannel), notifier(notifier), mucRegistry(mucRegistry), avatarManager(avatarManager), roster(roster), presenceOracle(presenceOracle), timerFactory(timerFactory) {
+PresenceNotifier::PresenceNotifier(StanzaChannel* stanzaChannel, Notifier* notifier, const MUCRegistry* mucRegistry, AvatarManager* avatarManager, NickResolver* nickResolver, const PresenceOracle* presenceOracle, TimerFactory* timerFactory) : stanzaChannel(stanzaChannel), notifier(notifier), mucRegistry(mucRegistry), avatarManager(avatarManager), nickResolver(nickResolver), presenceOracle(presenceOracle), timerFactory(timerFactory) {
justInitialized = true;
inQuietPeriod = false;
stanzaChannel->onPresenceReceived.connect(boost::bind(&PresenceNotifier::handlePresenceReceived, this, _1));
@@ -84,7 +85,7 @@ void PresenceNotifier::handleStanzaChannelAvailableChanged(bool available) {
}
void PresenceNotifier::showNotification(const JID& jid, Notifier::Type type) {
- String name = roster->getNameForJID(jid);
+ String name = nickResolver->jidToNick(jid);
if (name.isEmpty()) {
name = jid.toBare().toString();
}