Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Database structure

...

New additions are colored green.

Table

Column

Definition

Channels

TotalMsgCountRoot

Total number of root messages

ChannelMembers

MsgCountRoot

Number of seen root messages

MentionCountRoot

Number of unread mentions in root messages

Threads

PostId

Id of the root post

ChannelId

ReplyCount

Number or reply posts in this thread

LastReplyAt

Timestamp of the last reply

Participants

json array of all thread member IDs

ThreadMemberships

PostId

Id of the root post

UserId

Id of the user

Following

Is the thread followed

UnreadMentions

Number of unread mentions for this user in the thread

LastViewed

Timestamp of when the thread was last viewed

LastUpdated

Timestamp of the last change to the thread (follow state, mentions, etc)

API

https://api.mattermost.com/#tag/threads

New APIs

Path

Method

Description

api/v4/users/{user_id}/teams/{team_id}/threads


GET

Return threads that the user is following

api/v4/users/{user_id}/teams/{team_id}/threads/read

PUT

Mark all threads as read

api/v4/users/{user_id}/teams/{team_id}/{thread_id}

GET

Get one thread by Id

api/v4/users/{user_id}/teams/{team_id}/{thread_id}/following

PUT

Start following a thread

api/v4/users/{user_id}/teams/{team_id}/{thread_id}/following

DELETE

Stop following a thread

api/v4/users/{user_id}/teams/{team_id}/{thread_id}/read/{timestamp}

PUT

Change ‘read’ state of a thread based on the timestamp

...