PLT-6481 Create platform route and logic to be able to DM a user by email or username (#6310)
* Add logic to be able to DM a user by email or username * PLT-6481 update DM url to be in the format https://servername.com/teamname/messages/xxxxxxxx * PLT-6481 Adding logic to get user by full email * PLT-6481 logic for routes /messages/user_id and /messages/id1_id2 to redirect to /messages/@username * PLT-6481 logic for GM route /messages/generated_id
Этот коммит содержится в:
коммит произвёл
Joram Wilander
родитель
0e89d9be1d
Коммит
98ac903fce
@@ -1099,7 +1099,12 @@ export function 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('__');
|
||||
return getUserIdFromChannelId(channel.name);
|
||||
}
|
||||
|
||||
// Used to get the id of the other user from a DM channel id (id1_id2)
|
||||
export function getUserIdFromChannelId(channelId) {
|
||||
var ids = channelId.split('__');
|
||||
var otherUserId = '';
|
||||
if (ids[0] === UserStore.getCurrentId()) {
|
||||
otherUserId = ids[1];
|
||||
|
||||
Ссылка в новой задаче
Block a user