aboutsummaryrefslogtreecommitdiffstats
path: root/plugins
diff options
context:
space:
mode:
authorMatthew Wild <mwild1@gmail.com>2022-03-19 09:28:59 +0000
committerMatthew Wild <mwild1@gmail.com>2022-03-19 09:28:59 +0000
commit8633709b9f56c5a875bb7c47a4fa5669f438882f (patch)
treec0d7d99a90ace5283e7013b0020105a7aeff6fc7 /plugins
parent860f7d6b7dfccfe3dee023d5cec8130379c5c85c (diff)
parentd0bd1e71d926424142a139eb63ac148eb888a871 (diff)
downloadprosody-8633709b9f56c5a875bb7c47a4fa5669f438882f.tar.gz
prosody-8633709b9f56c5a875bb7c47a4fa5669f438882f.zip
Merge 0.12->trunk
Diffstat (limited to 'plugins')
-rw-r--r--plugins/mod_admin_socket.lua9
-rw-r--r--plugins/mod_invites_register.lua1
2 files changed, 10 insertions, 0 deletions
diff --git a/plugins/mod_admin_socket.lua b/plugins/mod_admin_socket.lua
index b197adae..ffea9c61 100644
--- a/plugins/mod_admin_socket.lua
+++ b/plugins/mod_admin_socket.lua
@@ -2,6 +2,15 @@ module:set_global();
local have_unix, unix = pcall(require, "socket.unix");
+if have_unix and type(unix) == "function" then
+ -- COMPAT #1717
+ -- Before the introduction of datagram support, only the stream socket
+ -- constructor was exported instead of a module table. Due to the lack of a
+ -- proper release of LuaSocket, distros have settled on shipping either the
+ -- last RC tag or some commit since then.
+ -- Here we accomodate both variants.
+ unix = { stream = unix };
+end
if not have_unix or type(unix) ~= "table" then
module:log_status("error", "LuaSocket unix socket support not available or incompatible, ensure it is up to date");
return;
diff --git a/plugins/mod_invites_register.lua b/plugins/mod_invites_register.lua
index 9a5570ab..d1d801ad 100644
--- a/plugins/mod_invites_register.lua
+++ b/plugins/mod_invites_register.lua
@@ -141,6 +141,7 @@ module:hook("user-registered", function (event)
if inviter_username then
module:log("debug", "Creating mutual subscription between %s and %s", inviter_username, contact_username);
subscribe_both(module.host, inviter_username, contact_username);
+ rostermanager.roster_push(inviter_username, module.host, contact_username.."@"..module.host);
end
if validated_invite.additional_data then