Skip to content
This repository has been archived by the owner on Jun 29, 2023. It is now read-only.

Fix few docs tickets #448

Closed
wants to merge 23 commits into from
Closed
Changes from 5 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
164 changes: 162 additions & 2 deletions v4/source/introduction.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -214,23 +214,183 @@ tags:

The list of Mattermost WebSocket events are:
- added_to_team
```
{
event: 'added_to_team',
tapaswenipathak marked this conversation as resolved.
Show resolved Hide resolved
data: {
team_id: '<team_id>',
user_id: '<user_id>'
},
broadcast: {
omit_users: null,
user_id: '<user_id>',
channel_id: '<channel_id>',
team_id: '<team_id>'
},
seq: '<seq_id>'
}
```
- authentication_challenge
- channel_converted
```
{
token: <token-id>
}
```
- channel_created
```
{
'broadcast': {
'omit_users': None,
tapaswenipathak marked this conversation as resolved.
Show resolved Hide resolved
'channel_id': '<channel_id>',
'team_id': '<team_id>',
'user_id': '<user_id>'
},
'data': {
'channel_id': '<channel_id>',
'team_id': '<team_id>'
},
'event': 'channel_created',
'seq': 9
tapaswenipathak marked this conversation as resolved.
Show resolved Hide resolved
}
```
- channel_deleted
- channel_member_updated
```
{
'event': 'channel_deleted',
'data': {
'channel_id': '<channel_id>'
},
'broadcast': {
tapaswenipathak marked this conversation as resolved.
Show resolved Hide resolved
'omit_users': 'null',
'user_id': '',
'channel_id': '',
'team_id': '<team_id>'},
'seq': '<seq_id>'

```
- channel_updated
```
{
'event': 'channel_updated',
'data': {
'channel': {
'id': '<channel_id>',
'create_at': '<timestamp>',
'update_at': '<timestamp>',
'delete_at': '<timestamp>',
'team_id': '<team_id>',
'type': 'O',
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This can be 'P', 'D' or 'G' as well

'display_name':'<channel_id>',
'name': '<channel_name>',
'header': 'header',
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should be a blank string right?

'purpose': '',
'last_post_at': '<timestamp>',
'total_msg_count': '<total_msg_count>',
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There shouldn't be quotes here as this is a number. Same with the timestamp fields

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There's a lot of other cases throughout the changes with this issue

'extra_update_at': '<timestamp>',
'creator_id': '<basic_user_id>'
tapaswenipathak marked this conversation as resolved.
Show resolved Hide resolved
},
'broadcast': {
'omit_users': null,
'user_id': '',
'channel_id': '<channel_id>',
'team_id': '<team_id>'
},
'seq': '<seq_num>'
}
```
- channel_viewed
```
{
'desc': '<desc_id>'
tapaswenipathak marked this conversation as resolved.
Show resolved Hide resolved
}
```
- config_changed
```
{
'info': '<info_id>'
tapaswenipathak marked this conversation as resolved.
Show resolved Hide resolved
}
```
- delete_team
```
{
'teamname': '<team_name>',
'teamid': '<team_id>',
'state': '<success/error>'
}
tapaswenipathak marked this conversation as resolved.
Show resolved Hide resolved
```
- direct_added
```
{
'channel_id': '<channel_id>'
}
```
- emoji_added
```
{
'event': 'emoji_added',
'data': {
'emoji': {
'id': '<id>',
'create_at': '<timestamp>',
'update_at': '<timestamp>',
'delete_at': '<timestamp>',
'creator_id': '<creator_id>',
tapaswenipathak marked this conversation as resolved.
Show resolved Hide resolved
'name': 'name'
}
},
'broadcast': {
'omit_users': null,
'user_id': '',
'channel_id': '',
'team_id': ''
},
'seq': 'sequence_id'
}
```
- ephemeral_message
```
{
'message': '<message>'
}
tapaswenipathak marked this conversation as resolved.
Show resolved Hide resolved
```
- group_added
- hello
```
{
'message': '<message>'
}
```
tapaswenipathak marked this conversation as resolved.
Show resolved Hide resolved
- leave_team
```
{
event: <event_string>.LEAVE_TEAM,
data: {
team_id: '<team_id>',
user_id: '<user_id>'
},
broadcast: {
omit_users: null,
user_id: '<user_id>',
channel_id: '<channel_id>',
team_id: '<team_id>'
},
seq: '<seq_no>'
}
```
- license_changed
```
{
'type': 'GeneralTypes.CLIENT_LICENSE_RECEIVED',
tapaswenipathak marked this conversation as resolved.
Show resolved Hide resolved
'data': 'msg.data.license'
}
```
- memberrole_updated
```
{
'type': 'TeamTypes.RECEIVED_MY_TEAM_MEMBER',
tapaswenipathak marked this conversation as resolved.
Show resolved Hide resolved
'data': 'msg.data.member',
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This one should have a seq_id and broadcast right?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

```
- new_user
- plugin_disabled
- plugin_enabled
Expand Down