25
1
mirror of https://github.com/processone/ejabberd.git synced 2024-12-20 17:27:00 +01:00

mod_avatar: Reduce log level for too large avatars

Log a warning rather than an error when publishing an avatar fails due
to its size exceeding the ?MAX_PAYLOAD_SIZE for PubSub items.
This commit is contained in:
Holger Weiss 2018-09-26 21:00:52 +02:00
parent aa162f30df
commit e3a03394c7

View File

@ -302,6 +302,10 @@ publish_avatar(#iq{from = JID} = IQ, Meta, MimeType, Data, ItemID) ->
[jid:encode(JID), StanzaErr]),
{stop, StanzaErr}
end;
{error, #stanza_error{reason = 'not-acceptable'} = StanzaErr} ->
?WARNING_MSG("Failed to publish avatar data for ~s: ~p",
[jid:encode(JID), StanzaErr]),
{stop, StanzaErr};
{error, StanzaErr} ->
?ERROR_MSG("Failed to publish avatar data for ~s: ~p",
[jid:encode(JID), StanzaErr]),