您好,我们使用贵公司的即使通讯产品遇到了一个问题,使用web开发,但是获取不到聊天记录,可以实时的聊天。

        // 接受消息
        getMessage: function () {
            let self = this;
            let nick = this.sessionInfo.nick; // 会员名

            this.realtime.createIMClient(nick).then(function (e) {
                e.on(Event.MESSAGE, function (message, conversation) {
                    console.log('Message received: ' + message.text);
                    conversation.queryMessages({
                        limit: 10, // limit 取值范围 1~1000,默认 20
                    }).then(function(messages) {
                        // 最新的十条消息,按时间增序排列
                        console.log(messages)
                    }).catch(console.error.bind(console));
                });
            }).catch(console.error);
        },

        // 发送
        sendOut: function () {
            let self = this;
            let nick = this.sessionInfo.nick; // 会员名

            if (this.checkChat()) {
                // 用自己的会员名作为 clientId,获取 IMClient 对象实例
                this.realtime.createIMClient(nick).then(function (e) {
                    // 创建与他人之间的对话
                    return e.createConversation({
                        members: ['Jerry'],
                        name: nick + ' & Jerry',
                    });
                }).then(function (conversation) {
                    // 发送消息
                    return conversation.send(new TextMessage(self.chat));
                }).then(function (message) {
                    console.log(nick + ' & Jerry', '发送成功!');
                }).catch(console.error);
            }
        }

你这个代码的意思是,登录了之后,每次收到一条消息,都去查这个收到消息的对话最近的 10 条历史消息。

请问你预期的行为是什么样的呢?实际上是什么样的呢?