Comparison

mod_default_bookmarks/mod_default_bookmarks.lua @ 4864:62006f4022e9

mod_default_bookmarks: Silence warning when probing for mod_bookmarks version
author Kim Alvefur <zash@zash.se>
date Mon, 10 Jan 2022 22:19:31 +0100
parent 4860:4a34ed2bb9a2
child 4978:4c8b66da4dec
comparison
equal deleted inserted replaced
4863:fdf50c4d23a3 4864:62006f4022e9
51 return reply; 51 return reply;
52 end 52 end
53 53
54 if mod_bookmarks_available then 54 if mod_bookmarks_available then
55 local mod_bookmarks = module:depends(mod_bookmarks_available); 55 local mod_bookmarks = module:depends(mod_bookmarks_available);
56 if mod_bookmarks.publish_to_pep then 56 if rawget(mod_bookmarks, "publish_to_pep") then
57 local function on_bookmarks_empty(event) 57 local function on_bookmarks_empty(event)
58 local session = event.session; 58 local session = event.session;
59 local bookmarks = get_default_bookmarks(session.username); 59 local bookmarks = get_default_bookmarks(session.username);
60 if bookmarks then 60 if bookmarks then
61 mod_bookmarks.publish_to_pep(session.full_jid, bookmarks); 61 mod_bookmarks.publish_to_pep(session.full_jid, bookmarks);