Commit Graph

5 Commits

Author SHA1 Message Date
Liru Færs
0f98d76683
Fix DialogActionManager::send_dialog_action in secret chats (#2756)
* Fix DialogActionManager::send_dialog_action in secret chats 

The code in `DialogActionManager::send_dialog_action` made the assumption that since we'd either have early returned or `DialogManager::have_input_peer` would be true, and therefore the else block of the conditional, which intended to set input_peer, should have done so successfully.

However, `DialogManager::have_input_peer` will return true for secret chats when `contacts_manager->have_input_encrypted_peer`
And `DialogManager::get_input_peer` will return a `nullptr` for secret chats by design (I believe this is because they operate using structures that are currently incompatible)

This should fix the root of a crash that happens when typing in or sending messages to secret chats on:
Telegram X 0.26.4.1678-arm64-v8a (99b10675)
TDLib: 1.8.23 (tdlib/td@4bafdc2)

* Move CHECK below SecretChat case instead per feedback
2024-01-15 01:02:56 +03:00
levlam
82e59914cd Minor improvements. 2024-01-08 15:42:21 +03:00
levlam
dc3929fede Remove is_unsent_animated_emoji_click proxy function. 2024-01-07 01:08:41 +03:00
levlam
b684039566 Move some methods to DialogActionManager. 2024-01-07 00:46:36 +03:00
levlam
4bc9f8d72e Add DialogActionManager. 2024-01-06 22:56:28 +03:00