How to use the wechaty-puppet.MessageType.Unknown 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 / src / puppet-padchat / pure-function-helpers / message-type.ts View on Github external
type = MessageType.Emoticon
      // console.log(rawPayload)
      break

    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 + ')')
  }
github wechaty / wechaty-puppet-padplus / src / pure-function-helpers / message-raw-payload-parser.ts View on Github external
payload.type = MessageType.ChatHistory
          break
        case WechatAppMessageType.MiniProgram:
        case WechatAppMessageType.MiniProgramApp:
          payload.type = MessageType.MiniProgram
          break
        case WechatAppMessageType.RedEnvelopes:
        case WechatAppMessageType.Transfers:
          payload.type = MessageType.Money
          break
        case WechatAppMessageType.RealtimeShareLocation:
          payload.type = MessageType.Location
          break

        default:
          payload.type = MessageType.Unknown
          break
      }
    }
  }

  return payload
}
github wechaty / wechaty-puppet-padplus / src / pure-function-helpers / message-type.ts View on Github external
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 + ')')
  }

  return type
}