equal
deleted
inserted
replaced
|
1 |
|
2 -- PERSONAL EVENTING PROTOCOL (XEP-0163) |
|
3 |
|
4 -- library |
|
5 |
|
6 local lm = require 'lm' |
|
7 local iq = require 'lm.iq' |
|
8 |
|
9 -- |
|
10 |
|
11 local F = { } |
|
12 |
|
13 function F.publish ( conn, node, item, success, fail ) |
|
14 -- local bjid = conn:jid():gsub ( '/.*', '' ) |
|
15 -- item.id = 'current' |
|
16 iq.send ( conn, nil, 'set', |
|
17 { |
|
18 pubsub = { xmlns = 'http://jabber.org/protocol/pubsub', |
|
19 publish = { node = node, |
|
20 item = item, |
|
21 }, |
|
22 }, |
|
23 --[[ |
|
24 configure = { |
|
25 x = { |
|
26 field = {{ type = "hidden", var = 'FORM_TYPE', |
|
27 value = { 'http://jabber.org/protocol/pubsub#node_config' }, |
|
28 },{ var = "pubsub#access_model", |
|
29 value = { 'presence' }, |
|
30 }}, |
|
31 }, |
|
32 }, |
|
33 --]] |
|
34 }, success, fail ) |
|
35 end |
|
36 |
|
37 return F |
|
38 |
|
39 -- vim: se ts=4: -- |