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

msg.say() to room first if msg is in room. (#1330)

上级 0618a674
......@@ -724,7 +724,10 @@ export class PuppetPadchat extends Puppet {
text : string,
): Promise<void> {
log.verbose('PuppetPadchat', 'messageSend(%s, %s)', JSON.stringify(receiver), text)
const id = receiver.contactId || receiver.roomId
// roomId first, contactId second.
const id = receiver.roomId || receiver.contactId
if (!id) {
throw Error('no id')
}
......@@ -740,7 +743,9 @@ export class PuppetPadchat extends Puppet {
): Promise<void> {
log.verbose('PuppetPadchat', 'messageSend("%s", %s)', JSON.stringify(receiver), file)
const id = receiver.contactId || receiver.roomId
// roomId first, contactId second.
const id = receiver.roomId || receiver.contactId
if (!id) {
throw new Error('no id!')
}
......@@ -779,7 +784,9 @@ export class PuppetPadchat extends Puppet {
throw new Error('no bridge')
}
const id = receiver.contactId || receiver.roomId
// roomId first, contactId second.
const id = receiver.roomId || receiver.contactId
if (!id) {
throw Error('no id')
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册