summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRemko Tronçon <git@el-tramo.be>2010-09-15 18:45:37 (GMT)
committerRemko Tronçon <git@el-tramo.be>2010-09-15 18:45:37 (GMT)
commit8e5d1a11824d7a0900feb44ed5b5464d8d94ab2a (patch)
treecf19e679ad8e9f21e226135a41c94c558fa28662 /Swift/Controllers/PresenceNotifier.cpp
parent7c6ca6948f81dc4ee6430d46aeae7f7de806a251 (diff)
downloadswift-8e5d1a11824d7a0900feb44ed5b5464d8d94ab2a.zip
swift-8e5d1a11824d7a0900feb44ed5b5464d8d94ab2a.tar.bz2
Use NickResolver for nicks in notifications.
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();
}