Link Search Menu Expand Document

Constructor: forumTopic

Back to constructors index

Represents a forum topic.

Attributes:

NameTypeRequiredDescription
myBoolOptionalWhether the topic was created by the current user
closedBoolOptionalWhether the topic is closed (no messages can be sent to it)
pinnedBoolOptionalWhether the topic is pinned
shortBoolOptionalWhether this constructor is a reduced version of the full topic information.
If set, only the my, closed, id, date, title, icon_color, icon_emoji_id and from_id parameters will contain valid information.
Reduced info is usually only returned in topic-related admin log events » and in the messages.channelMessages constructor: if needed, full information can be fetched using channels.getForumTopicsByID.
hiddenBoolOptionalWhether the topic is hidden (only valid for the “General” topic, id=1)
idintYesTopic ID
dateintYesTopic creation date
titlestringYesTopic title
icon_colorintYesIf no custom emoji icon is specified, specifies the color of the fallback topic icon (RGB), one of 0x6FB9F0, 0xFFD67E, 0xCB86DB, 0x8EEE98, 0xFF93B2, or 0xFB6F5F.
icon_emoji_idlongOptionalID of the custom emoji used as topic icon.
top_messageintYesID of the last message that was sent to this topic
read_inbox_max_idintYesPosition up to which all incoming messages are read.
read_outbox_max_idintYesPosition up to which all outgoing messages are read.
unread_countintYesNumber of unread messages
unread_mentions_countintYesNumber of unread mentions
unread_reactions_countintYesNumber of unread reactions to messages you sent
from_idPeerYesID of the peer that created the topic
notify_settingsPeerNotifySettingsYesNotification settings
draftDraftMessageOptionalMessage draft

Type: ForumTopic

Example:

$forumTopic = ['_' => 'forumTopic', 'my' => Bool, 'closed' => Bool, 'pinned' => Bool, 'short' => Bool, 'hidden' => Bool, 'id' => int, 'date' => int, 'title' => 'string', 'icon_color' => int, 'icon_emoji_id' => long, 'top_message' => int, 'read_inbox_max_id' => int, 'read_outbox_max_id' => int, 'unread_count' => int, 'unread_mentions_count' => int, 'unread_reactions_count' => int, 'from_id' => Peer, 'notify_settings' => PeerNotifySettings, 'draft' => DraftMessage];