changeset 3374 | c414a7e884b3 |
parent 3141 | 178ebea5097c |
child 3786 | 70e5bab388d8 |
--- a/mod_measure_message_e2ee/mod_measure_message_e2ee.lua Tue Nov 06 14:44:11 2018 +0100 +++ b/mod_measure_message_e2ee/mod_measure_message_e2ee.lua Tue Nov 06 20:05:09 2018 +0100 @@ -34,10 +34,9 @@ return; end - local body = stanza:get_child("body"); - if body ~= nil then - local otr_index = body:find("?OTR", 1, true); - if otr_index == 1 then + local body = stanza:get_child_text("body"); + if body then + if body:sub(1,4) == "?OTR" then count_otr(); return; end