30 bot:hook("commands/rtbl-remove", function (command) |
30 bot:hook("commands/rtbl-remove", function (command) |
31 local reported_jid = command.param and jid.prep(command.param:match("^%S+")); |
31 local reported_jid = command.param and jid.prep(command.param:match("^%S+")); |
32 local hash = sha256(reported_jid, true); |
32 local hash = sha256(reported_jid, true); |
33 bot.stream.pubsub(config.host, config.node):retract( |
33 bot.stream.pubsub(config.host, config.node):retract( |
34 hash, -- item id |
34 hash, -- item id |
|
35 true, -- notify subscribers |
35 function (success) -- callback |
36 function (success) -- callback |
36 if not success then |
37 if not success then |
37 command:reply("Failed to update RTBL"); |
38 command:reply("Failed to update RTBL"); |
38 return; |
39 return; |
39 end |
40 end |