0
我如何登錄exmpp機器人到多用戶聊天室?登錄muc房間與exmpp
嘗試使用:
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"}]}]}.
,但得到的錯誤:
** 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}]}
謝謝。