MM-14675: Eliminates implicit GroupChannel/GroupTeam associations. (#13199)

* MM-14675: Upserts GroupTeam when GroupChannel is linked.
MM-14675: Delete all associated GroupChannels when deleting a GroupTeam.
MM-14675: Using replica DB where possible.
MM-14675: Updates create method used in tests.

* MM-14675: Removes unnecessary DB retrieval of GroupSyncable record.
Этот коммит содержится в:
Martin Kraft
2019-12-18 08:54:09 -05:00
коммит произвёл GitHub
родитель 0ffe199928
Коммит 75ffd0b69e
10 изменённых файлов: 130 добавлений и 68 удалений

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

@@ -275,7 +275,7 @@ func TestFilterOutOfChannelMentions(t *testing.T) {
constrainedChannel, appErr = th.App.UpdateChannel(constrainedChannel)
require.Nil(t, appErr)
_, appErr = th.App.CreateGroupSyncable(&model.GroupSyncable{
_, appErr = th.App.UpsertGroupSyncable(&model.GroupSyncable{
GroupId: group.Id,
Type: model.GroupSyncableTypeChannel,
SyncableId: constrainedChannel.Id,