[telegram-desktop/f32] Backported upstream patches with different fixes.