2024-09-18 00:21:45 +02:00
<!DOCTYPE html>
< html class = "" >
< head >
< meta charset = "utf-8" >
< title > Fact-checks< / title >
< meta name = "viewport" content = "width=device-width, initial-scale=1.0" >
< meta property = "description" content = "Telegram clients support displaying fact-checks added to messages by independent fact-checkers." >
< meta property = "og:title" content = "Fact-checks" >
< meta property = "og:image" content = "" >
< meta property = "og:description" content = "Telegram clients support displaying fact-checks added to messages by independent fact-checkers." >
< link rel = "icon" type = "image/svg+xml" href = "/img/website_icon.svg?4" >
< link rel = "apple-touch-icon" sizes = "180x180" href = "/img/apple-touch-icon.png" >
< link rel = "icon" type = "image/png" sizes = "32x32" href = "/img/favicon-32x32.png" >
< link rel = "icon" type = "image/png" sizes = "16x16" href = "/img/favicon-16x16.png" >
< link rel = "alternate icon" href = "/img/favicon.ico" type = "image/x-icon" / >
< link href = "/css/bootstrap.min.css?3" rel = "stylesheet" >
2024-09-23 20:02:35 +02:00
< link href = "/css/telegram.css?241" rel = "stylesheet" media = "screen" >
2024-09-18 00:21:45 +02:00
< style >
< / style >
< / head >
< body class = "preload" >
< div class = "dev_page_wrap" >
< div class = "dev_page_head navbar navbar-static-top navbar-tg" >
< div class = "navbar-inner" >
< div class = "container clearfix" >
< ul class = "nav navbar-nav navbar-right hidden-xs" > < li class = "navbar-twitter" > < a href = "https://twitter.com/telegram" target = "_blank" data-track = "Follow/Twitter" onclick = "trackDlClick(this, event)" > < i class = "icon icon-twitter" > < / i > < span > Twitter< / span > < / a > < / li > < / ul >
< ul class = "nav navbar-nav" >
< li > < a href = "//telegram.org/" > Home< / a > < / li >
< li class = "hidden-xs" > < a href = "//telegram.org/faq" > FAQ< / a > < / li >
< li class = "hidden-xs" > < a href = "//telegram.org/apps" > Apps< / a > < / li >
< li class = "active" > < a href = "/api" > API< / a > < / li >
< li class = "" > < a href = "/mtproto" > Protocol< / a > < / li >
< li class = "" > < a href = "/schema" > Schema< / a > < / li >
< / ul >
< / div >
< / div >
< / div >
< div class = "container clearfix" >
< div class = "dev_page" >
< div id = "dev_page_content_wrap" class = " " >
< div class = "dev_page_bread_crumbs" > < ul class = "breadcrumb clearfix" > < li > < a href = "/api" > API< / a > < / li > < i class = "icon icon-breadcrumb-divider" > < / i > < li > < a href = "/api/factcheck" > Fact-checks< / a > < / li > < / ul > < / div >
< h1 id = "dev_page_title" > Fact-checks< / h1 >
< div id = "dev_page_content" > <!-- scroll_nav -->
< p > Telegram clients support displaying fact-checks added to messages by independent fact-checkers.< / p >
< h3 > < a class = "anchor" href = "#displaying-fact-checks" id = "displaying-fact-checks" name = "displaying-fact-checks" > < i class = "anchor-icon" > < / i > < / a > Displaying fact-checks< / h3 >
< pre > < code > < a href = '/constructor/factCheck' > factCheck< / a > #b89bfccf flags:< a href = '/type/%23' > #< / a > need_check:flags.0?< a href = '/constructor/true' > true< / a > country:flags.1?< a href = '/type/string' > string< / a > text:flags.1?< a href = '/type/TextWithEntities' > TextWithEntities< / a > hash:< a href = '/type/long' > long< / a > = < a href = '/type/FactCheck' > FactCheck< / a > ;
< a href = '/constructor/message' > message< / a > #94345242 flags:< a href = '/type/%23' > #< / a > out:flags.1?< a href = '/constructor/true' > true< / a > mentioned:flags.4?< a href = '/constructor/true' > true< / a > media_unread:flags.5?< a href = '/constructor/true' > true< / a > silent:flags.13?< a href = '/constructor/true' > true< / a > post:flags.14?< a href = '/constructor/true' > true< / a > from_scheduled:flags.18?< a href = '/constructor/true' > true< / a > legacy:flags.19?< a href = '/constructor/true' > true< / a > edit_hide:flags.21?< a href = '/constructor/true' > true< / a > pinned:flags.24?< a href = '/constructor/true' > true< / a > noforwards:flags.26?< a href = '/constructor/true' > true< / a > invert_media:flags.27?< a href = '/constructor/true' > true< / a > flags2:< a href = '/type/%23' > #< / a > offline:flags2.1?< a href = '/constructor/true' > true< / a > id:< a href = '/type/int' > int< / a > from_id:flags.8?< a href = '/type/Peer' > Peer< / a > from_boosts_applied:flags.29?< a href = '/type/int' > int< / a > peer_id:< a href = '/type/Peer' > Peer< / a > saved_peer_id:flags.28?< a href = '/type/Peer' > Peer< / a > fwd_from:flags.2?< a href = '/type/MessageFwdHeader' > MessageFwdHeader< / a > via_bot_id:flags.11?< a href = '/type/long' > long< / a > via_business_bot_id:flags2.0?< a href = '/type/long' > long< / a > reply_to:flags.3?< a href = '/type/MessageReplyHeader' > MessageReplyHeader< / a > date:< a href = '/type/int' > int< / a > message:< a href = '/type/string' > string< / a > media:flags.9?< a href = '/type/MessageMedia' > MessageMedia< / a > reply_markup:flags.6?< a href = '/type/ReplyMarkup' > ReplyMarkup< / a > entities:flags.7?< a href = '/type/Vector%20t' > Vector< / a > < < a href = '/type/MessageEntity' > MessageEntity< / a > > views:flags.10?< a href = '/type/int' > int< / a > forwards:flags.10?< a href = '/type/int' > int< / a > replies:flags.23?< a href = '/type/MessageReplies' > MessageReplies< / a > edit_date:flags.15?< a href = '/type/int' > int< / a > post_author:flags.16?< a href = '/type/string' > string< / a > grouped_id:flags.17?< a href = '/type/long' > long< / a > reactions:flags.20?< a href = '/type/MessageReactions' > MessageReactions< / a > restriction_reason:flags.22?< a href = '/type/Vector%20t' > Vector< / a > < < a href = '/type/RestrictionReason' > RestrictionReason< / a > > ttl_period:flags.25?< a href = '/type/int' > int< / a > quick_reply_shortcut_id:flags.30?< a href = '/type/int' > int< / a > effect:flags2.2?< a href = '/type/long' > long< / a > factcheck:flags2.3?< a href = '/type/FactCheck' > FactCheck< / a > = < a href = '/type/Message' > Message< / a > ;
---functions---
< a href = '/method/messages.getFactCheck' > messages.getFactCheck< / a > #b9cdc5ee peer:< a href = '/type/InputPeer' > InputPeer< / a > msg_id:< a href = '/type/Vector%20t' > Vector< / a > < < a href = '/type/int' > int< / a > > = < a href = '/type/Vector%20t' > Vector< / a > < < a href = '/type/FactCheck' > FactCheck< / a > > ;< / code > < / pre >
< p > Fact-checks are represented by < a href = "/constructor/factCheck" > factCheck< / a > constructors, contained in the < code > factcheck< / code > field of the < a href = "/constructor/message" > message< / a > constructor. < / p >
< p > Sometimes (i.e. for performance reasons), even if a message < em > does< / em > have a factcheck, it may not be returned in the < code > text< / code > field of the < a href = "/constructor/factCheck" > factCheck< / a > associated to the < a href = "/constructor/message" > message< / a > : in this case, the < a href = "/constructor/factCheck" > factCheck< / a > .< code > need_check< / code > flag will be set and the < code > country< / code > /< code > text< / code > flags won't be set, and the client should request the full text of the fact check manually using < a href = "/method/messages.getFactCheck" > messages.getFactCheck< / a > when the message scrolls into view. < / p >
< p > These manual requests should be bundled: every time a new ID is added to the queue of factchecks to manually fetch, postpone fetching by 80ms. < / p >
< p > Store all < em > full< / em > (i.e. those with a < code > country< / code > /< code > text< / code > ) factchecks in a local database, using the < code > hash< / code > as key.< br >
Avoid fetching < em > min< / em > (i.e. those where < code > need_check< / code > is set) factchecks if a factcheck with the same < code > hash< / code > is already cached in the local database. < / p >
< p > Example implementation: < a href = "https://github.com/DrKLO/Telegram/blob/5fa5549a4a7f48476be29cc0facf68990ea10f62/TMessagesProj/src/main/java/org/telegram/messenger/FactCheckController.java" > android< / a > .< / p >
< h3 > < a class = "anchor" href = "#editing-fact-checks" id = "editing-fact-checks" name = "editing-fact-checks" > < i class = "anchor-icon" > < / i > < / a > Editing fact-checks< / h3 >
< pre > < code > < a href = '/constructor/factCheck' > factCheck< / a > #b89bfccf flags:< a href = '/type/%23' > #< / a > need_check:flags.0?< a href = '/constructor/true' > true< / a > country:flags.1?< a href = '/type/string' > string< / a > text:flags.1?< a href = '/type/TextWithEntities' > TextWithEntities< / a > hash:< a href = '/type/long' > long< / a > = < a href = '/type/FactCheck' > FactCheck< / a > ;
---functions---
< a href = '/method/messages.editFactCheck' > messages.editFactCheck< / a > #0589ee75 peer:< a href = '/type/InputPeer' > InputPeer< / a > msg_id:< a href = '/type/int' > int< / a > text:< a href = '/type/TextWithEntities' > TextWithEntities< / a > = < a href = '/type/Updates' > Updates< / a > ;
< a href = '/method/messages.deleteFactCheck' > messages.deleteFactCheck< / a > #d1da940c peer:< a href = '/type/InputPeer' > InputPeer< / a > msg_id:< a href = '/type/int' > int< / a > = < a href = '/type/Updates' > Updates< / a > ;< / code > < / pre >
< p > Fact-checks may be created, deleted and edited by independent fact-checkers using < a href = "/method/messages.editFactCheck" > messages.editFactCheck< / a > and < a href = "/method/messages.deleteFactCheck" > messages.deleteFactCheck< / a > . < / p >
< p > Those methods can be used by independent fact-checkers, which will have the < a href = "/api/config#can-edit-factcheck" > appConfig.can_edit_factcheck< / a > configuration flag set to < code > true< / code > . < / p >
< p > If the flag mentioned above is set to < code > true< / code > , the maximum UTF-8 length for a fact check will be specified in the < a href = "/api/config#factcheck-length-limit" > appConfig.factcheck_length_limit< / a > field.< / p > < / div >
< / div >
< / div >
< / div >
< div class = "footer_wrap" >
< div class = "footer_columns_wrap footer_desktop" >
< div class = "footer_column footer_column_telegram" >
< h5 > Telegram< / h5 >
< div class = "footer_telegram_description" > < / div >
Telegram is a cloud-based mobile and desktop messaging app with a focus on security and speed.
< / div >
< div class = "footer_column" >
< h5 > < a href = "//telegram.org/faq" > About< / a > < / h5 >
< ul >
< li > < a href = "//telegram.org/faq" > FAQ< / a > < / li >
< li > < a href = "//telegram.org/privacy" > Privacy< / a > < / li >
< li > < a href = "//telegram.org/press" > Press< / a > < / li >
< / ul >
< / div >
< div class = "footer_column" >
< h5 > < a href = "//telegram.org/apps#mobile-apps" > Mobile Apps< / a > < / h5 >
< ul >
< li > < a href = "//telegram.org/dl/ios" > iPhone/iPad< / a > < / li >
< li > < a href = "//telegram.org/android" > Android< / a > < / li >
< li > < a href = "//telegram.org/dl/web" > Mobile Web< / a > < / li >
< / ul >
< / div >
< div class = "footer_column" >
< h5 > < a href = "//telegram.org/apps#desktop-apps" > Desktop Apps< / a > < / h5 >
< ul >
< li > < a href = "//desktop.telegram.org/" > PC/Mac/Linux< / a > < / li >
< li > < a href = "//macos.telegram.org/" > macOS< / a > < / li >
< li > < a href = "//telegram.org/dl/web" > Web-browser< / a > < / li >
< / ul >
< / div >
< div class = "footer_column footer_column_platform" >
< h5 > < a href = "/" > Platform< / a > < / h5 >
< ul >
< li > < a href = "/api" > API< / a > < / li >
< li > < a href = "//translations.telegram.org/" > Translations< / a > < / li >
< li > < a href = "//instantview.telegram.org/" > Instant View< / a > < / li >
< / ul >
< / div >
< / div >
< div class = "footer_columns_wrap footer_mobile" >
< div class = "footer_column" >
< h5 > < a href = "//telegram.org/faq" > About< / a > < / h5 >
< / div >
< div class = "footer_column" >
< h5 > < a href = "//telegram.org/blog" > Blog< / a > < / h5 >
< / div >
< div class = "footer_column" >
< h5 > < a href = "//telegram.org/apps" > Apps< / a > < / h5 >
< / div >
< div class = "footer_column" >
< h5 > < a href = "/" > Platform< / a > < / h5 >
< / div >
< div class = "footer_column" >
< h5 > < a href = "//telegram.org/press" > Press< / a > < / h5 >
< / div >
< / div >
< / div >
< / div >
< script src = "/js/main.js?47" > < / script >
< script src = "/js/jquery.min.js?1" > < / script >
< script src = "/js/bootstrap.min.js?1" > < / script >
< script > w i n d o w . i n i t D e v P a g e N a v & & i n i t D e v P a g e N a v ( ) ;
backToTopInit("Go up");
removePreloadInit();
< / script >
< / body >
< / html >