diff options
author | Remko Tronçon <git@el-tramo.be> | 2011-09-29 18:55:02 (GMT) |
---|---|---|
committer | Remko Tronçon <git@el-tramo.be> | 2011-09-29 18:55:02 (GMT) |
commit | 06a49ccc9554f2ce9e6d7b381543819590ea30ed (patch) | |
tree | 3b2c6931176633b99afcf40729e2923ecaa1e151 /Swiften/Queries/Request.cpp | |
parent | 4b4ab66118545e55e69e15cd340d0ddf92adcc2d (diff) | |
download | swift-contrib-06a49ccc9554f2ce9e6d7b381543819590ea30ed.zip swift-contrib-06a49ccc9554f2ce9e6d7b381543819590ea30ed.tar.bz2 |
Allow to set 'from' on Request & IBB classes.
Diffstat (limited to 'Swiften/Queries/Request.cpp')
-rw-r--r-- | Swiften/Queries/Request.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/Swiften/Queries/Request.cpp b/Swiften/Queries/Request.cpp index 382e44c..f3f56c9 100644 --- a/Swiften/Queries/Request.cpp +++ b/Swiften/Queries/Request.cpp @@ -16,6 +16,12 @@ Request::Request(IQ::Type type, const JID& receiver, boost::shared_ptr<Payload> Request::Request(IQ::Type type, const JID& receiver, IQRouter* router) : router_(router), type_(type), receiver_(receiver), sent_(false) { } +Request::Request(IQ::Type type, const JID& sender, const JID& receiver, boost::shared_ptr<Payload> payload, IQRouter* router) : router_(router), type_(type), sender_(sender), receiver_(receiver), payload_(payload), sent_(false) { +} + +Request::Request(IQ::Type type, const JID& sender, const JID& receiver, IQRouter* router) : router_(router), type_(type), sender_(sender), receiver_(receiver), sent_(false) { +} + void Request::send() { assert(payload_); assert(!sent_); @@ -23,6 +29,7 @@ void Request::send() { boost::shared_ptr<IQ> iq(new IQ(type_)); iq->setTo(receiver_); + iq->setFrom(sender_); iq->addPayload(payload_); id_ = router_->getNewIQID(); iq->setID(id_); |