diff options
author | Alex Auvolat <alex@adnab.me> | 2020-03-09 18:05:53 +0100 |
---|---|---|
committer | Alex Auvolat <alex@adnab.me> | 2020-03-09 18:05:53 +0100 |
commit | 586706f02bfa7c41a5eec61c783c452350d8c6c1 (patch) | |
tree | 6ab80a01b7a0ede4c4a4901d717fbf370f40b075 | |
parent | 7c39436eda59efb033d172dfa03af3782f0acacf (diff) | |
download | easybridge-586706f02bfa7c41a5eec61c783c452350d8c6c1.tar.gz easybridge-586706f02bfa7c41a5eec61c783c452350d8c6c1.zip |
Fix search
-rw-r--r-- | server.go | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -275,13 +275,13 @@ func handleSystemMessage(mxid string, msg string) { case "search": account := findAccount(mxid, cmd[1]) if account != nil { - rep, err := account.Conn.SearchForUsers(cmd[2]) + rep, err := account.Conn.SearchForUsers(strings.Join(cmd[2:], " ")) if err != nil { ezbrSystemSendf(mxid, "Search error: %s", err) } else { ezbrSystemSendf(mxid, "%d users found", len(rep)) - for i, user := range rep { - ezbrSystemSendf(mxid, "- %s (%s)", i+1, user.DisplayName, user.ID) + for _, user := range rep { + ezbrSystemSendf(mxid, "- %s (%s)", user.DisplayName, user.ID) } } } else { |