diff options
author | Kevin Smith <git@kismith.co.uk> | 2013-03-31 15:52:06 (GMT) |
---|---|---|
committer | Swift Review <review@swift.im> | 2013-04-05 07:59:01 (GMT) |
commit | 7f4d4ffc8c656c5125fc3a53e5afdd4a8c5ff4f3 (patch) | |
tree | 70f6521fd5d9d15c38ffcfc4dc792d564ec02f08 /Swift/Controllers/Chat | |
parent | a6b61da8e42e996bc7bbe4babc618e3708639936 (diff) | |
download | swift-contrib-7f4d4ffc8c656c5125fc3a53e5afdd4a8c5ff4f3.zip swift-contrib-7f4d4ffc8c656c5125fc3a53e5afdd4a8c5ff4f3.tar.bz2 |
Don't display errors sent to the bare JID.
Work around ejabberd bug where PEP publish errors get routed back to the client.
Change-Id: I83c546ffabc4978fd9fa223fd15524988b7a19c8
Resolves: #1181
Diffstat (limited to 'Swift/Controllers/Chat')
-rw-r--r-- | Swift/Controllers/Chat/ChatControllerBase.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/Swift/Controllers/Chat/ChatControllerBase.cpp b/Swift/Controllers/Chat/ChatControllerBase.cpp index 39ec8c3..b60162f 100644 --- a/Swift/Controllers/Chat/ChatControllerBase.cpp +++ b/Swift/Controllers/Chat/ChatControllerBase.cpp @@ -211,8 +211,10 @@ void ChatControllerBase::handleIncomingMessage(boost::shared_ptr<MessageEvent> m std::string body = message->getBody(); HighlightAction highlight; if (message->isError()) { - std::string errorMessage = str(format(QT_TRANSLATE_NOOP("", "Couldn't send message: %1%")) % getErrorMessage(message->getPayload<ErrorPayload>())); - chatWindow_->addErrorMessage(errorMessage); + if (!message->getTo().getResource().empty()) { + std::string errorMessage = str(format(QT_TRANSLATE_NOOP("", "Couldn't send message: %1%")) % getErrorMessage(message->getPayload<ErrorPayload>())); + chatWindow_->addErrorMessage(errorMessage); + } } else if (messageEvent->getStanza()->getPayload<MUCInvitationPayload>()) { handleMUCInvitation(messageEvent->getStanza()); |