Fix autocomplete for old mechanisms and add partial fix for channel switcher (#4279)
Этот коммит содержится в:
коммит произвёл
enahum
родитель
4688d4981a
Коммит
4aa96c76b4
@@ -118,7 +118,7 @@ export function removeUserFromChannel(channelId, userId, success, error) {
|
||||
|
||||
export function openDirectChannelToUser(user, success, error) {
|
||||
const channelName = Utils.getDirectChannelName(UserStore.getCurrentId(), user.id);
|
||||
let channel = ChannelStore.getByName(channelName);
|
||||
const channel = ChannelStore.getByName(channelName);
|
||||
|
||||
if (channel) {
|
||||
PreferenceStore.setPreference(Preferences.CATEGORY_DIRECT_CHANNEL_SHOW, user.id, 'true');
|
||||
@@ -137,16 +137,6 @@ export function openDirectChannelToUser(user, success, error) {
|
||||
return;
|
||||
}
|
||||
|
||||
channel = {
|
||||
name: channelName,
|
||||
last_post_at: 0,
|
||||
total_msg_count: 0,
|
||||
type: 'D',
|
||||
display_name: user.username,
|
||||
teammate_id: user.id,
|
||||
status: UserStore.getStatus(user.id)
|
||||
};
|
||||
|
||||
Client.createDirectChannel(
|
||||
user.id,
|
||||
(data) => {
|
||||
|
||||
Ссылка в новой задаче
Block a user