Mercurial > prosody-hg
comparison plugins/mod_pubsub/mod_pubsub.lua @ 9181:79cf1f74738f
mod_pubsub: Prepare to support turning notifications off for each kind of broadcast
| author | Kim Alvefur <zash@zash.se> |
|---|---|
| date | Thu, 16 Aug 2018 14:47:30 +0200 |
| parents | 82fad995a149 |
| children | bd452e4f5a13 |
comparison
equal
deleted
inserted
replaced
| 9180:cc68cb03f85e | 9181:79cf1f74738f |
|---|---|
| 45 local archive = module:open_store("pubsub_"..node_name, "archive"); | 45 local archive = module:open_store("pubsub_"..node_name, "archive"); |
| 46 return lib_pubsub.archive_itemstore(archive, node_config, nil, node_name); | 46 return lib_pubsub.archive_itemstore(archive, node_config, nil, node_name); |
| 47 end | 47 end |
| 48 | 48 |
| 49 function simple_broadcast(kind, node, jids, item, actor, node_obj) | 49 function simple_broadcast(kind, node, jids, item, actor, node_obj) |
| 50 if node_obj then | |
| 51 if node_obj.config["notify_"..kind] == false then | |
| 52 return; | |
| 53 end | |
| 54 end | |
| 50 if kind == "retract" then | 55 if kind == "retract" then |
| 51 kind = "items"; -- XEP-0060 signals retraction in an <items> container | 56 kind = "items"; -- XEP-0060 signals retraction in an <items> container |
| 52 end | 57 end |
| 53 | 58 |
| 54 if item then | 59 if item then |
