Hi,
I am trying to figure out by looking at the redux-store whether I have selected a channel or direct message to user but unable to figure it out.
Can anyone help regarding the same.
Thanks in advance.
Hi,
I am trying to figure out by looking at the redux-store whether I have selected a channel or direct message to user but unable to figure it out.
Can anyone help regarding the same.
Thanks in advance.
In case any one else was looking for it, here’s how i did it :
currentChannelId = getState().entities.channels.currentChannelId;
channelType = getState().entities.channels.channels['currentChannelId'].type
If the channelType is “D”, then it is direct message, else not.
Please let me know if there is a better way to do it.