25
1
mirror of https://github.com/processone/ejabberd.git synced 2024-11-20 16:15:59 +01:00

Fix dialyzer warning

This commit is contained in:
Paweł Chmielowski 2023-03-30 14:53:51 +02:00
parent 6da1bb5b22
commit f6385fae50

View File

@ -1126,7 +1126,7 @@ add_stanza_id(Packet, #state{jid = JID}) ->
GenID = erlang:system_time(microsecond),
{true, xmpp:put_meta(Packet, stanza_id, GenID)};
_ ->
StanzaIds = xmpp:get_subtags(Packet, #stanza_id{}),
StanzaIds = xmpp:get_subtags(Packet, #stanza_id{by = #jid{}}),
HasOurStanzaId = lists:any(
fun(#stanza_id{by = JID2}) when JID == JID2 -> true;
(_) -> false