Skip to content

Instantly share code, notes, and snippets.

@vdmit
Last active June 17, 2017 10:57
Show Gist options
  • Save vdmit/f490be029544d728657ac6f2e53fb61c to your computer and use it in GitHub Desktop.
Save vdmit/f490be029544d728657ac6f2e53fb61c to your computer and use it in GitHub Desktop.
Dirty patch to disable Telegram web page preview
diff --git a/Telegram/SourceFiles/history/history_message.cpp b/Telegram/SourceFiles/history/history_message.cpp
index a318520..45ca737 100644
--- a/Telegram/SourceFiles/history/history_message.cpp
+++ b/Telegram/SourceFiles/history/history_message.cpp
@@ -709,6 +709,7 @@ void HistoryMessage::initMedia(const MTPMessageMedia *media) {
}
} break;
case mtpc_messageMediaWebPage: {
+ break; // nopreview fix
auto &d = media->c_messageMediaWebPage().vwebpage;
switch (d.type()) {
case mtpc_webPageEmpty: break;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment