equal
deleted
inserted
replaced
182 module:log("warn", "Could not search archive: %s", err or "no error"); |
182 module:log("warn", "Could not search archive: %s", err or "no error"); |
183 return 500; |
183 return 500; |
184 end |
184 end |
185 |
185 |
186 local first, last; |
186 local first, last; |
187 local verb, subject, body; |
|
188 for key, item, when in iter do |
187 for key, item, when in iter do |
189 body = item:get_child_text("body"); |
188 local body = item:get_child_text("body"); |
190 subject = item:get_child_text("subject"); |
189 local subject = item:get_child_text("subject"); |
191 verb = nil; |
190 local verb = nil; |
192 if subject then |
191 if subject then |
193 verb, body = "set the topic to", subject; |
192 verb, body = "set the topic to", subject; |
194 elseif body and body:sub(1,4) == "/me " then |
193 elseif body and body:sub(1,4) == "/me " then |
195 verb, body = body:sub(5), nil; |
194 verb, body = body:sub(5), nil; |
196 elseif item.name == "presence" then |
195 elseif item.name == "presence" then |