aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlex Auvolat <alex@adnab.me>2020-03-09 18:05:53 +0100
committerAlex Auvolat <alex@adnab.me>2020-03-09 18:05:53 +0100
commit586706f02bfa7c41a5eec61c783c452350d8c6c1 (patch)
tree6ab80a01b7a0ede4c4a4901d717fbf370f40b075
parent7c39436eda59efb033d172dfa03af3782f0acacf (diff)
downloadeasybridge-586706f02bfa7c41a5eec61c783c452350d8c6c1.tar.gz
easybridge-586706f02bfa7c41a5eec61c783c452350d8c6c1.zip
Fix search
-rw-r--r--server.go6
1 files changed, 3 insertions, 3 deletions
diff --git a/server.go b/server.go
index 84b1893..b982e15 100644
--- a/server.go
+++ b/server.go
@@ -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 {