Skip to content

Instantly share code, notes, and snippets.

@andrewvmail
Created March 3, 2016 21:07
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save andrewvmail/d71e3e49075873d2b86c to your computer and use it in GitHub Desktop.
Save andrewvmail/d71e3e49075873d2b86c to your computer and use it in GitHub Desktop.
-spec process_groupchat_message(ejabberd:simple_jid() | ejabberd:jid(),
jlib:xmlel(), state()) -> fsm_return().
process_groupchat_message(From, #xmlel{name = <<"message">>,
attrs = Attrs} = Packet,
StateData) ->
% ?INFO_MSG("================ MOMOTERRAW ====================>", []),
Lang = xml:get_attr_s(<<"xml:lang">>, Attrs),
case can_send_to_conference(From, StateData) of
true ->
?INFO_MSG("================PROCESS GROUPCHAT MES SAGE HELLO WORLD =============== ~p =====>", [Packet] ),
case length(erlang:binary_to_list(xml:get_tag_cdata(xml:get_subtag(Packet, <<"subject">>)))) > 0 of
true ->
?INFO_MSG("================ True =============== ~p =====>", []),
?INFO_MSG("================ True =============== ~p =====>", []),
?INFO_MSG("================ True =============== ~p =====>", []),
?INFO_MSG("================ True =============== ~p =====>", []);
false ->
?INFO_MSG("================ False =============== ~p =====>", []),
?INFO_MSG("================ False =============== ~p =====>", []),
?INFO_MSG("================ False =============== ~p =====>", []),
?INFO_MSG("================ False =============== ~p =====>", []),
?INFO_MSG("================ False =============== ~p =====>", [])
end,
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment