PLT-3185 Added support for DMs in Channel Switcher (#3260)
* Added support for DMs * Checked username beginning characters
Этот коммит содержится в:
коммит произвёл
Joram Wilander
родитель
26ec73d5d2
Коммит
ea99cedb62
@@ -1147,6 +1147,13 @@ export function getDirectChannelName(id, otherId) {
|
||||
return handle;
|
||||
}
|
||||
|
||||
export function getDirectChannelNameByUsername(username, otherUsername) {
|
||||
const id = UserStore.getProfileByUsername(username).id;
|
||||
const otherId = UserStore.getProfileByUsername(otherUsername).id;
|
||||
|
||||
return getDirectChannelName(id, otherId);
|
||||
}
|
||||
|
||||
// Used to get the id of the other user from a DM channel
|
||||
export function getUserIdFromChannelName(channel) {
|
||||
var ids = channel.name.split('__');
|
||||
|
||||
Ссылка в новой задаче
Block a user