Software / code / prosody
Comparison
plugins/mod_csi_simple.lua @ 9767:57ceffb13963 0.11
mod_csi_simple: Tweak check for <body>
There were code that checked the body for mentions but isn't included.
| author | Kim Alvefur <zash@zash.se> |
|---|---|
| date | Sun, 06 Jan 2019 21:03:09 +0100 |
| parent | 9651:989cf872d5c0 |
| child | 9768:ab12fd48e124 |
comparison
equal
deleted
inserted
replaced
| 9763:982529dd0bed | 9767:57ceffb13963 |
|---|---|
| 61 return true; | 61 return true; |
| 62 elseif st_name == "message" then | 62 elseif st_name == "message" then |
| 63 if st_type == "headline" then | 63 if st_type == "headline" then |
| 64 return false; | 64 return false; |
| 65 end | 65 end |
| 66 local body = stanza:get_child_text("body"); | 66 if stanza:get_child("body") then |
| 67 return body; | 67 return true; |
| 68 end | |
| 69 return false; | |
| 68 end | 70 end |
| 69 return true; | 71 return true; |
| 70 end, -1); | 72 end, -1); |
| 71 | 73 |
| 72 module:hook("csi-client-inactive", function (event) | 74 module:hook("csi-client-inactive", function (event) |