1
0
mirror of https://github.com/matrix-org/matrix-react-sdk.git synced 2025-07-24 06:02:08 +03:00

never try to tab-complete yourself, doofus

This commit is contained in:
Matthew Hodgson
2016-03-16 23:35:01 +00:00
parent e7ec6166fa
commit 50e33d30b6

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())
)
);