diff options
Diffstat (limited to 'Swiften/Roster/RosterPushResponder.h')
-rw-r--r-- | Swiften/Roster/RosterPushResponder.h | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/Swiften/Roster/RosterPushResponder.h b/Swiften/Roster/RosterPushResponder.h index b38914b..4e0bc4e 100644 --- a/Swiften/Roster/RosterPushResponder.h +++ b/Swiften/Roster/RosterPushResponder.h @@ -21,8 +21,13 @@ namespace Swift { private: virtual bool handleSetRequest(const JID& from, const JID&, const std::string& id, boost::shared_ptr<RosterPayload> payload) { - onRosterReceived(payload); - sendResponse(from, id, boost::shared_ptr<RosterPayload>()); + if (getIQRouter()->isAccountJID(from)) { + onRosterReceived(payload); + sendResponse(from, id, boost::shared_ptr<RosterPayload>()); + } + else { + sendError(from, id, ErrorPayload::NotAuthorized, ErrorPayload::Cancel); + } return true; } }; |