MM-12460 Fill the Theme field for team members on export (#11533)
* Fill the Theme field for team members on export * Reverted renaming userId to userID * Use the TeamId to get the team specific theme
Этот коммит содержится в:
коммит произвёл
George Goldberg
родитель
be099215c5
Коммит
9e41a8e03a
@@ -17,7 +17,7 @@ import (
|
|||||||
)
|
)
|
||||||
|
|
||||||
// We use this map to identify the exportable preferences.
|
// We use this map to identify the exportable preferences.
|
||||||
// Here we link the preference category and name, to the name of the relevant filed in the import struct.
|
// Here we link the preference category and name, to the name of the relevant field in the import struct.
|
||||||
var exportablePreferences = map[ComparablePreference]string{{
|
var exportablePreferences = map[ComparablePreference]string{{
|
||||||
Category: model.PREFERENCE_CATEGORY_THEME,
|
Category: model.PREFERENCE_CATEGORY_THEME,
|
||||||
Name: "",
|
Name: "",
|
||||||
@@ -270,6 +270,12 @@ func (a *App) buildUserTeamAndChannelMemberships(userId string) (*[]UserTeamImpo
|
|||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Get the user theme
|
||||||
|
themePreference, err := a.Srv.Store.Preference().Get(member.UserId, model.PREFERENCE_CATEGORY_THEME, member.TeamId)
|
||||||
|
if err == nil {
|
||||||
|
memberData.Theme = &themePreference.Value
|
||||||
|
}
|
||||||
|
|
||||||
memberData.Channels = channelMembers
|
memberData.Channels = channelMembers
|
||||||
|
|
||||||
memberships = append(memberships, *memberData)
|
memberships = append(memberships, *memberData)
|
||||||
|
|||||||
Ссылка в новой задаче
Block a user