Fix: continue presence signal if policy is mandatory
Signed-off-by: David Goulet <dgoulet@ev0ke.net>
This commit is contained in:
parent
30bfe6ed3e
commit
57d12c3483
10
mod_otr.lua
10
mod_otr.lua
|
@ -87,8 +87,16 @@ end
|
||||||
-- becomes unavailable so next time the user connects, the message will
|
-- becomes unavailable so next time the user connects, the message will
|
||||||
-- be displayes again.
|
-- be displayes again.
|
||||||
local function handle_presence(event)
|
local function handle_presence(event)
|
||||||
local jid = strip_full_jid(event.stanza.attr.from);
|
local jid;
|
||||||
|
|
||||||
|
-- Continue signal, mandatory policy does not require us to
|
||||||
|
-- remove the "messaged" entry.
|
||||||
|
if mandatory then
|
||||||
|
return nil;
|
||||||
|
end
|
||||||
|
|
||||||
if event.stanza.attr.type == "unavailable" then
|
if event.stanza.attr.type == "unavailable" then
|
||||||
|
jid = strip_full_jid(event.stanza.attr.from);
|
||||||
messaged[jid] = nil;
|
messaged[jid] = nil;
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue