(cherry picked from commit 3cbfb8fd0861fda50ec900a3161fe2a371a5068c)
https://github.com/DrKLO/Telegram/pull/1561