aboutsummaryrefslogtreecommitdiffstats
path: root/plugins/mod_pubsub
diff options
context:
space:
mode:
authorKim Alvefur <zash@zash.se>2018-08-31 23:54:13 +0200
committerKim Alvefur <zash@zash.se>2018-08-31 23:54:13 +0200
commit6d2a2dc325a38ccad7349942b383f73702538783 (patch)
tree067d6a3af35dd2d6de0047d6fac94cf99fc1b621 /plugins/mod_pubsub
parent43845f0757f376af8e3bd7e414105222668d66e5 (diff)
downloadprosody-6d2a2dc325a38ccad7349942b383f73702538783.tar.gz
prosody-6d2a2dc325a38ccad7349942b383f73702538783.zip
mod_pubsub: Preserve current subscription options if given a partial form
Diffstat (limited to 'plugins/mod_pubsub')
-rw-r--r--plugins/mod_pubsub/pubsub.lib.lua3
1 files changed, 2 insertions, 1 deletions
diff --git a/plugins/mod_pubsub/pubsub.lib.lua b/plugins/mod_pubsub/pubsub.lib.lua
index 7b89aaed..4b37946d 100644
--- a/plugins/mod_pubsub/pubsub.lib.lua
+++ b/plugins/mod_pubsub/pubsub.lib.lua
@@ -572,7 +572,8 @@ function handlers.set_options(origin, stanza, options, service)
origin.send(pubsub_error_reply(stanza, "not-subscribed"));
return true;
end
- local new_subopts, err = subscribe_options_form:data(options.tags[1]);
+ local old_subopts = ret;
+ local new_subopts, err = subscribe_options_form:data(options.tags[1], old_subopts);
if not new_subopts then
origin.send(pubsub_error_reply(stanza, ret));
return true;