Comparison

mod_mam/mod_mam.lua @ 1683:cc3fad4198bc

mod_mam: Rename variable
author Kim Alvefur <zash@zash.se>
date Sun, 03 May 2015 13:27:53 +0200
parent 1682:6b2122630b92
child 1684:838150167871
comparison
equal deleted inserted replaced
1682:6b2122630b92 1683:cc3fad4198bc
132 132
133 if not data then 133 if not data then
134 origin.send(st.error_reply(stanza, "cancel", "internal-server-error", err)); 134 origin.send(st.error_reply(stanza, "cancel", "internal-server-error", err));
135 return true; 135 return true;
136 end 136 end
137 local count = err; 137 local total = err;
138 138
139 origin.send(st.reply(stanza)) 139 origin.send(st.reply(stanza))
140 local msg_reply_attr = { to = stanza.attr.from, from = stanza.attr.to }; 140 local msg_reply_attr = { to = stanza.attr.from, from = stanza.attr.to };
141 141
142 -- Wrap it in stuff and deliver 142 -- Wrap it in stuff and deliver
170 170
171 if reverse then first, last = last, first; end 171 if reverse then first, last = last, first; end
172 origin.send(st.message(msg_reply_attr) 172 origin.send(st.message(msg_reply_attr)
173 :tag("fin", { xmlns = xmlns_mam, queryid = qid, complete = complete }) 173 :tag("fin", { xmlns = xmlns_mam, queryid = qid, complete = complete })
174 :add_child(rsm.generate { 174 :add_child(rsm.generate {
175 first = first, last = last, count = count })); 175 first = first, last = last, count = total }));
176 return true; 176 return true;
177 end); 177 end);
178 178
179 local function has_in_roster(user, who) 179 local function has_in_roster(user, who)
180 local roster = rm_load_roster(user, host); 180 local roster = rm_load_roster(user, host);