Hello community,

here is the log from the commit of package prosody for openSUSE:Factory checked 
in at 2019-01-11 14:05:01
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/prosody (Old)
 and      /work/SRC/openSUSE:Factory/.prosody.new.28833 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "prosody"

Fri Jan 11 14:05:01 2019 rev:14 rq:664303 version:0.11.2

Changes:
--------
--- /work/SRC/openSUSE:Factory/prosody/prosody.changes  2018-11-30 
16:32:17.961369970 +0100
+++ /work/SRC/openSUSE:Factory/.prosody.new.28833/prosody.changes       
2019-01-11 14:05:29.299800092 +0100
@@ -1,0 +2,19 @@
+Thu Jan 10 08:51:27 UTC 2019 - [email protected]
+
+- Update to 0.11.2:
+  * mod_csi_simple: Multiple enhancements to built-in ‘importance’ rules 
(fixes #1250)
+  * mod_vcard_legacy: Limit injection of XEP-0153 to normal presence (fixes 
#1252)
+  * util.datetime: Make sure timezone difference is calculated correctly 
(fixes #1262)
+  * MUC: Fix traceback when requesting voice (fixes #1269) (thanks jonas’)
+  * MUC: Adjust priorities of muc-get-default-role handlers (fixes #1272)
+  * MUC: Allow changing data attached to an only owner (fixes #1273)
+  * Multiple fixes and improvements to our experimental epoll (non-libevent) 
backend
+  * util.stanza: Deserialize stanza without mutating input (fixes #711)
+  * mod_mam: Only accept valid JIDs in and prefs. (fixes #1275)
+  * util.pubsub: Restore subscription index from stored data (fixes #1281)
+  * prosodyctl check: Add statisticsmanager settings to known global options
+  * util.startup: Always reload logging after config (fixes #1284)
+  * mod_posix: Don’t reload log files twice
+- Run spec-cleaner
+
+-------------------------------------------------------------------

Old:
----
  prosody-0.11.1.tar.gz
  prosody-0.11.1.tar.gz.asc

New:
----
  prosody-0.11.2.tar.gz
  prosody-0.11.2.tar.gz.asc

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ prosody.spec ++++++
--- /var/tmp/diff_new_pack.gufzDR/_old  2019-01-11 14:05:30.047799340 +0100
+++ /var/tmp/diff_new_pack.gufzDR/_new  2019-01-11 14:05:30.051799335 +0100
@@ -1,7 +1,7 @@
 #
 # spec file for package prosody
 #
-# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany.
+# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany.
 #
 # All modifications and additions to the file contributed by third parties
 # remain the property of their copyright owners, unless otherwise agreed
@@ -18,12 +18,12 @@
 
 %define _piddir /run
 Name:           prosody
-Version:        0.11.1
+Version:        0.11.2
 Release:        0
 Summary:        Communications server for Jabber/XMPP
 License:        MIT
 Group:          Productivity/Networking/Other
-Url:            http://prosody.im/
+URL:            http://prosody.im/
 Source:         http://prosody.im/downloads/source/%{name}-%{version}.tar.gz
 Source2:        
http://prosody.im/downloads/source/%{name}-%{version}.tar.gz.asc
 Source3:        %{name}.keyring
@@ -37,6 +37,7 @@
 BuildRequires:  libidn-devel
 BuildRequires:  libopenssl-devel
 BuildRequires:  lua51-devel
+BuildRequires:  systemd-rpm-macros
 Requires:       lua51
 Requires:       lua51-BitOp
 Requires:       lua51-luaexpat
@@ -48,7 +49,6 @@
 Recommends:     lua51-luadbi
 Recommends:     lua51-luaevent
 Recommends:     lua51-zlib
-BuildRequires:  systemd-rpm-macros
 %{?systemd_requires}
 
 %description
@@ -126,7 +126,7 @@
 %{_libdir}/prosody/net
 %{_libdir}/prosody/prosody.version
 %{_libdir}/prosody/util
-%{_mandir}/man1/prosodyctl.1*
+%{_mandir}/man1/prosodyctl.1%{?ext_man}
 %dir %attr(-,prosody,prosody) %{_localstatedir}/lib/prosody
 %dir %attr(-,prosody,prosody) %{_localstatedir}/log/prosody
 %{_sbindir}/rcprosody

++++++ prosody-0.11.1.tar.gz -> prosody-0.11.2.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/prosody-0.11.1/.hg_archival.txt 
new/prosody-0.11.2/.hg_archival.txt
--- old/prosody-0.11.1/.hg_archival.txt 2018-11-28 15:12:07.000000000 +0100
+++ new/prosody-0.11.2/.hg_archival.txt 2019-01-07 16:34:23.000000000 +0100
@@ -1,4 +1,4 @@
 repo: 3e3171b59028ee70122cfec6ecf98f518f946b59
-node: 91856829f18bb8ef7056ca02464122fc6de17807
+node: 4f8b6c09e5f328e3d3d4233dc78fa4fd0535171c
 branch: 0.11
-tag: 0.11.1
+tag: 0.11.2
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/prosody-0.11.1/net/server_epoll.lua 
new/prosody-0.11.2/net/server_epoll.lua
--- old/prosody-0.11.1/net/server_epoll.lua     2018-11-28 15:12:07.000000000 
+0100
+++ new/prosody-0.11.2/net/server_epoll.lua     2019-01-07 16:34:23.000000000 
+0100
@@ -35,14 +35,28 @@
 -- luacheck: std none
 
 local default_config = { __index = {
+       -- If a connection is silent for this long, close it unless 
onreadtimeout says not to
        read_timeout = 14 * 60;
-       write_timeout = 7;
+
+       -- How long to wait for a socket to become writable after queuing data 
to send
+       write_timeout = 60;
+
+       -- Some number possibly influencing how many pending connections can be 
accepted
        tcp_backlog = 128;
+
+       -- If accepting a new incoming connection fails, wait this long before 
trying again
        accept_retry_interval = 10;
+
+       -- If there is still more data to read from LuaSocktes buffer, wait 
this long and read again
        read_retry_delay = 1e-06;
+
+       -- Size of chunks to read from sockets
        read_size = 8192;
-       connect_timeout = 20;
+
+       -- Timeout used during between steps in TLS handshakes
        handshake_timeout = 60;
+
+       -- Maximum and minimum amount of time to sleep waiting for events 
(adjusted for pending timers)
        max_wait = 86400;
        min_wait = 1e-06;
 }};
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/prosody-0.11.1/plugins/mod_csi_simple.lua 
new/prosody-0.11.2/plugins/mod_csi_simple.lua
--- old/prosody-0.11.1/plugins/mod_csi_simple.lua       2018-11-28 
15:12:07.000000000 +0100
+++ new/prosody-0.11.2/plugins/mod_csi_simple.lua       2019-01-07 
16:34:23.000000000 +0100
@@ -63,8 +63,23 @@
                if st_type == "headline" then
                        return false;
                end
-               local body = stanza:get_child_text("body");
-               return body;
+               if stanza:get_child("sent", "urn:xmpp:carbons:2") then
+                       return true;
+               end
+               local forwarded = 
stanza:find("{urn:xmpp:carbons:2}received/{urn:xmpp:forward:0}/{jabber:client}message");
+               if forwarded then
+                       stanza = forwarded;
+               end
+               if stanza:get_child("body") then
+                       return true;
+               end
+               if stanza:get_child("subject") then
+                       return true;
+               end
+               if stanza:get_child("encryption", "urn:xmpp:eme:0") then
+                       return true;
+               end
+               return false;
        end
        return true;
 end, -1);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/prosody-0.11.1/plugins/mod_mam/mamprefsxml.lib.lua 
new/prosody-0.11.2/plugins/mod_mam/mamprefsxml.lib.lua
--- old/prosody-0.11.1/plugins/mod_mam/mamprefsxml.lib.lua      2018-11-28 
15:12:07.000000000 +0100
+++ new/prosody-0.11.2/plugins/mod_mam/mamprefsxml.lib.lua      2019-01-07 
16:34:23.000000000 +0100
@@ -2,6 +2,7 @@
 -- Copyright (C) 2008-2017 Matthew Wild
 -- Copyright (C) 2008-2017 Waqas Hussain
 -- Copyright (C) 2011-2017 Kim Alvefur
+-- Copyright (C) 2018 Emmanuel Gil Peyrot
 --
 -- This project is MIT/X11 licensed. Please see the
 -- COPYING file in the source package for more information.
@@ -10,6 +11,7 @@
 --
 
 local st = require"util.stanza";
+local jid_prep = require"util.jid".prep;
 local xmlns_mam = "urn:xmpp:mam:2";
 
 local default_attrs = {
@@ -42,16 +44,20 @@
        local always = prefstanza:get_child("always");
        if always then
                for rule in always:childtags("jid") do
-                       local jid = rule:get_text();
-                       prefs[jid] = true;
+                       local jid = jid_prep(rule:get_text());
+                       if jid then
+                               prefs[jid] = true;
+                       end
                end
        end
 
        local never = prefstanza:get_child("never");
        if never then
                for rule in never:childtags("jid") do
-                       local jid = rule:get_text();
-                       prefs[jid] = false;
+                       local jid = jid_prep(rule:get_text());
+                       if jid then
+                               prefs[jid] = false;
+                       end
                end
        end
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/prosody-0.11.1/plugins/mod_posix.lua 
new/prosody-0.11.2/plugins/mod_posix.lua
--- old/prosody-0.11.1/plugins/mod_posix.lua    2018-11-28 15:12:07.000000000 
+0100
+++ new/prosody-0.11.2/plugins/mod_posix.lua    2019-01-07 16:34:23.000000000 
+0100
@@ -172,7 +172,7 @@
                signal.signal("SIGHUP", function ()
                        module:log("info", "Received SIGHUP");
                        prosody.reload_config();
-                       prosody.reopen_logfiles();
+                       -- this also reloads logging
                end);
 
                signal.signal("SIGINT", function ()
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/prosody-0.11.1/plugins/mod_vcard_legacy.lua 
new/prosody-0.11.2/plugins/mod_vcard_legacy.lua
--- old/prosody-0.11.1/plugins/mod_vcard_legacy.lua     2018-11-28 
15:12:07.000000000 +0100
+++ new/prosody-0.11.2/plugins/mod_vcard_legacy.lua     2019-01-07 
16:34:23.000000000 +0100
@@ -274,6 +274,7 @@
        local origin, stanza = event.origin, event.stanza;
        local username = origin.username;
        if not username then return end
+       if stanza.attr.type then return end
        local pep_service = mod_pep.get_pep_service(username);
 
        stanza:remove_children("x", "vcard-temp:x:update");
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/prosody-0.11.1/plugins/muc/members_only.lib.lua 
new/prosody-0.11.2/plugins/muc/members_only.lib.lua
--- old/prosody-0.11.1/plugins/muc/members_only.lib.lua 2018-11-28 
15:12:07.000000000 +0100
+++ new/prosody-0.11.2/plugins/muc/members_only.lib.lua 2019-01-07 
16:34:23.000000000 +0100
@@ -104,7 +104,7 @@
        if not event.affiliation and get_members_only(event.room) then
                return false;
        end
-end);
+end, 2);
 
 -- registration required for entering members-only room
 module:hook("muc-occupant-pre-join", function(event)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/prosody-0.11.1/plugins/muc/muc.lib.lua 
new/prosody-0.11.2/plugins/muc/muc.lib.lua
--- old/prosody-0.11.1/plugins/muc/muc.lib.lua  2018-11-28 15:12:07.000000000 
+0100
+++ new/prosody-0.11.2/plugins/muc/muc.lib.lua  2019-01-07 16:34:23.000000000 
+0100
@@ -61,7 +61,7 @@
        elseif event.affiliation_rank >= valid_affiliations.none then
                return "participant";
        end
-end);
+end, -1);
 
 --- Occupant functions
 function room_mt:new_occupant(bare_real_jid, nick)
@@ -1254,7 +1254,7 @@
        else
                local actor_affiliation = self:get_affiliation(actor);
                if actor_affiliation == "owner" then
-                       if jid_bare(actor) == jid then -- self change
+                       if jid_bare(actor) == jid and is_downgrade then -- self 
change
                                -- need at least one owner
                                local is_last = true;
                                for j in self:each_affiliation("owner") do
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/prosody-0.11.1/plugins/muc/request.lib.lua 
new/prosody-0.11.2/plugins/muc/request.lib.lua
--- old/prosody-0.11.1/plugins/muc/request.lib.lua      2018-11-28 
15:12:07.000000000 +0100
+++ new/prosody-0.11.2/plugins/muc/request.lib.lua      2019-01-07 
16:34:23.000000000 +0100
@@ -82,7 +82,7 @@
                };
 
                local message = st.message({ type = "normal"; from = 
event.room.jid })
-                       :add_direct_child(voice_request_form:form(formdata));
+                       :add_child(voice_request_form:form(formdata));
 
                event.room:broadcast(message, function (_, occupant)
                        return occupant.role == "moderator";
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/prosody-0.11.1/prosody.release 
new/prosody-0.11.2/prosody.release
--- old/prosody-0.11.1/prosody.release  2018-11-28 15:12:07.000000000 +0100
+++ new/prosody-0.11.2/prosody.release  2019-01-09 15:18:51.000000000 +0100
@@ -1 +1 @@
-0.11.1
+0.11.2
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/prosody-0.11.1/prosodyctl 
new/prosody-0.11.2/prosodyctl
--- old/prosody-0.11.1/prosodyctl       2018-11-28 15:12:07.000000000 +0100
+++ new/prosody-0.11.2/prosodyctl       2019-01-07 16:34:23.000000000 +0100
@@ -812,6 +812,7 @@
                        "pidfile", "log", "plugin_paths", "prosody_user", 
"prosody_group", "daemonize",
                        "umask", "prosodyctl_timeout", "use_ipv6", 
"use_libevent", "network_settings",
                        "network_backend", "http_default_host",
+                       "statistics_interval", "statistics", 
"statistics_config",
                });
                local config = configmanager.getconfig();
                -- Check that we have any global options (caused by putting a 
host at the top)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/prosody-0.11.1/spec/net_websocket_frames_spec.lua 
new/prosody-0.11.2/spec/net_websocket_frames_spec.lua
--- old/prosody-0.11.1/spec/net_websocket_frames_spec.lua       1970-01-01 
01:00:00.000000000 +0100
+++ new/prosody-0.11.2/spec/net_websocket_frames_spec.lua       2019-01-07 
16:34:23.000000000 +0100
@@ -0,0 +1,56 @@
+describe("net.websocket.frames", function ()
+       local nwf = require "net.websocket.frames";
+
+       local test_frames = {
+               simple_empty = {
+                       ["opcode"] = 0;
+                       ["length"] = 0;
+                       ["data"] = "";
+                       ["FIN"] = false;
+                       ["MASK"] = false;
+                       ["RSV1"] = false;
+                       ["RSV2"] = false;
+                       ["RSV3"] = false;
+               };
+               simple_data = {
+                       ["opcode"] = 0;
+                       ["length"] = 5;
+                       ["data"] = "hello";
+                       ["FIN"] = false;
+                       ["MASK"] = false;
+                       ["RSV1"] = false;
+                       ["RSV2"] = false;
+                       ["RSV3"] = false;
+               };
+               simple_fin = {
+                       ["opcode"] = 0;
+                       ["length"] = 0;
+                       ["data"] = "";
+                       ["FIN"] = true;
+                       ["MASK"] = false;
+                       ["RSV1"] = false;
+                       ["RSV2"] = false;
+                       ["RSV3"] = false;
+               };
+       }
+
+       describe("build", function ()
+               local build = nwf.build;
+               it("works", function ()
+                       assert.equal("\0\0", build(test_frames.simple_empty));
+                       assert.equal("\0\5hello", 
build(test_frames.simple_data));
+                       assert.equal("\128\0", build(test_frames.simple_fin));
+               end);
+       end);
+
+       describe("parse", function ()
+               local parse = nwf.parse;
+               it("works", function ()
+                       assert.same(test_frames.simple_empty, parse("\0\0"));
+                       assert.same(test_frames.simple_data, 
parse("\0\5hello"));
+                       assert.same(test_frames.simple_fin, parse("\128\0"));
+               end);
+       end);
+
+end);
+
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/prosody-0.11.1/spec/scansion/mam_prefs_prep.scs 
new/prosody-0.11.2/spec/scansion/mam_prefs_prep.scs
--- old/prosody-0.11.1/spec/scansion/mam_prefs_prep.scs 1970-01-01 
01:00:00.000000000 +0100
+++ new/prosody-0.11.2/spec/scansion/mam_prefs_prep.scs 2019-01-07 
16:34:23.000000000 +0100
@@ -0,0 +1,36 @@
+# mod_mam shold apply JIDprep in prefs
+
+[Client] Romeo
+       jid: romeo@localhost
+       password: password
+
+-----
+
+Romeo connects
+
+Romeo sends:
+       <iq id="lx2" type="set">
+               <prefs xmlns="urn:xmpp:mam:2" default="roster">
+                       <always>
+                               <jid>[email protected]</jid>
+                       </always>
+                       <never>
+                               <jid>[email protected]</jid>
+                       </never>
+               </prefs>
+       </iq>
+
+Romeo receives:
+       <iq id="lx2" type="result">
+               <prefs xmlns="urn:xmpp:mam:2" default="roster">
+                       <always>
+                               <jid>[email protected]</jid>
+                       </always>
+                       <never>
+                               <jid>[email protected]</jid>
+                       </never>
+               </prefs>
+       </iq>
+
+Romeo disconnects
+
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/prosody-0.11.1/spec/scansion/muc_members_only_change.scs 
new/prosody-0.11.2/spec/scansion/muc_members_only_change.scs
--- old/prosody-0.11.1/spec/scansion/muc_members_only_change.scs        
1970-01-01 01:00:00.000000000 +0100
+++ new/prosody-0.11.2/spec/scansion/muc_members_only_change.scs        
2019-01-07 16:34:23.000000000 +0100
@@ -0,0 +1,114 @@
+# MUC: Members-only rooms kick members who lose affiliation
+
+[Client] Romeo
+       jid: user@localhost
+       password: password
+
+[Client] Juliet
+       jid: user2@localhost
+       password: password
+
+-----
+
+Romeo connects
+
+Romeo sends:
+       <presence to="[email protected]/Romeo">
+               <x xmlns="http://jabber.org/protocol/muc"/>
+       </presence>
+
+Romeo receives:
+       <presence from='[email protected]/Romeo'>
+               <x xmlns='http://jabber.org/protocol/muc#user'>
+                       <status code='201'/>
+                       <item jid="${Romeo's full JID}" affiliation='owner' 
role='moderator'/>
+                       <status code='110'/>
+               </x>
+       </presence>
+
+Romeo receives:
+       <message type='groupchat' 
from='[email protected]'><subject/></message>
+
+# Submit config form, set the room to members-only
+Romeo sends:
+       <iq id='config1' to='[email protected]' type='set'>
+               <query xmlns='http://jabber.org/protocol/muc#owner'>
+                       <x xmlns='jabber:x:data' type='submit'>
+                               <field var='FORM_TYPE'>
+                                       
<value>http://jabber.org/protocol/muc#roomconfig</value>
+                               </field>
+                               <field var='muc#roomconfig_membersonly'>
+                                       <value>1</value>
+                               </field>
+                       </x>
+               </query>
+       </iq>
+
+Romeo receives:
+       <iq id="config1" from="[email protected]" type="result">
+       </iq>
+
+# Romeo adds Juliet to the member list
+Romeo sends:
+       <iq id='member1' to='[email protected]' type='set'>
+               <query xmlns='http://jabber.org/protocol/muc#admin'>
+                       <item affiliation='member' jid="${Juliet's JID}" />
+               </query>
+       </iq>
+
+Romeo receives:
+       <message from='[email protected]'>
+               <x xmlns='http://jabber.org/protocol/muc#user'>
+                       <item jid="${Juliet's JID}" affiliation='member' />
+               </x>
+       </message>
+
+Romeo receives:
+       <iq from='[email protected]' id='member1' type='result'/>
+
+# Juliet connects, and joins the room
+Juliet connects
+
+Juliet sends:
+       <presence to="[email protected]/Juliet">
+               <x xmlns="http://jabber.org/protocol/muc"/>
+       </presence>
+
+Juliet receives:
+       <presence from="[email protected]/Romeo" />
+
+Juliet receives:
+       <presence from="[email protected]/Juliet" />
+
+Juliet receives:
+       <message type='groupchat' 
from='[email protected]'><subject/></message>
+
+Romeo receives:
+       <presence from="[email protected]/Juliet" />
+
+
+# Romeo removes Juliet's membership status
+Romeo sends:
+       <iq id='member2' to='[email protected]' type='set'>
+               <query xmlns='http://jabber.org/protocol/muc#admin'>
+                       <item affiliation='none' jid="${Juliet's JID}" />
+               </query>
+       </iq>
+       
+# As a non-member, Juliet must now be removed from the room
+Romeo receives:
+       <presence type='unavailable' from='[email protected]/Juliet'>
+               <x xmlns='http://jabber.org/protocol/muc#user'>
+                       <status code='321'/>
+                       <item role='none' jid="${Juliet's full JID}" 
affiliation='none'>
+                               <actor nick='Romeo' jid="${Romeo's full JID}"/>
+                       </item>
+               </x>
+       </presence>
+
+Romeo receives:
+       <iq id='member2' type='result'/>
+
+Romeo disconnects
+
+Juliet disconnects
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/prosody-0.11.1/spec/scansion/muc_members_only_deregister.scs 
new/prosody-0.11.2/spec/scansion/muc_members_only_deregister.scs
--- old/prosody-0.11.1/spec/scansion/muc_members_only_deregister.scs    
1970-01-01 01:00:00.000000000 +0100
+++ new/prosody-0.11.2/spec/scansion/muc_members_only_deregister.scs    
2019-01-07 16:34:23.000000000 +0100
@@ -0,0 +1,122 @@
+# MUC: Members-only rooms kick members who deregister
+
+[Client] Romeo
+       jid: user@localhost
+       password: password
+
+[Client] Juliet
+       jid: user2@localhost
+       password: password
+
+-----
+
+Romeo connects
+
+Romeo sends:
+       <presence to="[email protected]/Romeo">
+               <x xmlns="http://jabber.org/protocol/muc"/>
+       </presence>
+
+Romeo receives:
+       <presence from='[email protected]/Romeo'>
+               <x xmlns='http://jabber.org/protocol/muc#user'>
+                       <status code='201'/>
+                       <item jid="${Romeo's full JID}" affiliation='owner' 
role='moderator'/>
+                       <status code='110'/>
+               </x>
+       </presence>
+
+Romeo receives:
+       <message type='groupchat' 
from='[email protected]'><subject/></message>
+
+# Submit config form, set the room to members-only
+Romeo sends:
+       <iq id='config1' to='[email protected]' type='set'>
+               <query xmlns='http://jabber.org/protocol/muc#owner'>
+                       <x xmlns='jabber:x:data' type='submit'>
+                               <field var='FORM_TYPE'>
+                                       
<value>http://jabber.org/protocol/muc#roomconfig</value>
+                               </field>
+                               <field var='muc#roomconfig_membersonly'>
+                                       <value>1</value>
+                               </field>
+                       </x>
+               </query>
+       </iq>
+
+Romeo receives:
+       <iq id="config1" from="[email protected]" type="result">
+       </iq>
+
+# Romeo adds Juliet to the member list
+Romeo sends:
+       <iq id='member1' to='[email protected]' type='set'>
+               <query xmlns='http://jabber.org/protocol/muc#admin'>
+                       <item affiliation='member' jid="${Juliet's JID}" />
+               </query>
+       </iq>
+
+Romeo receives:
+       <message from='[email protected]'>
+               <x xmlns='http://jabber.org/protocol/muc#user'>
+                       <item jid="${Juliet's JID}" affiliation='member' />
+               </x>
+       </message>
+
+Romeo receives:
+       <iq from='[email protected]' id='member1' type='result'/>
+
+# Juliet connects, and joins the room
+Juliet connects
+
+Juliet sends:
+       <presence to="[email protected]/Juliet">
+               <x xmlns="http://jabber.org/protocol/muc"/>
+       </presence>
+
+Juliet receives:
+       <presence from="[email protected]/Romeo" />
+
+Juliet receives:
+       <presence from="[email protected]/Juliet" />
+
+Juliet receives:
+       <message type='groupchat' 
from='[email protected]'><subject/></message>
+
+Romeo receives:
+       <presence from="[email protected]/Juliet" />
+
+
+# Tired of Romeo's company, Juliet unregisters from the room
+
+Juliet sends:
+       <iq type='set' to='[email protected]' id='unreg1'>
+               <query xmlns='jabber:iq:register'>
+                       <remove/>
+               </query>
+       </iq>
+
+Juliet receives:
+       <presence type='unavailable' from='[email protected]/Juliet'>
+               <x xmlns='http://jabber.org/protocol/muc#user'>
+                       <status code='321'/>
+                       <item affiliation='none' role='none' jid="${Juliet's 
full JID}" />
+                       <status code='110'/>
+                 </x>
+       </presence>
+
+Juliet receives:
+       <iq type='result' from='[email protected]' id='unreg1'/>
+
+Romeo receives:
+       <presence type='unavailable' from='[email protected]/Juliet'>
+               <x xmlns='http://jabber.org/protocol/muc#user'>
+                       <status code='321'/>
+                       <item affiliation='none' role='none' jid="${Juliet's 
full JID}" />
+                 </x>
+       </presence>
+
+
+Romeo disconnects
+
+Juliet disconnects
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/prosody-0.11.1/spec/scansion/muc_register.scs 
new/prosody-0.11.2/spec/scansion/muc_register.scs
--- old/prosody-0.11.1/spec/scansion/muc_register.scs   2018-11-28 
15:12:07.000000000 +0100
+++ new/prosody-0.11.2/spec/scansion/muc_register.scs   2019-01-07 
16:34:23.000000000 +0100
@@ -504,3 +504,25 @@
                        <status xmlns='http://jabber.org/protocol/muc#user' 
code='110'/>
                </x>
        </presence>
+
+# Romeo sets their their own nickname via admin query (see #1273)
+Romeo sends:
+       <iq to="[email protected]" id="reserve" type="set">
+               <query xmlns="http://jabber.org/protocol/muc#admin";>
+                       <item nick="Romeo" affiliation="owner" jid="${Romeo's 
JID}"/>
+               </query>
+       </iq>
+
+Romeo receives:
+       <presence from="[email protected]/Romeo">
+               <x xmlns="http://jabber.org/protocol/muc#user";>
+                       <item xmlns="http://jabber.org/protocol/muc#user"; 
role="moderator" jid="${Romeo's full JID}" affiliation="owner">
+                               <actor 
xmlns="http://jabber.org/protocol/muc#user"; nick="Romeo"/>
+                       </item>
+                       <status xmlns="http://jabber.org/protocol/muc#user"; 
code="110"/>
+               </x>
+       </presence>
+
+Romeo receives:
+       <iq from="[email protected]" id="reserve" type="result"/>
+
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/prosody-0.11.1/spec/scansion/prosody.cfg.lua 
new/prosody-0.11.2/spec/scansion/prosody.cfg.lua
--- old/prosody-0.11.1/spec/scansion/prosody.cfg.lua    2018-11-28 
15:12:07.000000000 +0100
+++ new/prosody-0.11.2/spec/scansion/prosody.cfg.lua    2019-01-07 
16:34:23.000000000 +0100
@@ -25,7 +25,7 @@
                "time"; -- Let others know the time here on this server
                "ping"; -- Replies to XMPP pings with pongs
                "register"; -- Allow users to register on this server using a 
client and change passwords
-               --"mam"; -- Store messages in an archive and allow users to 
access it
+               "mam"; -- Store messages in an archive and allow users to 
access it
 
        -- HTTP modules
                --"bosh"; -- Enable BOSH clients, aka "Jabber over HTTP"
@@ -59,6 +59,7 @@
 
 storage = "memory"
 
+mam_smart_enable = true
 
 -- For the "sql" backend, you can uncomment *one* of the below to configure:
 --sql = { driver = "SQLite3", database = "prosody.sqlite" } -- Default. 
'database' is the filename.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/prosody-0.11.1/spec/util_pubsub_spec.lua 
new/prosody-0.11.2/spec/util_pubsub_spec.lua
--- old/prosody-0.11.1/spec/util_pubsub_spec.lua        2018-11-28 
15:12:07.000000000 +0100
+++ new/prosody-0.11.2/spec/util_pubsub_spec.lua        2019-01-07 
16:34:23.000000000 +0100
@@ -375,4 +375,34 @@
                        end);
                end);
        end);
+
+       describe("restoring data from nodestore", function ()
+               local nodestore = {
+                       data = {
+                               test = {
+                                       name = "test";
+                                       config = {};
+                                       affiliations = {};
+                                       subscribers = {
+                                               ["someone"] = true;
+                                       };
+                               }
+                       }
+               };
+               function nodestore:users()
+                       return pairs(self.data)
+               end
+               function nodestore:get(key)
+                       return self.data[key];
+               end
+               local service = pubsub.new({
+                       nodestore = nodestore;
+               });
+               it("subscriptions", function ()
+                       local ok, ret = service:get_subscriptions(nil, true, 
nil)
+                       assert.is_true(ok);
+                       assert.same({ { node = "test", jid = "someone", 
subscription = true, } }, ret);
+               end);
+       end);
+
 end);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/prosody-0.11.1/spec/util_stanza_spec.lua 
new/prosody-0.11.2/spec/util_stanza_spec.lua
--- old/prosody-0.11.1/spec/util_stanza_spec.lua        2018-11-28 
15:12:07.000000000 +0100
+++ new/prosody-0.11.2/spec/util_stanza_spec.lua        2019-01-07 
16:34:23.000000000 +0100
@@ -4,23 +4,33 @@
 describe("util.stanza", function()
        describe("#preserialize()", function()
                it("should work", function()
-                       local stanza = st.stanza("message", { a = "a" });
+                       local stanza = st.stanza("message", { type = "chat" 
}):text_tag("body", "Hello");
                        local stanza2 = st.preserialize(stanza);
-                       assert.is_string(stanza2 and stanza.name, "preserialize 
returns a stanza");
+                       assert.is_table(stanza2, "Preserialized stanza is a 
table");
+                       assert.is_nil(getmetatable(stanza2), "Preserialized 
stanza has no metatable");
+                       assert.is_string(stanza2.name, "Preserialized stanza 
has a name field");
+                       assert.equal(stanza.name, stanza2.name, "Preserialized 
stanza has same name as the input stanza");
+                       assert.same(stanza.attr, stanza2.attr, "Preserialized 
stanza same attr table as input stanza");
                        assert.is_nil(stanza2.tags, "Preserialized stanza has 
no tag list");
                        assert.is_nil(stanza2.last_add, "Preserialized stanza 
has no last_add marker");
-                       assert.is_nil(getmetatable(stanza2), "Preserialized 
stanza has no metatable");
+                       assert.is_table(stanza2[1], "Preserialized child 
element preserved");
+                       assert.equal("body", stanza2[1].name, "Preserialized 
child element name preserved");
                end);
        end);
 
-       describe("#preserialize()", function()
+       describe("#deserialize()", function()
                it("should work", function()
-                       local stanza = st.stanza("message", { a = "a" });
+                       local stanza = { name = "message", attr = { type = 
"chat" }, { name = "body", attr = { }, "Hello" } };
                        local stanza2 = st.deserialize(st.preserialize(stanza));
-                       assert.is_string(stanza2 and stanza.name, "deserialize 
returns a stanza");
-                       assert.is_table(stanza2.attr, "Deserialized stanza has 
attributes");
-                       assert.are.equal(stanza2.attr.a, "a", "Deserialized 
stanza retains attributes");
-                       assert.is_table(getmetatable(stanza2), "Deserialized 
stanza has metatable");
+
+                       assert.is_table(stanza2, "Deserialized stanza is a 
table");
+                       assert.equal(st.stanza_mt, getmetatable(stanza2), 
"Deserialized stanza has stanza metatable");
+                       assert.is_string(stanza2.name, "Deserialized stanza has 
a name field");
+                       assert.equal(stanza.name, stanza2.name, "Deserialized 
stanza has same name as the input table");
+                       assert.same(stanza.attr, stanza2.attr, "Deserialized 
stanza same attr table as input table");
+                       assert.is_table(stanza2.tags, "Deserialized stanza has 
tag list");
+                       assert.is_table(stanza2[1], "Deserialized child element 
preserved");
+                       assert.equal("body", stanza2[1].name, "Deserialized 
child element name preserved");
                end);
        end);
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/prosody-0.11.1/util/datetime.lua 
new/prosody-0.11.2/util/datetime.lua
--- old/prosody-0.11.1/util/datetime.lua        2018-11-28 15:12:07.000000000 
+0100
+++ new/prosody-0.11.2/util/datetime.lua        2019-01-07 16:34:23.000000000 
+0100
@@ -38,7 +38,8 @@
                local year, month, day, hour, min, sec, tzd;
                year, month, day, hour, min, sec, tzd = 
s:match("^(%d%d%d%d)%-?(%d%d)%-?(%d%d)T(%d%d):(%d%d):(%d%d)%.?%d*([Z+%-]?.*)$");
                if year then
-                       local time_offset = os_difftime(os_time(os_date("*t")), 
os_time(os_date("!*t"))); -- to deal with local timezone
+                       local now = os_time();
+                       local time_offset = os_difftime(os_time(os_date("*t", 
now)), os_time(os_date("!*t", now))); -- to deal with local timezone
                        local tzd_offset = 0;
                        if tzd ~= "" and tzd ~= "Z" then
                                local sign, h, m = 
tzd:match("([+%-])(%d%d):?(%d*)");
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/prosody-0.11.1/util/pubsub.lua 
new/prosody-0.11.2/util/pubsub.lua
--- old/prosody-0.11.1/util/pubsub.lua  2018-11-28 15:12:07.000000000 +0100
+++ new/prosody-0.11.2/util/pubsub.lua  2019-01-07 16:34:23.000000000 +0100
@@ -177,6 +177,20 @@
                for node_name in config.nodestore:users() do
                        service.nodes[node_name] = 
load_node_from_store(service, node_name);
                        service.data[node_name] = 
config.itemstore(service.nodes[node_name].config, node_name);
+
+                       for jid in pairs(service.nodes[node_name].subscribers) 
do
+                               local normal_jid = 
service.config.normalize_jid(jid);
+                               local subs = service.subscriptions[normal_jid];
+                               if subs then
+                                       if not subs[jid] then
+                                               subs[jid] = { [node_name] = 
true };
+                                       else
+                                               subs[jid][node_name] = true;
+                                       end
+                               else
+                                       service.subscriptions[normal_jid] = { 
[jid] = { [node_name] = true } };
+                               end
+                       end
                end
        end
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/prosody-0.11.1/util/stanza.lua 
new/prosody-0.11.2/util/stanza.lua
--- old/prosody-0.11.1/util/stanza.lua  2018-11-28 15:12:07.000000000 +0100
+++ new/prosody-0.11.2/util/stanza.lua  2019-01-07 16:34:23.000000000 +0100
@@ -361,41 +361,31 @@
 
 stanza_mt.__freeze = preserialize;
 
-local function deserialize(stanza)
+local function deserialize(serialized)
        -- Set metatable
-       if stanza then
-               local attr = stanza.attr;
-               for i=1,#attr do attr[i] = nil; end
+       if serialized then
+               local attr = serialized.attr;
                local attrx = {};
-               for att in pairs(attr) do
-                       if s_find(att, "|", 1, true) and not s_find(att, "\1", 
1, true) then
-                               local ns,na = s_match(att, "^([^|]+)|(.+)$");
-                               attrx[ns.."\1"..na] = attr[att];
-                               attr[att] = nil;
+               for att, val in pairs(attr) do
+                       if type(att) == "string" then
+                               if s_find(att, "|", 1, true) and not 
s_find(att, "\1", 1, true) then
+                                       local ns,na = s_match(att, 
"^([^|]+)|(.+)$");
+                                       attrx[ns.."\1"..na] = val;
+                               else
+                                       attrx[att] = val;
+                               end
                        end
                end
-               for a,v in pairs(attrx) do
-                       attr[a] = v;
-               end
-               setmetatable(stanza, stanza_mt);
-               for _, child in ipairs(stanza) do
+               local stanza = new_stanza(serialized.name, attrx);
+               for _, child in ipairs(serialized) do
                        if type(child) == "table" then
-                               deserialize(child);
-                       end
-               end
-               if not stanza.tags then
-                       -- Rebuild tags
-                       local tags = {};
-                       for _, child in ipairs(stanza) do
-                               if type(child) == "table" then
-                                       t_insert(tags, child);
-                               end
+                               stanza:add_direct_child(deserialize(child));
+                       elseif type(child) == "string" then
+                               stanza:add_direct_child(child);
                        end
-                       stanza.tags = tags;
                end
+               return stanza;
        end
-
-       return stanza;
 end
 
 local function _clone(stanza)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/prosody-0.11.1/util/startup.lua 
new/prosody-0.11.2/util/startup.lua
--- old/prosody-0.11.1/util/startup.lua 2018-11-28 15:12:07.000000000 +0100
+++ new/prosody-0.11.2/util/startup.lua 2019-01-07 16:34:23.000000000 +0100
@@ -87,6 +87,9 @@
        -- Initialize logging
        local loggingmanager = require "core.loggingmanager"
        loggingmanager.reload_logging();
+       prosody.events.add_handler("config-reloaded", function ()
+               prosody.events.fire_event("reopen-log-files");
+       end);
        prosody.events.add_handler("reopen-log-files", function ()
                loggingmanager.reload_logging();
                prosody.events.fire_event("logging-reloaded");
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/prosody-0.11.1/util-src/makefile 
new/prosody-0.11.2/util-src/makefile
--- old/prosody-0.11.1/util-src/makefile        2018-11-28 15:12:07.000000000 
+0100
+++ new/prosody-0.11.2/util-src/makefile        2019-01-07 16:34:23.000000000 
+0100
@@ -5,7 +5,8 @@
 INSTALL_DATA=install -m644
 TARGET?=../util/
 
-ALL=encodings.so hashes.so net.so pposix.so signal.so table.so ringbuffer.so 
time.so
+ALL=encodings.so hashes.so net.so pposix.so signal.so table.so \
+    ringbuffer.so time.so poll.so compat.so
 
 .ifdef $(RANDOM)
 ALL+=crand.so



Reply via email to