How to use the wechaty-puppet.MessageType.Contact function in wechaty-puppet

To help you get started, we’ve selected a few wechaty-puppet examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github wechaty / wechaty-puppet-padplus / src / pure-function-helpers / message-type.ts View on Github external
case PadplusMessageType.Location:
      type = MessageType.Location
      // console.log(rawPayload)
      break

    case PadplusMessageType.Video:
      type = MessageType.Video
      // console.log(rawPayload)
      break

    case PadplusMessageType.Sys:
      type = MessageType.Unknown
      break

    case PadplusMessageType.ShareCard:
      type = MessageType.Contact
      break

    case PadplusMessageType.VoipMsg:
    case PadplusMessageType.Recalled:
      type = MessageType.Recalled
      break

    case PadplusMessageType.StatusNotify:
    case PadplusMessageType.SysNotice:
      type = MessageType.Unknown
      break

    default:
      throw new Error('unsupported type: ' + PadplusMessageType[rawType] + '(' + rawType + ')')
  }
github wechaty / wechaty / src / puppet-padchat / pure-function-helpers / message-type.ts View on Github external
case PadchatMessageType.App:
      type = MessageType.Attachment
      // console.log(rawPayload)
      break

    case PadchatMessageType.Video:
      type = MessageType.Video
      // console.log(rawPayload)
      break

    case PadchatMessageType.Sys:
      type = MessageType.Unknown
      break

    case PadchatMessageType.ShareCard:
      type = MessageType.Contact
      break

    case PadchatMessageType.Recalled:
    case PadchatMessageType.StatusNotify:
    case PadchatMessageType.SysNotice:
      type = MessageType.Unknown
      break

    default:
      throw new Error('unsupported type: ' + PadchatMessageType[rawType] + '(' + rawType + ')')
  }

  return type
}