From b2334707107e65dd15590b7472c990bbf79549eb Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?louiz=E2=80=99?= <louiz@louiz.org>
Date: Fri, 14 Jul 2017 15:18:01 +0200
Subject: Send the 332 status only for our own presences

---
 src/xmpp/xmpp_component.cpp | 16 +++++++++-------
 1 file changed, 9 insertions(+), 7 deletions(-)

diff --git a/src/xmpp/xmpp_component.cpp b/src/xmpp/xmpp_component.cpp
index 7366422..9c3ba90 100644
--- a/src/xmpp/xmpp_component.cpp
+++ b/src/xmpp/xmpp_component.cpp
@@ -454,13 +454,15 @@ void XmppComponent::send_muc_leave(const std::string& muc_name, const std::strin
     x["xmlns"] = MUC_USER_NS;
     if (self)
       {
-        XmlSubNode status(x, "status");
-        status["code"] = "110";
-      }
-    if (!user_requested)
-      {
-        XmlSubNode status(x, "status");
-        status["code"] = "332";
+        {
+          XmlSubNode status(x, "status");
+          status["code"] = "110";
+        }
+        if (!user_requested)
+          {
+            XmlSubNode status(x, "status");
+            status["code"] = "332";
+          }
       }
     if (!message_str.empty())
       {
-- 
cgit v1.2.3