Handle forced-join by just sending an invitation

fix #3116
This commit is contained in:
louiz’
2016-10-23 23:59:21 +02:00
parent 00eb18bae8
commit c3bb9fe2e2
2 changed files with 17 additions and 3 deletions
+4 -1
View File
@@ -855,7 +855,10 @@ void BiboumiComponent::send_invitation(const std::string& room_target,
XmlNode x("x");
x["xmlns"] = MUC_USER_NS;
XmlNode invite("invite");
invite["from"] = room_target + "@" + this->served_hostname + "/" + author_nick;
if (author_nick.empty())
invite["from"] = room_target + "@" + this->served_hostname;
else
invite["from"] = room_target + "@" + this->served_hostname + "/" + author_nick;
x.add_child(std::move(invite));
message.add_child(std::move(x));
this->send_stanza(message);