# HG changeset patch # User Kim Alvefur # Date 1641594333 -3600 # Node ID ee2463fbf794e35ce4388fd900d3e02880cc365a # Parent 3804332c204eab0b1927a576978fed1ef85ca3c6 mod_default_bookmarks: Abort on incompatible mod_bookmarks The module formerly known as mod_bookmarks exposed this publish_to_pep function, while the new mod_bookmarks2 (called mod_bookmarks in trunk) does not. diff -r 3804332c204e -r ee2463fbf794 mod_default_bookmarks/mod_default_bookmarks.lua --- a/mod_default_bookmarks/mod_default_bookmarks.lua Fri Jan 07 19:55:03 2022 +0100 +++ b/mod_default_bookmarks/mod_default_bookmarks.lua Fri Jan 07 23:25:33 2022 +0100 @@ -53,8 +53,10 @@ local function on_bookmarks_empty(event) local session = event.session; local bookmarks = get_default_bookmarks(session.username); - if bookmarks then + if bookmarks.publish_to_pep then mod_bookmarks.publish_to_pep(session.full_jid, bookmarks); + else + module:log("error", "Method for publishing legacy bookmarks not exposed by mod_bookmarks") end end module:hook("bookmarks/empty", on_bookmarks_empty);