20 end |
20 end |
21 end |
21 end |
22 end); |
22 end); |
23 |
23 |
24 function stream:hook_pep(node, callback, priority) |
24 function stream:hook_pep(node, callback, priority) |
|
25 local handlers = stream.events._handlers["pep/"..node]; |
|
26 if not(handlers) or #handlers == 0 then |
|
27 stream:add_disco_feature(node.."+notify"); |
|
28 end |
25 stream:hook("pep/"..node, callback, priority); |
29 stream:hook("pep/"..node, callback, priority); |
26 stream:add_disco_feature(node.."+notify"); |
|
27 end |
30 end |
28 |
31 |
29 function stream:unhook_pep(node, callback) |
32 function stream:unhook_pep(node, callback) |
30 stream:unhook("pep/"..node, callback); |
33 stream:unhook("pep/"..node, callback); |
31 local handlers = stream.events._handlers["pep/"..node]; |
34 local handlers = stream.events._handlers["pep/"..node]; |