Fix search
This commit is contained in:
parent
7c39436eda
commit
586706f02b
1 changed files with 3 additions and 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 {
|
||||
|
|
Loading…
Reference in a new issue