diff options
author | Kim Alvefur <zash@zash.se> | 2022-07-27 00:10:08 +0200 |
---|---|---|
committer | Kim Alvefur <zash@zash.se> | 2022-07-27 00:10:08 +0200 |
commit | 7c8dd7ee42d3855f4360c9fdd43016ecafa64e8c (patch) | |
tree | 5cdbe643c8923e1f00d65f16931380732d8d2962 | |
parent | 8db7cdc71321f4a367338df87a7e90629e741ff9 (diff) | |
parent | 96301b2229b2ceeab1797e4bc4e29707b0a32681 (diff) | |
download | prosody-7c8dd7ee42d3855f4360c9fdd43016ecafa64e8c.tar.gz prosody-7c8dd7ee42d3855f4360c9fdd43016ecafa64e8c.zip |
Merge 0.12->trunk
-rw-r--r-- | plugins/mod_bookmarks.lua | 6 | ||||
-rw-r--r-- | plugins/mod_storage_sql.lua | 2 | ||||
-rw-r--r-- | spec/scansion/empty_bookmarks.scs | 27 |
3 files changed, 33 insertions, 2 deletions
diff --git a/plugins/mod_bookmarks.lua b/plugins/mod_bookmarks.lua index cd6eae67..d67915f8 100644 --- a/plugins/mod_bookmarks.lua +++ b/plugins/mod_bookmarks.lua @@ -87,7 +87,11 @@ local function on_retrieve_legacy_pep(event) local service = mod_pep.get_pep_service(username); local ok, ret = service:get_items(namespace, session.full_jid); if not ok then - module:log("error", "Failed to retrieve PEP bookmarks of %s: %s", jid, ret); + if ret == "item-not-found" then + module:log("debug", "Got no PEP bookmarks item for %s, returning empty private bookmarks", jid); + else + module:log("error", "Failed to retrieve PEP bookmarks of %s: %s", jid, ret); + end session.send(st.error_reply(stanza, "cancel", ret, "Failed to retrieve bookmarks from PEP")); return true; end diff --git a/plugins/mod_storage_sql.lua b/plugins/mod_storage_sql.lua index b1e90752..df5ab069 100644 --- a/plugins/mod_storage_sql.lua +++ b/plugins/mod_storage_sql.lua @@ -832,7 +832,7 @@ local function normalize_params(params) end function module.load() - if prosody.prosodyctl then return; end + if prosody.process_type == "prosodyctl" then return; end local engines = module:shared("/*/sql/connections"); local params = normalize_params(module:get_option("sql", default_params)); local db_uri = sql.db2uri(params); diff --git a/spec/scansion/empty_bookmarks.scs b/spec/scansion/empty_bookmarks.scs new file mode 100644 index 00000000..3ea4fe71 --- /dev/null +++ b/spec/scansion/empty_bookmarks.scs @@ -0,0 +1,27 @@ +# mod_scansion_record on host 'localhost' recording started 2022-07-26T21:39:55Z + +[Client] Romeo + password: password + jid: juliet@localhost/UaksS4M1xYZB + +----- + +Romeo connects + +Romeo sends: + <iq xml:lang='en' type='get' id='bNBJLtpIJXpq'> + <pubsub xmlns='http://jabber.org/protocol/pubsub'> + <items node='storage:bookmarks'/> + </pubsub> + </iq> + +Romeo receives: + <iq id='bNBJLtpIJXpq' type='error'> + <error type='cancel'> + <item-not-found xmlns='urn:ietf:params:xml:ns:xmpp-stanzas'/> + </error> + </iq> + +Romeo disconnects + +# recording ended on 2022-07-26T21:40:45Z |