equal
deleted
inserted
replaced
50 |
50 |
51 if is_on_trunk then |
51 if is_on_trunk then |
52 local mod_bookmarks = module:depends "bookmarks"; |
52 local mod_bookmarks = module:depends "bookmarks"; |
53 local function on_bookmarks_empty(event) |
53 local function on_bookmarks_empty(event) |
54 local session = event.session; |
54 local session = event.session; |
55 local bookmarks = get_default_bookmarks(session.username); |
55 if mod_bookmarks.publish_to_pep then |
56 if bookmarks.publish_to_pep then |
56 local bookmarks = get_default_bookmarks(session.username); |
57 mod_bookmarks.publish_to_pep(session.full_jid, bookmarks); |
57 if bookmarks then |
|
58 mod_bookmarks.publish_to_pep(session.full_jid, bookmarks); |
|
59 end |
58 else |
60 else |
59 module:log("error", "Method for publishing legacy bookmarks not exposed by mod_bookmarks") |
61 module:log("error", "Method for publishing legacy bookmarks not exposed by mod_bookmarks") |
60 end |
62 end |
61 end |
63 end |
62 module:hook("bookmarks/empty", on_bookmarks_empty); |
64 module:hook("bookmarks/empty", on_bookmarks_empty); |