Skip to content

Commit

Permalink
Merge remote-tracking branch 'processone/pr/1088'
Browse files Browse the repository at this point in the history
* processone/pr/1088:
  Process messages of unknown type consistently
  • Loading branch information
weiss committed May 4, 2016
2 parents 13c6430 + 45321fa commit d6700bd
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/ejabberd_sm.erl
Original file line number Diff line number Diff line change
Expand Up @@ -518,16 +518,16 @@ do_route(From, To, #xmlel{} = Packet) ->
<<"message">> ->
case fxml:get_attr_s(<<"type">>, Attrs) of
<<"chat">> -> route_message(From, To, Packet, chat);
<<"normal">> -> route_message(From, To, Packet, normal);
<<"">> -> route_message(From, To, Packet, normal);
<<"headline">> -> ok;
<<"error">> -> ok;
_ ->
<<"groupchat">> ->
ErrTxt = <<"User session not found">>,
Err = jlib:make_error_reply(
Packet,
?ERRT_SERVICE_UNAVAILABLE(Lang, ErrTxt)),
ejabberd_router:route(To, From, Err)
ejabberd_router:route(To, From, Err);
_ ->
route_message(From, To, Packet, normal)
end;
<<"iq">> ->
case fxml:get_attr_s(<<"type">>, Attrs) of
Expand Down

0 comments on commit d6700bd

Please sign in to comment.