projects
/
prosody.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge 0.9->0.10
[prosody.git]
/
plugins
/
mod_message.lua
diff --git
a/plugins/mod_message.lua
b/plugins/mod_message.lua
index 0b0ad8e4985a2a5d4d057081a208b8bd98325b60..fc337db09d62a30a57d0f674898e211cde291466 100644
(file)
--- a/
plugins/mod_message.lua
+++ b/
plugins/mod_message.lua
@@
-1,14
+1,14
@@
-- Prosody IM
-- Copyright (C) 2008-2010 Matthew Wild
-- Copyright (C) 2008-2010 Waqas Hussain
-- Prosody IM
-- Copyright (C) 2008-2010 Matthew Wild
-- Copyright (C) 2008-2010 Waqas Hussain
---
+--
-- This project is MIT/X11 licensed. Please see the
-- COPYING file in the source package for more information.
--
-- This project is MIT/X11 licensed. Please see the
-- COPYING file in the source package for more information.
--
-local full_sessions = full_sessions;
-local bare_sessions = bare_sessions;
+local full_sessions =
prosody.
full_sessions;
+local bare_sessions =
prosody.
bare_sessions;
local st = require "util.stanza";
local jid_bare = require "util.jid".bare;
local st = require "util.stanza";
local jid_bare = require "util.jid".bare;
@@
-17,7
+17,7
@@
local user_exists = require "core.usermanager".user_exists;
local function process_to_bare(bare, origin, stanza)
local user = bare_sessions[bare];
local function process_to_bare(bare, origin, stanza)
local user = bare_sessions[bare];
-
+
local t = stanza.attr.type;
if t == "error" then
-- discard
local t = stanza.attr.type;
if t == "error" then
-- discard
@@
-66,7
+66,7
@@
end
module:hook("message/full", function(data)
-- message to full JID recieved
local origin, stanza = data.origin, data.stanza;
module:hook("message/full", function(data)
-- message to full JID recieved
local origin, stanza = data.origin, data.stanza;
-
+
local session = full_sessions[stanza.attr.to];
if session and session.send(stanza) then
return true;
local session = full_sessions[stanza.attr.to];
if session and session.send(stanza) then
return true;