将 Smooch 从 3 升级到 4。当我收到消息时,用户是 Web 用户 b0b0b2865ba9080d31d7894d 而不是名称

Upgrading Smooch from 3 to 4. When I get the messages, the user is Web User b0b0b2865ba9080d31d7894d instead of having the name

我用的是最新的4.13版本

这是我的初始化:

var promise = Smooch.init({
                appId: smooch_key,
                givenName: $rootScope.data.user.first_name,
                surname: $rootScope.data.user.last_name,
                properties: {
                    email: $rootScope.data.user.email,
                    uid: $rootScope.data.user.id,
                    language: $rootScope.data.user.language,
                    country: $rootScope.data.user.country
                }
            });
            promise.then(function() {
                $('#sk-holder').addClass('no-print');
                $rootScope.smooch_inited = true;
            });

如您所见,我给它起的名字,但它现在似乎可以工作了。 我做错了什么?

givenNamesurnameproperties 不属于受支持的 init parameters. You should call Smooch.updateUser 的一部分,无法在用户记录

上设置属性
Smooch.init({
    appId: smooch_key
})
    .then(function() {
        Smooch.updateUser({
            givenName: $rootScope.data.user.first_name,
            surname: $rootScope.data.user.last_name,
            properties: {
                email: $rootScope.data.user.email,
                uid: $rootScope.data.user.id,
                language: $rootScope.data.user.language,
                country: $rootScope.data.user.country
            }
        });

        $('#sk-holder').addClass('no-print');
        $rootScope.smooch_inited = true;
    });