mirror of
				https://github.com/zulip/zulip.git
				synced 2025-11-03 21:43:21 +00:00 
			
		
		
		
	narrow: Support string and integer encoding of "id" operator.
Expands support for the message ID operand for id" operator to be either a string or an integer. Previously, this operand was always validated as a string.
This commit is contained in:
		
				
					committed by
					
						
						Tim Abbott
					
				
			
			
				
	
			
			
			
						parent
						
							211934a9d9
						
					
				
				
					commit
					3255281a83
				
			@@ -20,6 +20,16 @@ format used by the Zulip server that they are interacting with.
 | 
			
		||||
 | 
			
		||||
## Changes in Zulip 8.0
 | 
			
		||||
 | 
			
		||||
**Feature level 194**
 | 
			
		||||
 | 
			
		||||
* [`GET /messages`](/api/get-messages),
 | 
			
		||||
  [`GET /messages/matches_narrow`](/api/check-messages-match-narrow),
 | 
			
		||||
  [`POST /message/flags/narrow`](/api/update-message-flags-for-narrow),
 | 
			
		||||
  [`POST /register`](/api/register-queue):
 | 
			
		||||
  For [search/narrow filters](/api/construct-narrow) with the `id`
 | 
			
		||||
  operator, added support for encoding the message ID operand as either
 | 
			
		||||
  a string or an integer. Previously, only string encoding was supported.
 | 
			
		||||
 | 
			
		||||
**Feature level 193**
 | 
			
		||||
 | 
			
		||||
* [`POST /messages/{message_id}/reactions`](/api/add-reaction),
 | 
			
		||||
 
 | 
			
		||||
@@ -65,12 +65,33 @@ filters did.
 | 
			
		||||
 | 
			
		||||
## Narrows that use IDs
 | 
			
		||||
 | 
			
		||||
### Message IDs
 | 
			
		||||
 | 
			
		||||
The `near` and `id` operators, documented in the help center, use message
 | 
			
		||||
IDs for their operands.
 | 
			
		||||
 | 
			
		||||
* `near:12345`: Search messages around the message with ID `12345`.
 | 
			
		||||
* `id:12345`: Search for only message with ID `12345`.
 | 
			
		||||
 | 
			
		||||
The message ID operand for the `id` operator may be encoded as either a
 | 
			
		||||
number or a string. The message ID operand for the `near` operator must
 | 
			
		||||
be encoded as a string.
 | 
			
		||||
 | 
			
		||||
**Changes**: Prior to Zulip 8.0 (feature level 194), the message ID
 | 
			
		||||
operand for the `id` operator needed to be encoded as a string.
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
```json
 | 
			
		||||
[
 | 
			
		||||
    {
 | 
			
		||||
        "operator": "id",
 | 
			
		||||
        "operand": 12345
 | 
			
		||||
    }
 | 
			
		||||
]
 | 
			
		||||
```
 | 
			
		||||
 | 
			
		||||
### Stream and user IDs
 | 
			
		||||
 | 
			
		||||
There are a few additional narrow/search options (new in Zulip 2.1)
 | 
			
		||||
that use either stream IDs or user IDs that are not documented in the
 | 
			
		||||
help center because they are primarily useful to API clients:
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user