Diff

plugins/mod_pubsub/pubsub.lib.lua @ 9235:7fbcabee6df1

mod_pubsub: Preserve current subscription options if given a partial form
author Kim Alvefur <zash@zash.se>
date Fri, 31 Aug 2018 23:54:13 +0200
parent 9212:127af0795e93
child 9244:b3b156bd9914
line wrap: on
line diff
--- a/plugins/mod_pubsub/pubsub.lib.lua	Fri Aug 31 21:57:04 2018 +0200
+++ b/plugins/mod_pubsub/pubsub.lib.lua	Fri Aug 31 23:54:13 2018 +0200
@@ -572,7 +572,8 @@
 		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;