PLT-6759 Show deactivated users in GMs (#6703)
* Show deactivated users in GMs * Fix runtime error when DMing deactivated user
Этот коммит содержится в:
коммит произвёл
George Goldberg
родитель
ac4e9909fa
Коммит
3f1fca9463
@@ -73,7 +73,7 @@ export default class ChannelHeader extends React.Component {
|
||||
getStateFromStores() {
|
||||
const channel = ChannelStore.get(this.props.channelId);
|
||||
const stats = ChannelStore.getStats(this.props.channelId);
|
||||
const users = UserStore.getProfileListInChannel(this.props.channelId);
|
||||
const users = UserStore.getProfileListInChannel(this.props.channelId, false, true);
|
||||
|
||||
let otherUserId = null;
|
||||
if (channel && channel.type === 'D') {
|
||||
@@ -227,7 +227,7 @@ export default class ChannelHeader extends React.Component {
|
||||
AppDispatcher.handleViewAction({
|
||||
type: ActionTypes.TOGGLE_DM_MODAL,
|
||||
value: true,
|
||||
startingUsers: UserStore.getProfileListInChannel(this.props.channelId, true)
|
||||
startingUsers: UserStore.getProfileListInChannel(this.props.channelId, true, false)
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@@ -45,7 +45,7 @@ export default class MemberListChannel extends React.Component {
|
||||
const stats = ChannelStore.getCurrentStats();
|
||||
|
||||
this.state = {
|
||||
users: UserStore.getProfileListInChannel(),
|
||||
users: UserStore.getProfileListInChannel(ChannelStore.getCurrentId(), false, true),
|
||||
teamMembers: Object.assign({}, TeamStore.getMembersInTeam()),
|
||||
channelMembers: Object.assign({}, ChannelStore.getMembersInChannel()),
|
||||
total: stats.member_count,
|
||||
@@ -81,7 +81,7 @@ export default class MemberListChannel extends React.Component {
|
||||
if (this.term) {
|
||||
users = searchProfilesInCurrentChannel(store.getState(), this.term);
|
||||
} else {
|
||||
users = UserStore.getProfileListInChannel();
|
||||
users = UserStore.getProfileListInChannel(ChannelStore.getCurrentId(), false, true);
|
||||
}
|
||||
|
||||
this.setState({
|
||||
|
||||
@@ -390,10 +390,10 @@ class UserStoreClass extends EventEmitter {
|
||||
});
|
||||
}
|
||||
|
||||
getProfileListInChannel(channelId = ChannelStore.getCurrentId(), skipCurrent = false) {
|
||||
getProfileListInChannel(channelId = ChannelStore.getCurrentId(), skipCurrent = false, skipInactive = false) {
|
||||
const userIds = Array.from(Selectors.getUserIdsInChannels(store.getState())[channelId] || []);
|
||||
|
||||
return this.getProfileListForIds(userIds, skipCurrent, false);
|
||||
return this.getProfileListForIds(userIds, skipCurrent, skipInactive);
|
||||
}
|
||||
|
||||
saveProfileNotInChannel(channelId = ChannelStore.getCurrentId(), profile) {
|
||||
|
||||
Ссылка в новой задаче
Block a user