<metaproperty="description"content="Telegram allows mentioning other users in case of urgent duckling matters, and quickly navigating to those mentions in order to read them as swiftly as possible.">
<metaproperty="og:title"content="Mentions">
<metaproperty="og:image"content="">
<metaproperty="og:description"content="Telegram allows mentioning other users in case of urgent duckling matters, and quickly navigating to those mentions in order to read them as swiftly as possible.">
<p>Telegram allows mentioning other users in case of urgent duckling matters, and quickly navigating to those mentions in order to read them as swiftly as possible.</p>
<p>Mentions are implemented as <ahref="/api/entities">message entities</a>, passed to the <ahref="/method/messages.sendMessage">messages.sendMessage</a> method:</p>
<ul>
<li><ahref="/constructor/inputMessageEntityMentionName">inputMessageEntityMentionName</a> - Used when sending messages, allows mentioning a user <ahref="https://t.me/botfather">inline, even for users that don't have a @username</a></li>
<li><ahref="/constructor/messageEntityMentionName">messageEntityMentionName</a> - Incoming message counterpart of <ahref="/constructor/inputMessageEntityMentionName">inputMessageEntityMentionName</a></li>
<li><ahref="/constructor/messageEntityMention">messageEntityMention</a> - <ahref="https://t.me/botfather">@botfather</a> (this entity is generated automatically server-side for @usernames in messages, no need to provide it manually)</li>
</ul>
<p>Incoming <ahref="/constructor/message">messages</a> mentioning to the current user will have the <code>mentioned</code> flag set, and will contain one or more <ahref="/constructor/messageEntityMention">messageEntityMention</a> and <ahref="/constructor/messageEntityMentionName">messageEntityMentionName</a> constructors. </p>
<p>Graphical clients can show a list of mentionable users when the user starts entering an <code>@</code> in the text bar; for this purpose, the <ahref="/constructor/channelParticipantsMentions">channelParticipantsMentions</a> filter can be used in <ahref="/method/channels.getParticipants">channels.getParticipants</a>.<br>
This filter can be enhanced by providing an additional query string <code>q</code> (anything the user enters after <code>@</code>); it will also return non-participant users, in case of channel users commenting in <ahref="/api/discussion">post comment sections</a>. </p>
<p>Graphical clients are supposed to show a blue mention indicator next to the message counter of chats in the dialog list.<br>
The <ahref="/constructor/dialog">dialog</a> constructor contains an <code>unread_mentions_count</code> field to isolate chats with unread mentions; the actual mention counter should be shown inside of the chat itself, above an <code>@</code> button that can be used, by clicking multiple times, to navigate back (using <ahref="/method/messages.getUnreadMentions">messages.getUnreadMentions</a>) through the mention history. </p>
<p>When the last unread mention is read, or when long-clicking on the <code>@</code> button, all mentions for a chat should marked as read using <ahref="/method/messages.readMentions">messages.readMentions</a>.</p></div>
</div>
</div>
</div>
<divclass="footer_wrap">
<divclass="footer_columns_wrap footer_desktop">
<divclass="footer_column footer_column_telegram">
<h5>Telegram</h5>
<divclass="footer_telegram_description"></div>
Telegram is a cloud-based mobile and desktop messaging app with a focus on security and speed.