Mercurial > prosody-hg
diff util/pubsub.lua @ 8343:5df2f240173b
util.pubsub: Return an empty list if specific item asked for does not exist (thanks jonasw)
| author | Kim Alvefur <zash@zash.se> |
|---|---|
| date | Wed, 18 Oct 2017 21:21:43 +0200 |
| parents | 2abbb01cd756 |
| children | eb6a9c314c86 |
line wrap: on
line diff
--- a/util/pubsub.lua Wed Oct 18 11:43:07 2017 +0100 +++ b/util/pubsub.lua Wed Oct 18 21:21:43 2017 +0200 @@ -338,7 +338,7 @@ if id then -- Restrict results to a single specific item local with_id = self.data[node]:get(id); if not with_id then - return false, "item-not-found"; + return true, { }; end return true, { id, [id] = with_id }; else
