clix/roster.lua

changeset 57
830baad98c9a
parent 56
4b5f9a50ae68
child 58
d5d9f7dffc1f
equal deleted inserted replaced
56:4b5f9a50ae68 57:830baad98c9a
123 if opts.interactive then 123 if opts.interactive then
124 conn:hook("roster/item-added", notif("added")); 124 conn:hook("roster/item-added", notif("added"));
125 conn:hook("roster/item-changed", notif("changed")); 125 conn:hook("roster/item-changed", notif("changed"));
126 conn:hook("roster/item-removed", notif("removed")); 126 conn:hook("roster/item-removed", notif("removed"));
127 end 127 end
128 if opts.presence then
129 conn:hook("presence", function(presence)
130 if presence.attr.type == "subscribe" then
131 print(("%s wants to subscribe to you"):format(presence.attr.from));
132 --elseif presence.attr.type == "subscribed" then
133 --print(("%s subscribed to you?"):format(presence.attr.from));
134 end
135 end)
136 end
128 end 137 end
129 clix_connect(opts, on_connect); 138 clix_connect(opts, on_connect);
130 end 139 end

mercurial