Skip to content

Commit 6755c35

Browse files
DV8FromTheWorldshaydewaelZoddo
authored
Updated identify connection fields to match deprecation status. (#5067)
* Updated identify connection fields to match deprecation status. It is expected that these field names will be supported for a while, but it is recommended to all consumers to update to unprefixed fields. * Update docs/topics/Gateway.md * add identify changelog * ayyy explicit api versions * Update docs/topics/Gateway.md Co-authored-by: Zoddo <[email protected]> Co-authored-by: Shay <[email protected]> Co-authored-by: Shay DeWael <[email protected]> Co-authored-by: Zoddo <[email protected]>
1 parent 7ae469f commit 6755c35

File tree

2 files changed

+22
-11
lines changed

2 files changed

+22
-11
lines changed

docs/Change_Log.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,13 @@
11
# Change Log
22

3+
## Updated Connection Property Field Names
4+
5+
#### Jun 17, 2022
6+
7+
The `$` prefix in [identify connection properties](#DOCS_TOPICS_GATEWAY/identify-identify-connection-properties) are deprecated. The new field names are `os`, `browser`, and `device`. When passed, the `$`-prefixed names will resolve to the new ones.
8+
9+
In API v11, support for the previous field names (`$os`, `$browser`, and `$device`) will be removed.
10+
311
## Auto Moderation
412

513
#### Jun 16, 2022

docs/topics/Gateway.md

Lines changed: 14 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -154,9 +154,9 @@ This is a minimal `IDENTIFY` payload. `IDENTIFY` supports additional optional fi
154154
"token": "my_token",
155155
"intents": 513,
156156
"properties": {
157-
"$os": "linux",
158-
"$browser": "my_library",
159-
"$device": "my_library"
157+
"os": "linux",
158+
"browser": "my_library",
159+
"device": "my_library"
160160
}
161161
}
162162
}
@@ -570,11 +570,14 @@ Used to trigger the initial handshake with the gateway.
570570

571571
###### Identify Connection Properties
572572

573-
| Field | Type | Description |
574-
| --------- | ------ | --------------------- |
575-
| \$os | string | your operating system |
576-
| \$browser | string | your library name |
577-
| \$device | string | your library name |
573+
| Field | Type | Description |
574+
| ------- | ------ | --------------------- |
575+
| os | string | your operating system |
576+
| browser | string | your library name |
577+
| device | string | your library name |
578+
579+
> warn
580+
> These fields originally were $ prefixed (i.e: `$browser`) but [this syntax is deprecated](#DOCS_CHANGE_LOG/updated-connection-property-field-names). While they currently still work, it is recommended to move to non-prefixed fields.
578581
579582
###### Example Identify
580583

@@ -584,9 +587,9 @@ Used to trigger the initial handshake with the gateway.
584587
"d": {
585588
"token": "my_token",
586589
"properties": {
587-
"$os": "linux",
588-
"$browser": "disco",
589-
"$device": "disco"
590+
"os": "linux",
591+
"browser": "disco",
592+
"device": "disco"
590593
},
591594
"compress": true,
592595
"large_threshold": 250,

0 commit comments

Comments
 (0)