Mattermost, Inc.

What is the difference between RootID and ParentId about Post ?

type Post struct {
	Id         string `json:"id"`
	CreateAt   int64  `json:"create_at"`
	UpdateAt   int64  `json:"update_at"`
	EditAt     int64  `json:"edit_at"`
	DeleteAt   int64  `json:"delete_at"`
	IsPinned   bool   `json:"is_pinned"`
	UserId     string `json:"user_id"`
	ChannelId  string `json:"channel_id"`
	RootId     string `json:"root_id"`
	ParentId   string `json:"parent_id"`
	OriginalId string `json:"original_id"`

Hello, @naichadouban

Based on the conversation I had with the lead engineer, I can confirm that:

  • RootId is the identifier of the first post in a thread
  • ParentId is a legacy column and it is no longer in use
  • OriginalId is to keep track of the original post before it was edited

Shout out to @elias for the confirmation. :slight_smile:

1 Like

thank you! :pray: :pray:

1 Like