Skip to content

Commit 0d0d5e7

Browse files
committed
topic: rename IconCustomEmojiID to IconCustomEmoji
1 parent e4f891b commit 0d0d5e7

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

topic.go

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,10 @@ import (
66
)
77

88
type Topic struct {
9-
Name string `json:"name"`
10-
IconColor int `json:"icon_color"`
11-
IconCustomEmojiID string `json:"icon_custom_emoji_id"`
12-
ThreadID int `json:"message_thread_id"`
9+
Name string `json:"name"`
10+
IconColor int `json:"icon_color"`
11+
IconCustomEmoji string `json:"icon_custom_emoji_id"`
12+
ThreadID int `json:"message_thread_id"`
1313
}
1414

1515
// CreateTopic creates a topic in a forum supergroup chat.
@@ -22,8 +22,8 @@ func (b *Bot) CreateTopic(chat *Chat, topic *Topic) (*Topic, error) {
2222
if topic.IconColor != 0 {
2323
params["icon_color"] = strconv.Itoa(topic.IconColor)
2424
}
25-
if topic.IconCustomEmojiID != "" {
26-
params["icon_custom_emoji_id"] = topic.IconCustomEmojiID
25+
if topic.IconCustomEmoji != "" {
26+
params["icon_custom_emoji_id"] = topic.IconCustomEmoji
2727
}
2828

2929
data, err := b.Raw("createForumTopic", params)
@@ -50,8 +50,8 @@ func (b *Bot) EditTopic(chat *Chat, topic *Topic) error {
5050
if topic.Name != "" {
5151
params["name"] = topic.Name
5252
}
53-
if topic.IconCustomEmojiID != "" {
54-
params["icon_custom_emoji_id"] = topic.IconCustomEmojiID
53+
if topic.IconCustomEmoji != "" {
54+
params["icon_custom_emoji_id"] = topic.IconCustomEmoji
5555
}
5656

5757
_, err := b.Raw("editForumTopic", params)

0 commit comments

Comments
 (0)