~singpolyma/biboumi

0d9c1ba31336f137202471841fd4fc7ca78a5c11 — Florent Le Coz 8 years ago cfca16b + 804b686
Merge branch 'master' into dummy_chan
1 files changed, 13 insertions(+), 5 deletions(-)

M src/xmpp/xmpp_component.cpp
M src/xmpp/xmpp_component.cpp => src/xmpp/xmpp_component.cpp +13 -5
@@ 577,13 577,21 @@ void XmppComponent::send_muc_leave(std::string&& muc_name, std::string&& nick, X
  presence["from"] = muc_name + "@" + this->served_hostname + "/" + nick;
  presence["type"] = "unavailable";
  const std::string message_str = std::get<0>(message);
  if (!message_str.empty() || self)
  XmlNode x("x");
  x["xmlns"] = MUC_USER_NS;
  if (self)
    {
      XmlNode status("status");
      status["code"] = "110";
      status.close();
      x.add_child(std::move(status));
    }
  x.close();
  presence.add_child(std::move(x));
  if (!message_str.empty())
    {
      XmlNode status("status");
      if (!message_str.empty())
        status.set_inner(message_str);
      if (self)
        status["code"] = "110";
      status.set_inner(message_str);
      status.close();
      presence.add_child(std::move(status));
    }