               .set 'actorsCount', messageLikers.size
               .set 'isInteracted', messageLikers.contains whoami()._id
 
-    return thread.set 'channel', channel
+    return thread
 ]
 
 channelByName = (name, types = ['topic', 'group', 'announcement']) ->

  (publics, privates) -> publics.concat privates
]

# Returns the selected thread mapped with selected channel instance.
selectedChannelThread = [
  channelThreads
  selectedChannel
  MessageLikersStore
  allUsers
  (threads, channel, likers, users) ->
    return null  unless channel
    thread = threads.get channel.get('id')
    thread = thread.update 'messages', (messages) ->
      messages.map (msg) ->
        msg.update 'body', (body) ->

  sidebarPublicChannels

  allFollowedChannels
  showPopularMessagesFlag : ShowPopularMessagesFlagStore
}

