* Get the type from the message. * > Tips: MessageType is Enum here. * - MessageType.Unknown * - MessageType.Attachment * - MessageType.Audio * - MessageType.Contact * - MessageType.Emoticon * - MessageType.Image
()
| 632 | * } |
| 633 | */ |
| 634 | public type (): MessageType { |
| 635 | if (!this.payload) { |
| 636 | throw new Error('no payload') |
| 637 | } |
| 638 | return this.payload.type || MessageType.Unknown |
| 639 | } |
| 640 | |
| 641 | /** |
| 642 | * Check if a message is sent by self. |
no outgoing calls
no test coverage detected