summary refs log tree commit diff stats
diff options
context:
space:
mode:
-rw-r--r--query.go6
1 files changed, 5 insertions, 1 deletions
diff --git a/query.go b/query.go
index 17d7a36..e74e109 100644
--- a/query.go
+++ b/query.go
@@ -68,15 +68,19 @@ func apiEndpointQuery(w http.ResponseWriter, r *http.Request) error {
 	// something went very wrong.
 	switch endpoint {
 	case "users":
+		var out2 []string
 		if query != "" {
 			out, err = twtxtCache.QueryUser(query)
 			apiErrCheck(err, r)
 		}
 		if urls != "" {
-			out, err = twtxtCache.QueryUser(urls)
+			out2, err = twtxtCache.QueryUser(urls)
 			apiErrCheck(err, r)
 		}
 
+		out = append(out, out2...)
+		out = uniq(out)
+
 	case "mentions":
 		if urls == "" {
 			return fmt.Errorf("missing URL in mention query")