From 75c9f707e01154a2942dd5f082cd560fa12d81d5 Mon Sep 17 00:00:00 2001 From: wmwragg Date: Wed, 14 Sep 2016 15:35:04 +0100 Subject: [PATCH] Don't show current user in queryList --- src/components/views/dialogs/ChatInviteDialog.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/components/views/dialogs/ChatInviteDialog.js b/src/components/views/dialogs/ChatInviteDialog.js index 1c8f95f6d8..93beb4da79 100644 --- a/src/components/views/dialogs/ChatInviteDialog.js +++ b/src/components/views/dialogs/ChatInviteDialog.js @@ -265,11 +265,16 @@ module.exports = React.createClass({ var uid = user.userId.toLowerCase(); query = query.toLowerCase(); - // dount match any that are already on the invite list + // don't match any that are already on the invite list if (this._isOnInviteList(uid)) { return false; } + // ignore current user + if (uid === MatrixClientPeg.get().credentials.userId) { + return false; + } + // direct prefix matches if (name.indexOf(query) === 0 || uid.indexOf(query) === 0) { return true;