获得"受者不可用(404)QUOT;而越来越多用户聊天邀请后加入本集团 [英] Getting "recipient-unavailable(404)" while joining the Group after getting the invitation for Multiuser Chat

查看:241
本文介绍了获得"受者不可用(404)QUOT;而越来越多用户聊天邀请后加入本集团的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在使用Android的创建集团继code

I am Creating Group in android using following code

MultiUserChat muc = new MultiUserChat(connection, groupName + "@conference.jabber.org");

setConfig(muc, groupName);
muc.create(groupName);
muc.join("ABC");
groups.add(groupName);


private void setConfig(MultiUserChat multiUserChat, String groupName) {
   try {

        Form form = multiUserChat.getConfigurationForm();
        Form submitForm = form.createAnswerForm();
        for (Iterator<FormField> fields = submitForm.getFields(); fields
                .hasNext();) {
            FormField field = (FormField) fields.next();
            if (!FormField.TYPE_HIDDEN.equals(field.getType())
                    && field.getVariable() != null) {
                submitForm.setDefaultAnswer(field.getVariable());
            }
        }

        List<String> owners = new ArrayList<String>();
        owners.add("abc" + "@" + "@conference.jaber.org");
        submitForm.setAnswer("muc#roomconfig_roomowners", owners);
        submitForm.setAnswer("muc#roomconfig_roomname", groupName);
        submitForm.setAnswer("muc#roomconfig_publicroom", true);
        submitForm.setAnswer("muc#roomconfig_persistentroom", true);

        multiUserChat.sendConfigurationForm(submitForm);
    } catch (Exception e) {
        e.printStackTrace();
    }

}

在此code我组出现在XMPP服务器,然后使用我下面发送邀请code

After this Code My group Appears in the XMPP Server, and then I send the invitation using following Code

muc.invite("abab@" + "jabber.org", "Lets have ");

那么接下来用户user2也受到邀请,当尝试使用加入集团

Then the next user USER2 also receives the Invitation, when try to join the Group using

MultiUserChat mucJoin = new MultiUserChat(connection, groupName);
mucJoin.join("USER2");

然后,我得到了错误收件人-不可用(404)。

Then I got the Error "recipient-unavailable(404)".

请让我知道我做错了,为什么我收到此错误。
谢谢
BAJWA

Please let me know where I am doing wrong, and why I am getting this Error. Thanks Bajwa

推荐答案

我得到了我的问题的解决,我是配置创建和加入它下面

I got the solution of my problem, I was configuring the room before creating and joining it as below

setConfig(muc, groupName);
muc.create(groupName);
muc.join("ABC");
groups.add(groupName);

和我刚换的步骤如下

muc.create(groupName);
muc.join("ABC");
groups.add(groupName);
setConfig(muc, groupName);

我接受我的答案。

I am accepting my answer.

这篇关于获得&QUOT;受者不可用(404)QUOT;而越来越多用户聊天邀请后加入本集团的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆