diff options
Diffstat (limited to 'webapp/stores/user_store.jsx')
-rw-r--r-- | webapp/stores/user_store.jsx | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/webapp/stores/user_store.jsx b/webapp/stores/user_store.jsx index bcc59b690..007d8a5a7 100644 --- a/webapp/stores/user_store.jsx +++ b/webapp/stores/user_store.jsx @@ -414,13 +414,18 @@ class UserStoreClass extends EventEmitter { userIds.splice(index, 1); } - getProfileListInChannel(channelId = ChannelStore.getCurrentId()) { + getProfileListInChannel(channelId = ChannelStore.getCurrentId(), skipCurrent = false) { const userIds = this.profiles_in_channel[channelId] || []; + const currentId = this.getCurrentId(); const profiles = []; for (let i = 0; i < userIds.length; i++) { const profile = this.getProfile(userIds[i]); if (profile) { + if (skipCurrent && profile.id === currentId) { + continue; + } + profiles.push(profile); } } |