diff options
author | Kevin Smith <git@kismith.co.uk> | 2012-02-09 20:22:04 (GMT) |
---|---|---|
committer | Kevin Smith <git@kismith.co.uk> | 2012-02-09 20:22:04 (GMT) |
commit | 24afb2e086b62719fec45a5eeb04a7ba24918220 (patch) | |
tree | 27b7add095de97385d545bd083767dd31df800dd /Swift/Controllers/Chat/ChatControllerBase.cpp | |
parent | 94b7aaf53c8b20e03c8081cce49cda14cd5c01da (diff) | |
download | swift-contrib-24afb2e086b62719fec45a5eeb04a7ba24918220.zip swift-contrib-24afb2e086b62719fec45a5eeb04a7ba24918220.tar.bz2 |
Fixes for mediated invites
Diffstat (limited to 'Swift/Controllers/Chat/ChatControllerBase.cpp')
-rw-r--r-- | Swift/Controllers/Chat/ChatControllerBase.cpp | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/Swift/Controllers/Chat/ChatControllerBase.cpp b/Swift/Controllers/Chat/ChatControllerBase.cpp index f8f30ff..db71397 100644 --- a/Swift/Controllers/Chat/ChatControllerBase.cpp +++ b/Swift/Controllers/Chat/ChatControllerBase.cpp @@ -267,22 +267,19 @@ std::string ChatControllerBase::getErrorMessage(boost::shared_ptr<ErrorPayload> } void ChatControllerBase::handleMUCInvitation(Message::ref message) { MUCInvitationPayload::ref invite = message->getPayload<MUCInvitationPayload>(); chatWindow_->addMUCInvitation(invite->getJID(), invite->getReason(), invite->getPassword()); } void ChatControllerBase::handleMediatedMUCInvitation(Message::ref message) { MUCUserPayload::Invite invite = *message->getPayload<MUCUserPayload>()->getInvite(); - JID from; - if (invite.from.isValid()) { - from = invite.from; - } + JID from = message->getFrom(); std::string reason; if (!invite.reason.empty()) { reason = invite.reason; } std::string password; if (message->getPayload<MUCUserPayload>()->getPassword()) { password = *message->getPayload<MUCUserPayload>()->getPassword(); } chatWindow_->addMUCInvitation(from, reason, password, false); |