mirror of
https://github.com/chatmail/core.git
synced 2026-05-19 06:46:32 +03:00
WIP: api!: add LIMIT arg to get_chat_media
In Delta Chat desktop we show the 3 recently used WebXDC apps, which relies on `get_chat_media`, which is quite expensive. Hopefully adding `LIMIT 3` makes it faster. Marking this as a breaking change because it's breaking TypeScript-wise, but shouldn't be breaking behavior-wise, because not providing the argument in JSON-RPC should be equivalent to providing `null` (which gets converted to `None`). TODO: - [ ] Add to CFFI? - [ ] Docs. Both the core fn and the JSON-RPC.
This commit is contained in:
@@ -1016,6 +1016,7 @@ pub async fn cmdline(context: Context, line: &str, chat_id: &mut ChatId) -> Resu
|
||||
Viewtype::Image,
|
||||
Viewtype::Gif,
|
||||
Viewtype::Video,
|
||||
None,
|
||||
)
|
||||
.await?;
|
||||
println!("{} images or videos: ", images.len());
|
||||
|
||||
Reference in New Issue
Block a user