MCPcopy
hub / github.com/wechaty/wechaty / self

Method self

src/user/message.ts:650–655  ·  view source on GitHub ↗

* 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!') * }

()

Source from the content-addressed store, hash-verified

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 *

Callers

nothing calls this directly

Calls 1

talkerMethod · 0.95

Tested by

no test coverage detected