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
Show file tree
Hide file tree
Changes from 2 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
2 changes: 1 addition & 1 deletion v4/source/channels.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
description: Markdown-formatted text to display in the header of the channel
type:
type: string
description: "'O' for a public channel, 'P' for a private channel"
description: "'O' for a public channel, 'P' for a private channel, 'D' for a direct channel"
tapaswenipathak marked this conversation as resolved.
Show resolved Hide resolved
responses:
'201':
description: Channel creation successful
Expand Down
170 changes: 170 additions & 0 deletions v4/source/introduction.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -214,23 +214,193 @@ tags:

The list of Mattermost WebSocket events are:
- added_to_team
```
{
one: {
id: t('combined_system_message.added_to_team.one'),
defaultMessage: '{firstUser} **added to the team** by {actor}.',
},
one_you: {
id: t('combined_system_message.added_to_team.one_you'),
defaultMessage: 'You were **added to the team** by {actor}.',
},
two: {
id: t('combined_system_message.added_to_team.two'),
defaultMessage: '{firstUser} and {secondUser} **added to the team** by {actor}.',
},
many_expanded: {
id: t('combined_system_message.added_to_team.many_expanded'),
defaultMessage: '{users} and {lastUser} were **added to the team** by {actor}.',
}
tapaswenipathak marked this conversation as resolved.
Show resolved Hide resolved
```
- authentication_challenge
```
{
token: <token-id>
}
```
- channel_converted
```

```
- 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
```
{
'event': 'WebsocketEvents.CHANNEL_DELETED',
tapaswenipathak marked this conversation as resolved.
Show resolved Hide resolved
'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_member_updated
- channel_updated
```
{
'event': 'WebsocketEvents.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': 'WebsocketEvents.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
```
'one': {
'id': '<id>',
'defaultMessage': '{firstUser} **left the team**.',
},
'one_you': {
'id': t('combined_system_message.left_team.one_you'),
'defaultMessage': 'You **left the team**.',
},
'two': {
'id': t('combined_system_message.left_team.two'),
'defaultMessage': '{firstUser} and {secondUser} **left the team**.',
},
'many_expanded': {
'id': t('combined_system_message.left_team.many_expanded'),
'defaultMessage': '{users} and {lastUser} **left the team**.',
},
```
- 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