mirror of
https://github.com/processone/ejabberd.git
synced 2024-06-12 21:52:07 +02:00
parent
d3aeed839d
commit
b3d9c0d1f7
|
@ -1494,10 +1494,10 @@ send_message(Type, From, To, Subject, Body) ->
|
||||||
#xmlel{name = <<"body">>,
|
#xmlel{name = <<"body">>,
|
||||||
children = [{xmlcdata, Body}]}]},
|
children = [{xmlcdata, Body}]}]},
|
||||||
?NS_CLIENT, CodecOpts) of
|
?NS_CLIENT, CodecOpts) of
|
||||||
#message{from = JID, subject = Subject, body = Body} = Msg ->
|
#message{from = JID, subject = SubjectEl, body = BodyEl} = Msg ->
|
||||||
Msg2 = case {xmpp:get_text(Subject), xmpp:get_text(Body)} of
|
Msg2 = case {xmpp:get_text(SubjectEl), xmpp:get_text(BodyEl)} of
|
||||||
{_, <<>>} -> Msg;
|
{Subject, <<>>} -> Msg;
|
||||||
{<<>>, _} -> Msg#message{subject = []};
|
{<<>>, Body} -> Msg#message{subject = []};
|
||||||
_ -> Msg
|
_ -> Msg
|
||||||
end,
|
end,
|
||||||
State = #{jid => JID},
|
State = #{jid => JID},
|
||||||
|
|
Loading…
Reference in New Issue
Block a user