aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthew Wild <mwild1@gmail.com>2009-07-29 18:11:37 +0100
committerMatthew Wild <mwild1@gmail.com>2009-07-29 18:11:37 +0100
commit041209a264222c8261ccff51df5f73bbbc23d6b8 (patch)
treee014c22f857a0d2e2f96e817efc59cf6d9642e15
parentMerge with 0.5 (diff)
parentMUC: Added the MUC child element to conflict errors (diff)
downloadprosody-041209a264222c8261ccff51df5f73bbbc23d6b8.tar.xz
prosody-041209a264222c8261ccff51df5f73bbbc23d6b8.zip
Merge with 0.5
-rw-r--r--plugins/mod_pep.lua3
-rwxr-xr-xprosody4
-rw-r--r--util/muc.lua4
3 files changed, 6 insertions, 5 deletions
diff --git a/plugins/mod_pep.lua b/plugins/mod_pep.lua
index 8cc4aedfb..768d4a4a6 100644
--- a/plugins/mod_pep.lua
+++ b/plugins/mod_pep.lua
@@ -30,6 +30,7 @@ module:add_feature("http://jabber.org/protocol/pubsub#publish");
local function publish(session, node, item)
local disable = #item.tags ~= 1 or #item.tags[1].tags == 0;
+ if #item.tags == 0 then item.name = "retract"; end
local bare = session.username..'@'..session.host;
local stanza = st.message({from=bare, type='headline'})
:tag('event', {xmlns='http://jabber.org/protocol/pubsub#event'})
@@ -128,7 +129,7 @@ module:hook("iq/bare/http://jabber.org/protocol/pubsub:pubsub", function(event)
local payload = stanza.tags[1];
if payload.name == 'pubsub' then -- <pubsub xmlns='http://jabber.org/protocol/pubsub'>
payload = payload.tags[1];
- if payload and payload.name == 'publish' and payload.attr.node then -- <publish node='http://jabber.org/protocol/tune'>
+ if payload and (payload.name == 'publish' or payload.name == 'retract') and payload.attr.node then -- <publish node='http://jabber.org/protocol/tune'>
local node = payload.attr.node;
payload = payload.tags[1];
if payload then -- <item>
diff --git a/prosody b/prosody
index e9f005988..0618a1f3d 100755
--- a/prosody
+++ b/prosody
@@ -9,9 +9,9 @@
-- Will be modified by configure script if run --
-CFG_SOURCEDIR=nil;
+CFG_SOURCEDIR=os.getenv("PROSODY_SRCDIR");
CFG_CONFIGDIR=os.getenv("PROSODY_CFGDIR");
-CFG_PLUGINDIR=nil;
+CFG_PLUGINDIR=os.getenv("PROSODY_PLUGINDIR");
CFG_DATADIR=os.getenv("PROSODY_DATADIR");
-- -- -- -- -- -- -- ---- -- -- -- -- -- -- -- --
diff --git a/util/muc.lua b/util/muc.lua
index b3673f63d..badcffced 100644
--- a/util/muc.lua
+++ b/util/muc.lua
@@ -209,7 +209,7 @@ local function room_handle_to_occupant(self, origin, stanza) -- PM, vCards, etc
else -- change nick
if self._participants[to] then
log("debug", "%s couldn't change nick", current_nick);
- origin.send(st.error_reply(stanza, "cancel", "conflict"));
+ origin.send(st.error_reply(stanza, "cancel", "conflict"):tag("x", {xmlns = "http://jabber.org/protocol/muc"}));
else
local data = self._participants[current_nick];
local to_nick = select(3, jid_split(to));
@@ -240,7 +240,7 @@ local function room_handle_to_occupant(self, origin, stanza) -- PM, vCards, etc
end
if not new_nick then
log("debug", "%s couldn't join due to nick conflict: %s", from, to);
- origin.send(st.error_reply(stanza, "cancel", "conflict"));
+ origin.send(st.error_reply(stanza, "cancel", "conflict"):tag("x", {xmlns = "http://jabber.org/protocol/muc"}));
else
log("debug", "%s joining as %s", from, to);
local data;