Forward the topic authors, handle the author from 333 messages

fix #2
This commit is contained in:
louiz’
2016-04-22 10:49:07 +02:00
parent 64f341ee80
commit 04d28f968b
8 changed files with 31 additions and 10 deletions
+5 -2
View File
@@ -388,11 +388,14 @@ void XmppComponent::send_invalid_user_error(const std::string& user_name, const
this->send_stanza(message);
}
void XmppComponent::send_topic(const std::string& from, Xmpp::body&& topic, const std::string& to)
void XmppComponent::send_topic(const std::string& from, Xmpp::body&& topic, const std::string& to, const std::string& who)
{
XmlNode message("message");
message["to"] = to;
message["from"] = from + "@" + this->served_hostname;
if (who.empty())
message["from"] = from + "@" + this->served_hostname;
else
message["from"] = from + "@" + this->served_hostname + "/" + who;
message["type"] = "groupchat";
XmlNode subject("subject");
subject.set_inner(std::get<0>(topic));
+1 -1
View File
@@ -124,7 +124,7 @@ public:
/**
* Send the MUC topic to the user
*/
void send_topic(const std::string& from, Xmpp::body&& xmpp_topic, const std::string& to);
void send_topic(const std::string& from, Xmpp::body&& xmpp_topic, const std::string& to, const std::string& who);
/**
* Send a (non-private) message to the MUC
*/