Mercurial > prosody-modules
changeset 4863:fdf50c4d23a3
mod_groups_muc_bookmarks: restore bookmark injection on empty store
author | Jonas Schäfer <jonas@wielicki.name> |
---|---|
date | Sun, 09 Jan 2022 18:20:28 +0100 (2022-01-09) |
parents | 9a8a43d0faed |
children | 62006f4022e9 |
files | mod_groups_muc_bookmarks/mod_groups_muc_bookmarks.lua |
diffstat | 1 files changed, 7 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/mod_groups_muc_bookmarks/mod_groups_muc_bookmarks.lua Sun Jan 09 18:20:02 2022 +0100 +++ b/mod_groups_muc_bookmarks/mod_groups_muc_bookmarks.lua Sun Jan 09 18:20:28 2022 +0100 @@ -17,7 +17,13 @@ local function get_current_bookmarks(jid, service) local ok, items = service:get_items(XMLNS_BM2, jid) - if not ok then return nil, items; end + if not ok then + if items == "item-not-found" then + return {}, nil; + else + return nil, items; + end + end return items or {}; end