Correctly remove the last resource from the channel, in persistent mode

fix #3277
This commit is contained in:
louiz’
2017-07-16 20:22:23 +02:00
parent c0611c23f0
commit f7cbe8531d
+2
View File
@@ -457,6 +457,8 @@ void Bridge::leave_irc_channel(Iid&& iid, const std::string& status_message, con
{ {
this->send_muc_leave(iid, channel->get_self()->nick, "", true, true, resource); this->send_muc_leave(iid, channel->get_self()->nick, "", true, true, resource);
} }
if (persistent)
this->remove_resource_from_chan(key, resource);
// Since there are no resources left in that channel, we don't // Since there are no resources left in that channel, we don't
// want to receive private messages using this room's JID // want to receive private messages using this room's JID
this->remove_all_preferred_from_jid_of_room(iid.get_local()); this->remove_all_preferred_from_jid_of_room(iid.get_local());