Comparison

plugins/mod_muc_mam.lua @ 10022:b56654f89cd5

mod_muc_mam: Propagate item-not-found to client (fixes #1325)
author Kim Alvefur <zash@zash.se>
date Sun, 05 May 2019 07:16:03 +0200
parent 10000:189b00a782bf
child 10030:98ef41a60fc3
comparison
equal deleted inserted replaced
10021:4715c5d1eb69 10022:b56654f89cd5
187 reverse = reverse; 187 reverse = reverse;
188 with = "message<groupchat"; 188 with = "message<groupchat";
189 }); 189 });
190 190
191 if not data then 191 if not data then
192 origin.send(st.error_reply(stanza, "cancel", "internal-server-error")); 192 if err == "item-not-found" then
193 origin.send(st.error_reply(stanza, "modify", "item-not-found"));
194 else
195 origin.send(st.error_reply(stanza, "cancel", "internal-server-error"));
196 end
193 return true; 197 return true;
194 end 198 end
195 local total = tonumber(err); 199 local total = tonumber(err);
196 200
197 local msg_reply_attr = { to = stanza.attr.from, from = stanza.attr.to }; 201 local msg_reply_attr = { to = stanza.attr.from, from = stanza.attr.to };