comparison mod_bookmarks2/mod_bookmarks2.lua @ 3742:05bca7a771d6

mod_bookmarks2: Remove unused variables.
author Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
date Wed, 13 Nov 2019 16:45:48 +0100
parents 33b3e2387a10
children 5eab799b5fa4
comparison
equal deleted inserted replaced
3741:33b3e2387a10 3742:05bca7a771d6
6 local st = require "util.stanza"; 6 local st = require "util.stanza";
7 local jid_split = require "util.jid".split; 7 local jid_split = require "util.jid".split;
8 8
9 local mod_pep = module:depends "pep"; 9 local mod_pep = module:depends "pep";
10 local private_storage = module:open_store("private", "map"); 10 local private_storage = module:open_store("private", "map");
11
12 local legacy_ns = "storage:bookmarks";
13 local ns = "urn:xmpp:bookmarks:0";
14 11
15 local default_options = { 12 local default_options = {
16 ["persist_items"] = true; 13 ["persist_items"] = true;
17 -- This should be much higher, the XEP recommends 10000 but mod_pep rejects that. 14 -- This should be much higher, the XEP recommends 10000 but mod_pep rejects that.
18 ["max_items"] = 255; 15 ["max_items"] = 255;
191 local query = stanza:get_child("query", "jabber:iq:private"); 188 local query = stanza:get_child("query", "jabber:iq:private");
192 if query == nil then 189 if query == nil then
193 return; 190 return;
194 end 191 end
195 192
196 local bookmarks = query:get_child("storage", legacy_ns); 193 local bookmarks = query:get_child("storage", "storage:bookmarks");
197 if bookmarks == nil then 194 if bookmarks == nil then
198 return; 195 return;
199 end 196 end
200 197
201 module:log("debug", "Private bookmarks set by client, publishing to pep."); 198 module:log("debug", "Private bookmarks set by client, publishing to pep.");