globally search for media (#3528)

* get_chat_media() from any chat similar to search_msgs()

* do not return hidden media

this fixes the issue that drafts
and other hidden messages pop up in the gallery.

* add a test for get_chat_media()

* use None instead of ChatId::new(0)

* clarify scope of 'any' in get_chat_media()

* adapt json rpc to changed get_chat_media()

* jsonrpc: chat_get_media turn chat_id into option
and also still allow `0` for dev convenience
(though I'm not totally sure if thats the right decision)

* cargo fmt

Co-authored-by: Simon Laux <mobile.info@simonlaux.de>
This commit is contained in:
bjoern
2022-08-18 10:27:36 +02:00
committed by GitHub
parent d297aa70bf
commit fdf91b772e
8 changed files with 188 additions and 31 deletions

View File

@@ -19,6 +19,7 @@
### Changes
- refactorings #3545 #3551
- use [pathlib](https://docs.python.org/3/library/pathlib.html) in provider update script #3543
- `dc_get_chat_media()` can return media globally #3528
### Fixes
- improved error handling for account setup from qrcode #3474