Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Q: All the media types #1115

Closed
suntong opened this issue Mar 6, 2018 · 5 comments
Closed

Q: All the media types #1115

suntong opened this issue Mar 6, 2018 · 5 comments

Comments

@suntong
Copy link
Contributor

suntong commented Mar 6, 2018

In https://github.com/Chatie/wechaty/blob/master/example/media-file-bot.ts, there lists some media types:

  // if ( m.type() === MsgType.IMAGE
  //   || m.type() === MsgType.EMOTICON
  //   || m.type() === MsgType.VIDEO
  //   || m.type() === MsgType.VOICE
  //   || m.type() === MsgType.MICROVIDEO
  //   || m.type() === MsgType.APP
  //   || (m.type() === MsgType.TEXT && m.typeSub() === MsgType.LOCATION)  // LOCATION

This seems not the complete list of all the media types, e.g., the url-shared-as-a-message is not listed there.

Where can I find the complete list of all the media types (and their explanations for e.g., EMOTICON)? Thx.

@lijiarui
Copy link
Member

lijiarui commented Mar 6, 2018

EMOTICON, do you mean emotion?

If it is, this type is MsgType.TEXT

Also, besides MsgTyps, there is AppMsgType, as follows

export enum AppMsgType {
  TEXT                     = 1,
  IMG                      = 2,
  AUDIO                    = 3,
  VIDEO                    = 4,
  URL                      = 5,
  ATTACH                   = 6,
  OPEN                     = 7,
  EMOJI                    = 8,
  VOICE_REMIND             = 9,
  SCAN_GOOD                = 10,
  GOOD                     = 13,
  EMOTION                  = 15,
  CARD_TICKET              = 16,
  REALTIME_SHARE_LOCATION  = 17,
  TRANSFERS                = 2e3,
  RED_ENVELOPES            = 2001,
  READER_TYPE              = 100001,
}

see more in src/puppet-web/schema.ts

@suntong
Copy link
Contributor Author

suntong commented Mar 6, 2018

thanks a lot @lijiarui!

@suntong suntong closed this as completed Mar 6, 2018
@suntong
Copy link
Contributor Author

suntong commented Mar 6, 2018

Oh,

besides MsgTyps, there is AppMsgType

So what's difference between

MsgType.TEXT and AppMsgType.TEXT, and all else that are the same between them, e.g., IMG, VIDEO, etc?

@suntong suntong reopened this Mar 6, 2018
@lijiarui
Copy link
Member

lijiarui commented Mar 6, 2018

well, I don't know, maybe @zixia knows...

@huan
Copy link
Member

huan commented Mar 6, 2018

Short answer: AppMsgType is a sub-type of MsgType.APP

Long version: they are inherited from the web-wechat source code, which is designed by Tencent.

@suntong suntong closed this as completed Mar 6, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants