提交 f56b0adf 编写于 作者: Huan (李卓桓)'s avatar Huan (李卓桓)

fix bug: strip the last message.self

上级 1ba52055
......@@ -270,7 +270,7 @@ class PuppetWeb extends Puppet {
})
}
reply(message, replyContent) {
if (message.self()) {
if (this.self(message)) {
return Promise.reject(new Error('will not to reply message of myself'))
}
......@@ -281,14 +281,6 @@ class PuppetWeb extends Puppet {
.set('to' , message.obj.from)
.set('room' , message.obj.room)
if (this.userId) {
// FIXME: find a alternate way to check a message create by `self`
m.set('self', this.userId)
}
else {
log.warn('PuppetWeb', 'reply() too early before logined user be set')
}
// log.verbose('PuppetWeb', 'reply() by message: %s', util.inspect(m))
return this.send(m)
.catch(e => {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册