diff options
Diffstat (limited to 'Swiften/Queries/IQRouter.cpp')
-rw-r--r-- | Swiften/Queries/IQRouter.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/Swiften/Queries/IQRouter.cpp b/Swiften/Queries/IQRouter.cpp index f40d248..a1689e9 100644 --- a/Swiften/Queries/IQRouter.cpp +++ b/Swiften/Queries/IQRouter.cpp @@ -40,7 +40,7 @@ void IQRouter::handleIQ(boost::shared_ptr<IQ> iq) { } } if (!handled && (iq->getType() == IQ::Get || iq->getType() == IQ::Set) ) { - channel_->sendIQ(IQ::createError(iq->getFrom(), iq->getID(), ErrorPayload::FeatureNotImplemented, ErrorPayload::Cancel)); + sendIQ(IQ::createError(iq->getFrom(), iq->getID(), ErrorPayload::FeatureNotImplemented, ErrorPayload::Cancel)); } processPendingRemoves(); @@ -77,6 +77,9 @@ void IQRouter::removeHandler(boost::shared_ptr<IQHandler> handler) { } void IQRouter::sendIQ(boost::shared_ptr<IQ> iq) { + if (from_.isValid()) { + iq->setFrom(from_); + } channel_->sendIQ(iq); } |