From 6d2a2dc325a38ccad7349942b383f73702538783 Mon Sep 17 00:00:00 2001 From: Kim Alvefur Date: Fri, 31 Aug 2018 23:54:13 +0200 Subject: mod_pubsub: Preserve current subscription options if given a partial form --- plugins/mod_pubsub/pubsub.lib.lua | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'plugins/mod_pubsub') 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; -- cgit v1.2.3