From 96906482cecb0df21c8e1a40a2ba00c13c0182a7 Mon Sep 17 00:00:00 2001 From: Joram Wilander Date: Fri, 28 Apr 2017 13:16:03 -0400 Subject: 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 --- app/channel.go | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'app/channel.go') diff --git a/app/channel.go b/app/channel.go index 17fa02ad3..0d9cb5a94 100644 --- a/app/channel.go +++ b/app/channel.go @@ -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 } -- cgit v1.2.3-1-g7c22