aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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 {