diff --git a/data/core.telegram.org/method/contacts.search b/data/core.telegram.org/method/contacts.search new file mode 100644 index 0000000000..a777c70ba6 --- /dev/null +++ b/data/core.telegram.org/method/contacts.search @@ -0,0 +1,178 @@ + + + + + contacts.search + + + + + + + + + + + + + +
+ +
+
+
+ +

contacts.search

+ +

Returns users found by username substring.

+

+ +
+
contacts.found#b3134d9d my_results:Vector<Peer> results:Vector<Peer> chats:Vector<Chat> users:Vector<User> = contacts.Found;
+---functions---
+contacts.search#11f812d8 q:string limit:int = contacts.Found;

+

Parameters

+ + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
qstringTarget substring
limitintMaximum number of users to be returned
+

Result

+

contacts.Found

+

Possible errors

+ + + + + + + + + + + + + + + + + + + + +
CodeTypeDescription
400QUERY_TOO_SHORTThe query string is too short.
400SEARCH_QUERY_EMPTYThe search query is empty.
+

Notes

+

This method will exclude the current user's contacts from the search results. It is assumed that searches among the user's contacts can be handled locally by the client.

+ +
+ +
+
+ +
+ + + + + +