never try to tab-complete yourself, doofus

pull/21833/head
Matthew Hodgson 2016-03-16 23:35:01 +00:00
parent e7ec6166fa
commit 50e33d30b6
1 changed files with 6 additions and 1 deletions

View File

@ -455,11 +455,16 @@ module.exports = React.createClass({
},
_updateTabCompleteList: new rate_limited_func(function() {
var cli = MatrixClientPeg.get();
if (!this.state.room || !this.tabComplete) {
return;
}
var members = this.state.room.getJoinedMembers().filter(function(member) {
if (member.userId !== cli.credentials.userId) return true;
});
this.tabComplete.setCompletionList(
MemberEntry.fromMemberList(this.state.room.getJoinedMembers()).concat(
MemberEntry.fromMemberList(members).concat(
CommandEntry.fromCommands(SlashCommands.getCommandList())
)
);