message_fetch: Add include_anchor parameter.

Signed-off-by: Anders Kaseorg <anders@zulip.com>
This commit is contained in:
Anders Kaseorg
2022-11-10 18:32:09 -08:00
committed by Tim Abbott
parent dae4633745
commit ee2cb855f0
8 changed files with 68 additions and 9 deletions

View File

@@ -1044,12 +1044,14 @@ Output:
num_before: int = 100,
num_after: int = 100,
use_first_unread_anchor: bool = False,
include_anchor: bool = True,
) -> Dict[str, List[Dict[str, Any]]]:
post_params = {
"anchor": anchor,
"num_before": num_before,
"num_after": num_after,
"use_first_unread_anchor": orjson.dumps(use_first_unread_anchor).decode(),
"include_anchor": orjson.dumps(include_anchor).decode(),
}
result = self.client_get("/json/messages", dict(post_params))
data = result.json()