summaryrefslogtreecommitdiffstats
path: root/webapp
diff options
context:
space:
mode:
authorJoram Wilander <jwawilander@gmail.com>2017-06-22 06:36:46 -0400
committerGeorge Goldberg <george@gberg.me>2017-06-22 11:36:46 +0100
commit3f1fca9463df27e8f795356ab6873d0d5bf4d634 (patch)
treeeb023486f6bac6a8156633fcc6adb5f4bd360583 /webapp
parentac4e9909fa4f3f6c6a0d1e537d6039115d07a5e0 (diff)
downloadchat-3f1fca9463df27e8f795356ab6873d0d5bf4d634.tar.gz
chat-3f1fca9463df27e8f795356ab6873d0d5bf4d634.tar.bz2
chat-3f1fca9463df27e8f795356ab6873d0d5bf4d634.zip
PLT-6759 Show deactivated users in GMs (#6703)
* Show deactivated users in GMs * Fix runtime error when DMing deactivated user
Diffstat (limited to 'webapp')
-rw-r--r--webapp/components/channel_header.jsx4
-rw-r--r--webapp/components/member_list_channel/member_list_channel.jsx4
-rw-r--r--webapp/stores/user_store.jsx4
3 files changed, 6 insertions, 6 deletions
diff --git a/webapp/components/channel_header.jsx b/webapp/components/channel_header.jsx
index 7116b435c..a409baec6 100644
--- a/webapp/components/channel_header.jsx
+++ b/webapp/components/channel_header.jsx
@@ -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)
});
}
diff --git a/webapp/components/member_list_channel/member_list_channel.jsx b/webapp/components/member_list_channel/member_list_channel.jsx
index 8dbdd37f2..f33d14a27 100644
--- a/webapp/components/member_list_channel/member_list_channel.jsx
+++ b/webapp/components/member_list_channel/member_list_channel.jsx
@@ -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({
diff --git a/webapp/stores/user_store.jsx b/webapp/stores/user_store.jsx
index b6e867443..79052d77e 100644
--- a/webapp/stores/user_store.jsx
+++ b/webapp/stores/user_store.jsx
@@ -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) {