* Check if a message is sent by self. * * @returns {boolean} - Return `true` for send from self, `false` for send from others. * @example * if (message.self()) { * console.log('this message is sent by myself!') * }
()
| 648 | * } |
| 649 | */ |
| 650 | public self (): boolean { |
| 651 | const userId = this.wechaty.puppet.selfId() |
| 652 | const talker = this.talker() |
| 653 | |
| 654 | return !!talker && talker.id === userId |
| 655 | } |
| 656 | |
| 657 | /** |
| 658 | * |