Software /
code /
prosody
Comparison
plugins/mod_mam/mod_mam.lua @ 10021:4715c5d1eb69
mod_mam: Propagate item-not-found to client (fixes #1325)
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Sun, 05 May 2019 07:16:05 +0200 |
parent | 9894:8747ccf0008c |
child | 10030:98ef41a60fc3 |
comparison
equal
deleted
inserted
replaced
10020:deb68066c7aa | 10021:4715c5d1eb69 |
---|---|
140 reverse = reverse; | 140 reverse = reverse; |
141 total = use_total or qmax == 0; | 141 total = use_total or qmax == 0; |
142 }); | 142 }); |
143 | 143 |
144 if not data then | 144 if not data then |
145 origin.send(st.error_reply(stanza, "cancel", "internal-server-error", err)); | 145 if err == "item-not-found" then |
146 origin.send(st.error_reply(stanza, "modify", "item-not-found")); | |
147 else | |
148 origin.send(st.error_reply(stanza, "cancel", "internal-server-error")); | |
149 end | |
146 return true; | 150 return true; |
147 end | 151 end |
148 local total = tonumber(err); | 152 local total = tonumber(err); |
149 | 153 |
150 local msg_reply_attr = { to = stanza.attr.from, from = stanza.attr.to }; | 154 local msg_reply_attr = { to = stanza.attr.from, from = stanza.attr.to }; |