Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
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))
}
})
rtm.on(RTM_EVENTS.CHANNEL_LEFT, (obj) => {
const { channel } = obj
if (channel) {
const chObj = new ChannelObject({
id: channel,
teamId: this.id,
type: 'group',
})
store.dispatch(removeChannel(chObj))
}
})
rtm.on(RTM_EVENTS.MESSAGE, (msg) => {
if (msg.type !== 'message' || msg.subtype) {
return
}