Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
bind() {
const { rtm } = this
rtm.on(RTM_EVENTS.CHANNEL_JOINED, (obj) => {
const { channel } = obj
if (channel) {
const chObj = new ChannelObject({
id: channel.id,
teamId: this.id,
name: channel.name,
type: 'group',
topic: channel.topic,
memberIds: channel.members,
isMember: channel.is_member,
unreadCount: channel.unread_count,
lastRead: channel.last_read,
status: 'online',
})
store.dispatch(addNewChannel(chObj))
}