34 prosody.platform = "posix"; |
34 prosody.platform = "posix"; |
35 end |
35 end |
36 |
36 |
37 local lxp = require "lxp"; |
37 local lxp = require "lxp"; |
38 local st = require "util.stanza"; |
38 local st = require "util.stanza"; |
39 local init_xmlhandlers = require "core.xmlhandlers"; |
39 local xmppstream = require "util.xmppstream"; |
|
40 local new_xmpp_handlers = xmppstream.new_sax_handlers; |
40 local dm = require "util.datamanager" |
41 local dm = require "util.datamanager" |
41 dm.set_data_path("data"); |
42 dm.set_data_path("data"); |
42 |
43 |
43 local ns_separator = "\1"; |
|
44 local ns_pattern = "^([^"..ns_separator.."]*)"..ns_separator.."?(.*)$"; |
|
45 local ns_xep227 = "http://www.xmpp.org/extensions/xep-0227.html#ns"; |
44 local ns_xep227 = "http://www.xmpp.org/extensions/xep-0227.html#ns"; |
|
45 local ns_separator = xmppstream.ns_separator; |
|
46 local ns_pattern = xmppstream.ns_pattern; |
46 |
47 |
47 ----------------------------------------------------------------------- |
48 ----------------------------------------------------------------------- |
48 |
49 |
49 function store_vcard(username, host, stanza) |
50 function store_vcard(username, host, stanza) |
50 -- create or update vCard for username@host |
51 -- create or update vCard for username@host |
174 else |
175 else |
175 print("UNHANDLED stanza "..stanza.name.." xmlns: "..(stanza.attr.xmlns or "")); |
176 print("UNHANDLED stanza "..stanza.name.." xmlns: "..(stanza.attr.xmlns or "")); |
176 end |
177 end |
177 end |
178 end |
178 |
179 |
179 local user_handlers = init_xmlhandlers({ notopen = true, }, cb); |
180 local user_handlers = new_xmpp_handlers({ notopen = true }, cb); |
180 |
181 |
181 ----------------------------------------------------------------------- |
182 ----------------------------------------------------------------------- |
182 |
183 |
183 local lxp_handlers = { |
184 local lxp_handlers = { |
184 --count = 0 |
185 --count = 0 |