|
1 | 1 | # 撤回訊息 |
| 2 | + |
| 3 | +### path |
| 4 | + |
| 5 | +/rooms/:roomId/message |
| 6 | + |
| 7 | +| Field | Description | |
| 8 | +| ------ | ----------- | |
| 9 | +| roomId | Room ID | |
| 10 | + |
| 11 | +### Method |
| 12 | + |
| 13 | +POST |
| 14 | + |
| 15 | +### Headers: |
| 16 | + |
| 17 | +#### For client |
| 18 | + |
| 19 | +| Field | Description | |
| 20 | +| ------------- | ------------ | |
| 21 | +| IM-CLIENT-KEY | Client Key | |
| 22 | +| Authorization | Client Token | |
| 23 | + |
| 24 | +#### For Platform API |
| 25 | + |
| 26 | +| Field | Description | |
| 27 | +| ---------- | ---------------- | |
| 28 | +| IM-API-KEY | Platform API Key | |
| 29 | + |
| 30 | +### Post Body |
| 31 | + |
| 32 | +#### Message |
| 33 | + |
| 34 | +| Field | Type | Description | |
| 35 | +| ----------- | ------ | ------------------- | |
| 36 | +| messageType | String | (required) 'recall' | |
| 37 | +| \_id | String | (required) | |
| 38 | + |
| 39 | +``` |
| 40 | +## Recall Message |
| 41 | +curl -X "POST" "http://localhost:3100/rooms/demo-room/message" \ |
| 42 | + -H 'IM-CLIENT-KEY: {IM-CLIENT-KEY}' \ |
| 43 | + -H 'Authorization: {TOKEN}' \ |
| 44 | + -H 'Content-Type: application/json; charset=utf-8' \ |
| 45 | + -d $'{ |
| 46 | + "_id": "5ce3d80bd594874e495895a4", |
| 47 | + "messageType": "recall" |
| 48 | +}' |
| 49 | +
|
| 50 | +``` |
| 51 | + |
| 52 | +### Response Result |
| 53 | + |
| 54 | +Sent message data |
| 55 | + |
| 56 | +```json |
| 57 | +{ |
| 58 | + "RC": 0, |
| 59 | + "RM": "OK", |
| 60 | + "result": { |
| 61 | + "_id": "5ce3d80bd594874e495895a4", |
| 62 | + "message": "", |
| 63 | + "room": "demo-room", |
| 64 | + "sender": { |
| 65 | + "_id": "sss", |
| 66 | + "nickname": "Nita", |
| 67 | + "avatarUrl": "http://loremflickr.com/240/240/style?1558435839", |
| 68 | + "description": "description la la #1551163111743", |
| 69 | + "isRobot": false, |
| 70 | + "id": "sss", |
| 71 | + "lastLoginTimeMS": 1553145898032 |
| 72 | + }, |
| 73 | + "messageType": "recall", |
| 74 | + "appID": "SampleApp", |
| 75 | + "__v": 0, |
| 76 | + "id": "5ce3d80bd594874e495895a4", |
| 77 | + "messageTimeMS": 1558435851576, |
| 78 | + "updatedAtMS": 1558435921086, |
| 79 | + "createdAtMS": 1558435851580 |
| 80 | + } |
| 81 | +} |
| 82 | +``` |
0 commit comments