Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
guangyao authored and guangyao committed Dec 8, 2017
2 parents bf75b5a + 0d8d248 commit 811ca57
Show file tree
Hide file tree
Showing 2 changed files with 65 additions and 17 deletions.
80 changes: 64 additions & 16 deletions README.md
Expand Up @@ -67,8 +67,8 @@ dependencies {
**status 必须为以下四个值之一: "send_succeed", "send_failed", "send_going", "download_failed",如果没有定义这个属性, 默认值是 "send_succeed".**

```
message = { // text message
msgId: "msgid",
 message = { // 文本
   msgId: "msgid",
status: "send_going",
msgType: "text",
isOutgoing: true,
Expand All @@ -82,34 +82,82 @@ message = { // image message
isOutGoing: true,
progress: "progress string"
mediaPath: "image path"
fromUser: {}
fromUser: {},
extend:{
displayName:"图片发送于2017-12-07 10:07",
imageHeight:"2848.000000",
imageWidth:"4288.000000",
thumbPath:"",
url:""
}
}
message = { // voice message
msgId: "msgid",
message = { // 语音
   msgId: "msgid",
msgType: "voice",
isOutGoing: true,
duration: number, // 注意这个值有用户自己设置时长,单位秒
mediaPath: "voice path"
fromUser: {},
extend:{
duration:"3"
isPlayed:false
url:""
}
}
message = { //红包消息
   msgId: "msgid",
status: "",
msgType: "redpacket",
isOutGoing: true,
   extend: {
comments:"",//祝福语
serialNo:"",//
     type:""//红包类型
   },
fromUser: {}
}
message = { //红包领取消息
   msgId: "msgid",
status: "",
msgType: "redpacketOpen",
isOutGoing: true,
   extend: {
serialNo:""
    tipMsg:""//红包通知
   },
fromUser: {}
}
message = { // video message
msgId: "msgid",
status: "send_failed",
msgType: "video",
message = { //转账消息
   msgId: "msgid",
status: "",
msgType: "transfer",
isOutGoing: true,
druation: number
mediaPath: "voice path"
   extend: {
amount:"1"
comments:""
serialNo:""
   },
fromUser: {}
}
message = { // event message
msgId: "msgid",
msgType: "event",
text: "the event text"
message = { //名片消息
   msgId: "msgid",
status: "",
msgType: "card",
isOutGoing: true,
   extend: {
    imgPath:""//头像
    name:""//昵称
    sessionId:""//userId
type:""
   },
fromUser: {}
}
```

- `fromUser` 对象格式:
Expand Down
2 changes: 1 addition & 1 deletion package.json
Expand Up @@ -81,5 +81,5 @@
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"version": "1.0.3"
"version": "1.0.5"
}

0 comments on commit 811ca57

Please sign in to comment.