aboutsummaryrefslogtreecommitdiff
path: root/tests/resources
diff options
context:
space:
mode:
authorillia k <[email protected]>2017-05-22 22:49:07 +0300
committerZeyla Hellyer <[email protected]>2017-05-22 12:49:07 -0700
commit8f88c6b0613199492ebca8cd9f2bf4dd5c97add7 (patch)
treeea2f86a016e8e6a4dc91f8b7492fcb716f946915 /tests/resources
parentAdd support for retrieving invites with counts (diff)
downloadserenity-8f88c6b0613199492ebca8cd9f2bf4dd5c97add7.tar.xz
serenity-8f88c6b0613199492ebca8cd9f2bf4dd5c97add7.zip
Handle message type 7 (member join)
When message type 7 is received from the gateway, transform the content if the type is 7 to a proper greeting. Additionally, when the type is 6, provide a proper content notifying that a user has pinned a message to the channel. These transformations are not done at REST-level when retrieving messages, and are instead done in `ChannelId::message` and `ChannelId::messages`.
Diffstat (limited to 'tests/resources')
-rw-r--r--tests/resources/message_type_7.json23
1 files changed, 23 insertions, 0 deletions
diff --git a/tests/resources/message_type_7.json b/tests/resources/message_type_7.json
new file mode 100644
index 0000000..823fbad
--- /dev/null
+++ b/tests/resources/message_type_7.json
@@ -0,0 +1,23 @@
+{
+ "type": 7,
+ "tts": false,
+ "timestamp": "2017-01-01T12:00:00.000000+00:00",
+ "pinned": false,
+ "nonce": null,
+ "mentions": [],
+ "mention_roles": [],
+ "mention_everyone": false,
+ "id": "123132131321321",
+ "embeds": [],
+ "edited_timestamp": null,
+ "content": "",
+ "channel_id": "321",
+ "author": {
+ "username": "aaa",
+ "id": "123",
+ "discriminator": "0123",
+ "bot": true,
+ "avatar": "u9aosdu9anbsduas8"
+ },
+ "attachments": []
+}