用户不允许如此快速地注册帐户

时间:2014-10-30 11:26:23

标签: ios xmpp chat ejabberd user-registration

我正在使用ejabberd 2.1.11在我的iOS应用中实现聊天。我面临的问题是,在注册用户后,我必须等待10分钟才能注册另一个用户。

%% In-band registration
{access, register, [{allow, all}]}.
{registration_timeout,infinity}.

这是我在配置文件中使用的内容,但我仍然得到以下错误。

<error code="500" type="wait">
    <resource-constraint xmlns="urn:ietf:params:xml:ns:xmpp-stanzas"/>
    <text xmlns="urn:ietf:params:xml:ns:xmpp-stanzas">Users are not allowed to register accounts so quickly</text>
</error>

1 个答案:

答案 0 :(得分:0)

我们遇到了同样的问题,根本原因是我们在ejabberd.yml中的registration_timeout配置前面有一个额外的空间。删除多余空格后,从配置中正确读取值。您可以通过附加到ejabberd控制台(sudo ejabberdctl debug)来验证它并执行以下代码:

ejabberd_config:get_option(
     registration_timeout,
            fun(TO) when is_integer(TO), TO > 0 ->
                    TO;
               (infinity) ->
                    infinity;
               (unlimited) ->
                    infinity
            end, 600).

这与在mod_register中加载此值的代码相同。

相关问题