Changeset

1994:f263fcf1b0ed

Merge with Goffi
author Kim Alvefur <zash@zash.se>
date Mon, 21 Dec 2015 12:24:21 +0100
parents 1987:6d7699eda594 (current diff) 1993:66aaf7c3cb29 (diff)
children 1995:0e008f36a91c
files
diffstat 4 files changed, 54 insertions(+), 54 deletions(-) [+]
line wrap: on
line diff
--- a/mod_delegation/README.markdown	Sun Dec 20 21:55:49 2015 +0100
+++ b/mod_delegation/README.markdown	Mon Dec 21 12:24:21 2015 +0100
@@ -20,26 +20,6 @@
 [XEP-0355](http://xmpp.org/extensions/xep-0355.html). Only the admin
 mode is implemented so far.
 
-If you use it with a component, you need to patch
-core/mod\_component.lua to fire a new signal. To do it, copy the
-following patch in a, for example, /tmp/component.patch file:
-
-    diff --git a/plugins/mod_component.lua b/plugins/mod_component.lua
-    --- a/plugins/mod_component.lua
-    +++ b/plugins/mod_component.lua
-    @@ -85,6 +85,7 @@
-                    session.type = "component";
-                    module:log("info", "External component successfully authenticated");
-                    session.send(st.stanza("handshake"));
-    +               module:fire_event("component-authenticated", { session = session });
-     
-                    return true;
-            end
-
-Then, at the root of prosody, enter:
-
-`patch -p1 < /tmp/component.patch`
-
 Usage
 =====
 
@@ -98,8 +78,28 @@
 Compatibility
 =============
 
+If you use it with Prosody 0.9 and a component, you need to patch
+core/mod\_component.lua to fire a new signal. To do it, copy the
+following patch in a, for example, /tmp/component.patch file:
+
+    diff --git a/plugins/mod_component.lua b/plugins/mod_component.lua
+    --- a/plugins/mod_component.lua
+    +++ b/plugins/mod_component.lua
+    @@ -85,6 +85,7 @@
+                    session.type = "component";
+                    module:log("info", "External component successfully authenticated");
+                    session.send(st.stanza("handshake"));
+    +               module:fire_event("component-authenticated", { session = session });
+     
+                    return true;
+            end
+
+Then, at the root of prosody, enter:
+
+`patch -p1 < /tmp/component.patch`
+
   ----- ----------------------------------------------------
-  dev   Need a patched core/mod\_component.lua (see above)
+  0.10  Works
   0.9   Need a patched core/mod\_component.lua (see above)
   ----- ----------------------------------------------------
 
--- a/mod_delegation/mod_delegation.lua	Sun Dec 20 21:55:49 2015 +0100
+++ b/mod_delegation/mod_delegation.lua	Mon Dec 21 12:24:21 2015 +0100
@@ -9,9 +9,9 @@
 
 -- TODO: client mode
 
-local jid = require("util/jid")
-local st = require("util/stanza")
-local set = require("util/set")
+local jid = require("util.jid")
+local st = require("util.stanza")
+local set = require("util.set")
 
 local delegation_session = module:shared("/*/delegation/session")
 
@@ -265,7 +265,7 @@
 			end
 			if ns_data.filtering then
 				local first_child = stanza.tags[1]
-				for _, attribute in ns_data.filtering do
+				for _, attribute in pairs(ns_data.filtering) do
 					-- if any filtered attribute if not present,
 					-- we must continue the normal bahaviour
 					if not first_child.attr[attribute] then
--- a/mod_privilege/README.markdown	Sun Dec 20 21:55:49 2015 +0100
+++ b/mod_privilege/README.markdown	Mon Dec 21 12:24:21 2015 +0100
@@ -18,28 +18,6 @@
 You can have all the details by reading the
 [XEP-0356](http://xmpp.org/extensions/xep-0356.html).
 
-If you use it with a component, you need to patch
-core/mod\_component.lua to fire a new signal. To do it, copy the
-following patch in a, for example, /tmp/component.patch file:
-
-``` {.patch}
-    diff --git a/plugins/mod_component.lua b/plugins/mod_component.lua
-    --- a/plugins/mod_component.lua
-    +++ b/plugins/mod_component.lua
-    @@ -85,6 +85,7 @@
-                    session.type = "component";
-                    module:log("info", "External component successfully authenticated");
-                    session.send(st.stanza("handshake"));
-    +               module:fire_event("component-authenticated", { session = session });
-     
-                    return true;
-            end
-```
-
-Then, at the root of prosody, enter:
-
-`patch -p1 < /tmp/component.patch`
-
 Usage
 =====
 
@@ -118,8 +96,30 @@
 Compatibility
 =============
 
+If you use it with Prosody 0.9 and with a component, you need to patch
+core/mod\_component.lua to fire a new signal. To do it, copy the
+following patch in a, for example, /tmp/component.patch file:
+
+``` {.patch}
+    diff --git a/plugins/mod_component.lua b/plugins/mod_component.lua
+    --- a/plugins/mod_component.lua
+    +++ b/plugins/mod_component.lua
+    @@ -85,6 +85,7 @@
+                    session.type = "component";
+                    module:log("info", "External component successfully authenticated");
+                    session.send(st.stanza("handshake"));
+    +               module:fire_event("component-authenticated", { session = session });
+     
+                    return true;
+            end
+```
+
+Then, at the root of prosody, enter:
+
+`patch -p1 < /tmp/component.patch`
+
   ----- ----------------------------------------------------
-  dev   Need a patched core/mod\_component.lua (see above)
+  0.10  Works
   0.9   Need a patched core/mod\_component.lua (see above)
   ----- ----------------------------------------------------
 
--- a/mod_privilege/mod_privilege.lua	Sun Dec 20 21:55:49 2015 +0100
+++ b/mod_privilege/mod_privilege.lua	Mon Dec 21 12:24:21 2015 +0100
@@ -8,11 +8,11 @@
 
 -- TODO: manage external <presence/> (for "roster" presence permission) when the account with the roster is offline
 
-local jid = require("util/jid")
-local set = require("util/set")
-local st = require("util/stanza")
-local roster_manager = require("core/rostermanager")
-local user_manager = require("core/usermanager")
+local jid = require("util.jid")
+local set = require("util.set")
+local st = require("util.stanza")
+local roster_manager = require("core.rostermanager")
+local usermanager_user_exists = require "core.usermanager".user_exists;
 local hosts = prosody.hosts
 local full_sessions = prosody.full_sessions;
 
@@ -250,7 +250,7 @@
 	if session_privileges and _ROSTER_SET_PERM:contains(session_privileges.roster) then
 		module:log("debug", "Roster set from allowed privileged entity received")
 		-- following code is adapted from mod_remote_roster
-		if not(user_manager.user_exists(from_node, from_host)) then return; end
+		if not(usermanager_user_exists(from_node, from_host)) then return; end
 		local roster = roster_manager.load_roster(from_node, from_host);
 		if not(roster) then return; end