From 0d0d5e7473123d19a6ae92df660a6daac720b06e Mon Sep 17 00:00:00 2001 From: Demian Date: Mon, 4 Mar 2024 15:33:16 +0100 Subject: [PATCH] topic: rename IconCustomEmojiID to IconCustomEmoji --- topic.go | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/topic.go b/topic.go index f8848a9..4f6935d 100644 --- a/topic.go +++ b/topic.go @@ -6,10 +6,10 @@ import ( ) type Topic struct { - Name string `json:"name"` - IconColor int `json:"icon_color"` - IconCustomEmojiID string `json:"icon_custom_emoji_id"` - ThreadID int `json:"message_thread_id"` + Name string `json:"name"` + IconColor int `json:"icon_color"` + IconCustomEmoji string `json:"icon_custom_emoji_id"` + ThreadID int `json:"message_thread_id"` } // CreateTopic creates a topic in a forum supergroup chat. @@ -22,8 +22,8 @@ func (b *Bot) CreateTopic(chat *Chat, topic *Topic) (*Topic, error) { if topic.IconColor != 0 { params["icon_color"] = strconv.Itoa(topic.IconColor) } - if topic.IconCustomEmojiID != "" { - params["icon_custom_emoji_id"] = topic.IconCustomEmojiID + if topic.IconCustomEmoji != "" { + params["icon_custom_emoji_id"] = topic.IconCustomEmoji } data, err := b.Raw("createForumTopic", params) @@ -50,8 +50,8 @@ func (b *Bot) EditTopic(chat *Chat, topic *Topic) error { if topic.Name != "" { params["name"] = topic.Name } - if topic.IconCustomEmojiID != "" { - params["icon_custom_emoji_id"] = topic.IconCustomEmojiID + if topic.IconCustomEmoji != "" { + params["icon_custom_emoji_id"] = topic.IconCustomEmoji } _, err := b.Raw("editForumTopic", params)