Comparison

plugins/mod_carbons.lua @ 6804:9f40ae38f0de

mod_carbons: Get full_ and bare_sessions from the prosody global [luacheck]
author Kim Alvefur <zash@zash.se>
date Thu, 27 Aug 2015 12:17:12 +0200
parent 6803:7ed87299dbf9
child 6841:be87ab2d611c
comparison
equal deleted inserted replaced
6803:7ed87299dbf9 6804:9f40ae38f0de
5 5
6 local st = require "util.stanza"; 6 local st = require "util.stanza";
7 local jid_bare = require "util.jid".bare; 7 local jid_bare = require "util.jid".bare;
8 local xmlns_carbons = "urn:xmpp:carbons:2"; 8 local xmlns_carbons = "urn:xmpp:carbons:2";
9 local xmlns_forward = "urn:xmpp:forward:0"; 9 local xmlns_forward = "urn:xmpp:forward:0";
10 local full_sessions, bare_sessions = full_sessions, bare_sessions; 10 local full_sessions, bare_sessions = prosody.full_sessions, prosody.bare_sessions;
11 11
12 local function toggle_carbons(event) 12 local function toggle_carbons(event)
13 local origin, stanza = event.origin, event.stanza; 13 local origin, stanza = event.origin, event.stanza;
14 local state = stanza.tags[1].name; 14 local state = stanza.tags[1].name;
15 module:log("debug", "%s %sd carbons", origin.full_jid, state); 15 module:log("debug", "%s %sd carbons", origin.full_jid, state);