mirror of https://github.com/zulip/zulip.git
docs: Further expand documentation on using IDs in narrows.
These docs had a number of typos, and also didn't fully clarify how to handle lists of integers for `pm-with`. Also makes some tweaks to the user docs to make this clearer as well. Fixes #13167.
This commit is contained in:
parent
0a426c6a44
commit
6f6c761d80
|
@ -42,23 +42,31 @@ search](/help/search-for-messages). There are a few additional
|
||||||
options, new in Zulip 2.1, that we don't document there because they
|
options, new in Zulip 2.1, that we don't document there because they
|
||||||
are primarily useful to API clients:
|
are primarily useful to API clients:
|
||||||
|
|
||||||
* `pm-with:1234`: Search 1-on-1 messages between you and user ID `1234`.
|
* `sender:1234`: Search messages sent by user ID `1234`.
|
||||||
* `sender:1234`: Search 1-on-1 messages sent by user ID `1234`.
|
* `stream:1234`: Search messages sent to the stream with ID `123`.
|
||||||
* `stream:1234`: Search 1-on-1 messages sent to the stream with ID `123`.
|
* `pm-with:1234`: Search the private message conversation between
|
||||||
* `group-pm-with:1234`: Search private messages including the user with ID `1234`.
|
you and user ID `1234`.
|
||||||
|
* `pm-with:1234,5678`: Search the private message conversation between
|
||||||
|
you, user ID `1234`, and user ID `5678`.
|
||||||
|
* `group-pm-with:1234`: Search all (group) private messages that
|
||||||
|
include user ID `1234`.
|
||||||
|
* `pm-with:1234,5678`: Search all (group) private messages that
|
||||||
|
include user ID `1234` and user ID `5678`.
|
||||||
|
|
||||||
For example, to query messages sent by a user 1234 to stream 123, the
|
The operands for these search options must be encoded either as an
|
||||||
correct JSON-encoded query is:
|
integer ID or a JSON list of integer IDs. For example, to query
|
||||||
|
messages sent by a user 1234 to a PM thread with yourself, user 1234,
|
||||||
|
and user 5678, the correct JSON-encoded query is:
|
||||||
|
|
||||||
```json
|
```json
|
||||||
[
|
[
|
||||||
{
|
{
|
||||||
"operator": "sender",
|
"operator": "pm-with",
|
||||||
"operand": 1234
|
"operand": [1234, 5678]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"operator": "stream",
|
"operator": "sender",
|
||||||
"operand": 123
|
"operand": 1234
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
```
|
```
|
||||||
|
|
|
@ -26,9 +26,7 @@ Here is the **full list of search operators**.
|
||||||
* `stream:design`: Search within the stream `#design`.
|
* `stream:design`: Search within the stream `#design`.
|
||||||
* `stream:design topic:emoji+picker`: Search within the topic `emoji picker`.
|
* `stream:design topic:emoji+picker`: Search within the topic `emoji picker`.
|
||||||
* `is:private`: Search all your private messages.
|
* `is:private`: Search all your private messages.
|
||||||
* `pm-with:ada@zulip.com`: Search 1-on-1 messages with Ada.
|
* `pm-with:ada@zulip.com`: Search 1-on-1 private messages between you and Ada.
|
||||||
* `group-pm-with:ada@zulip.com`: Search group private messages that
|
|
||||||
include Ada.
|
|
||||||
* `sender:ada@zulip.com`: Search messages sent by Ada.
|
* `sender:ada@zulip.com`: Search messages sent by Ada.
|
||||||
* `sender:me`: Search sent messages.
|
* `sender:me`: Search sent messages.
|
||||||
* `near:12345`: Show messages around the message with ID `12345`.
|
* `near:12345`: Show messages around the message with ID `12345`.
|
||||||
|
@ -43,6 +41,10 @@ Here is the **full list of search operators**.
|
||||||
* `has:link`
|
* `has:link`
|
||||||
* `has:image`
|
* `has:image`
|
||||||
* `has:attachment`
|
* `has:attachment`
|
||||||
|
* `pm-with:ada@zulip.com,bob@zulip.com`: Search private message conversation
|
||||||
|
between you, Bob, and Ada.
|
||||||
|
* `group-pm-with:ada@zulip.com,bob@zulip.com`: Search all group
|
||||||
|
private messages that include Ada and Bob.
|
||||||
|
|
||||||
## Words and phrases
|
## Words and phrases
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue