[ejabberd] Login to muc room with exmpp

Alexander Kuleshov kuleshovmail at gmail.com
Thu May 19 21:06:22 MSD 2011


I try to use:

create_move_room (Room, Username) ->
    #xmlel {name=presence, attrs=[#xmlattr{name = to,
					   value = list_to_binary(Room ++ "@" ++ ?JABBER_MUC_HOST ++ "/"
++ Username)}],
	                                   children=[#xmlel{name=x,
attrs=[#xmlattr{name=xmlns, value="?MUC"}]}]}.

But get error:


** Reason for termination =
** {badarg,[{erlang,binary_to_list,[to]},
            {exmpp_xml,xmlnsattributes_to_xmlattributes2,3},
            {exmpp_xml,unresolve_xmlel_nss,3},
            {exmpp_xml,node_to_iolist2,4},
            {exmpp_xml,node_to_binary,3},
            {exmpp_socket,send,2},
            {exmpp_session,send_packet,3},
            {exmpp_session,logged_in,3}]}


More information about the ejabberd mailing list