Merge pull request #84 from weiss/omit-subject
mod_admin_extra: Let send_message omit subject
This commit is contained in:
commit
e209c00f26
|
@ -1406,10 +1406,9 @@ send_packet_all_resources(FromJID, ToU, ToS, ToR, Packet) ->
|
||||||
ejabberd_router:route(FromJID, ToJID, Packet).
|
ejabberd_router:route(FromJID, ToJID, Packet).
|
||||||
|
|
||||||
build_packet(Type, Subject, Body) ->
|
build_packet(Type, Subject, Body) ->
|
||||||
Tail = case Subject of
|
Tail = if Subject == <<"">>; Type == <<"chat">> -> [];
|
||||||
<<"chat">> -> [];
|
true -> [{xmlel, <<"subject">>, [], [{xmlcdata, Subject}]}]
|
||||||
_ -> [{xmlel, <<"subject">>, [], [{xmlcdata, Subject}]}]
|
end,
|
||||||
end,
|
|
||||||
{xmlel, <<"message">>,
|
{xmlel, <<"message">>,
|
||||||
[{<<"type">>, Type}, {<<"id">>, randoms:get_string()}],
|
[{<<"type">>, Type}, {<<"id">>, randoms:get_string()}],
|
||||||
[{xmlel, <<"body">>, [], [{xmlcdata, Body}]} | Tail]
|
[{xmlel, <<"body">>, [], [{xmlcdata, Body}]} | Tail]
|
||||||
|
|
Loading…
Reference in New Issue