PLT-6214 Move channel store and actions over to redux (#6235)

* Move channel store and actions over to redux

* Fix style errors

* Fix unit test

* Various fixes

* More fixes

* Revert config changes
Этот коммит содержится в:
Joram Wilander
2017-04-28 13:16:03 -04:00
коммит произвёл Christopher Speller
родитель 302ec17bee
Коммит 96906482ce
30 изменённых файлов: 499 добавлений и 691 удалений

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

@@ -490,7 +490,11 @@ func AddChannelMember(userId string, channel *model.Channel, userRequestorId str
return nil, err
}
go PostAddToChannelMessage(userRequestor, user, channel)
if userId == userRequestorId {
postJoinChannelMessage(user, channel)
} else {
go PostAddToChannelMessage(userRequestor, user, channel)
}
UpdateChannelLastViewedAt([]string{channel.Id}, userRequestor.Id)
@@ -961,7 +965,11 @@ func RemoveUserFromChannel(userIdToRemove string, removerUserId string, channel
return err
}
go PostRemoveFromChannelMessage(removerUserId, user, channel)
if userIdToRemove == removerUserId {
postLeaveChannelMessage(user, channel)
} else {
go PostRemoveFromChannelMessage(removerUserId, user, channel)
}
return nil
}