summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKevin Smith <git@kismith.co.uk>2012-02-14 09:37:48 (GMT)
committerKevin Smith <git@kismith.co.uk>2012-02-14 09:37:48 (GMT)
commitb05f8fcb285d2d13d2be50a3eb1062048fbe30f5 (patch)
tree497856182b8e72ad839c67c6b0bca6edbc28a292
parentaae3defeecd5a000db33c973f9241d8b9db12c0c (diff)
downloadswift-contrib-b05f8fcb285d2d13d2be50a3eb1062048fbe30f5.zip
swift-contrib-b05f8fcb285d2d13d2be50a3eb1062048fbe30f5.tar.bz2
Correctly use bare JIDs when banning people from rooms
-rw-r--r--Swiften/MUC/MUC.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/Swiften/MUC/MUC.cpp b/Swiften/MUC/MUC.cpp
index 9f6c7fb..9bcb279 100644
--- a/Swiften/MUC/MUC.cpp
+++ b/Swiften/MUC/MUC.cpp
@@ -291,19 +291,19 @@ void MUC::requestAffiliationList(MUCOccupant::Affiliation affiliation) {
}
/**
* Must be called with the real JID, not the room JID.
*/
void MUC::changeAffiliation(const JID& jid, MUCOccupant::Affiliation affiliation) {
MUCAdminPayload::ref mucPayload = boost::make_shared<MUCAdminPayload>();
MUCItem item;
item.affiliation = affiliation;
- item.realJID = jid;
+ item.realJID = jid.toBare();
mucPayload->addItem(item);
GenericRequest<MUCAdminPayload>* request = new GenericRequest<MUCAdminPayload>(IQ::Set, getJID(), mucPayload, iqRouter_);
request->onResponse.connect(boost::bind(&MUC::handleAffiliationChangeResponse, this, _1, _2, jid, affiliation));
request->send();
}
void MUC::handleAffiliationListResponse(MUCAdminPayload::ref payload, ErrorPayload::ref error, MUCOccupant::Affiliation affiliation) {
if (error) {
onAffiliationListFailed(error);