[MM-59367] export: enable exporting thread followers for CRT (#27623)

Этот коммит содержится в:
Ibrahim Serdar Acikgoz
2024-08-29 14:06:41 +02:00
коммит произвёл GitHub
родитель 3dc0e63c03
Коммит d5cc2eb2f6
17 изменённых файлов: 1430 добавлений и 63 удалений

Просмотреть файл

@@ -321,6 +321,7 @@ type ChannelMemberHistoryStore interface {
}
type ThreadStore interface {
GetThreadFollowers(threadID string, fetchOnlyActive bool) ([]string, error)
GetThreadMembershipsForExport(postID string) ([]*model.ThreadMembershipForExport, error)
Get(id string) (*model.Thread, error)
GetTotalUnreadThreads(userId, teamID string, opts model.GetUserThreadsOpts) (int64, error)
@@ -346,6 +347,9 @@ type ThreadStore interface {
DeleteOrphanedRows(limit int) (deleted int64, err error)
GetThreadUnreadReplyCount(threadMembership *model.ThreadMembership) (int64, error)
DeleteMembershipsForChannel(userID, channelID string) error
SaveMultipleMemberships(memberships []*model.ThreadMembership) ([]*model.ThreadMembership, error)
MaintainMultipleFromImport(memberships []*model.ThreadMembership) ([]*model.ThreadMembership, error)
}
type PostStore interface {
@@ -1103,6 +1107,9 @@ type ThreadMembershipOpts struct {
// UpdateParticipants indicates whether or not the thread's participants list
// should be updated.
UpdateParticipants bool
// ImportData contains the data only when the membership is imported.
// and triggers a different workflow.
ImportData *ThreadMembershipImportData
}
// PostReminderMetadata contains some info needed to send
@@ -1121,3 +1128,10 @@ type SidebarCategorySearchOpts struct {
ExcludeTeam bool
Type model.SidebarCategoryType
}
type ThreadMembershipImportData struct {
// LastViewed is the timestamp to set the LastViewed field to.
LastViewed int64
// UnreadMentions is the number of unread mentions to set the UnreadMentions field to.
UnreadMentions int64
}