Skip to content

Commit d50e778

Browse files
committed
Fix TopicTimer type in topic data
1 parent ef8c57f commit d50e778

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

pkg/discourse/topic.go

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ type TopicData struct {
5050
ChunkSize int `json:"chunk_size"`
5151
Bookmarked bool `json:"bookmarked"`
5252
Bookmarks []string `json:"bookmarks"`
53-
TopicTimer string `json:"topic_timer"`
53+
TopicTimer TopicTimer `json:"topic_timer"`
5454
MessageBusLastID int `json:"message_bus_last_id"`
5555
ParticipantCount int `json:"participant_count"`
5656
ShowReadIndicator bool `json:"show_read_indicator"`
@@ -153,6 +153,15 @@ type TopicAction struct {
153153
CanAct bool `json:"can_act"`
154154
}
155155

156+
type TopicTimer struct {
157+
ID int `json:"id"`
158+
ExecuteAt time.Time `json:"execute_at"`
159+
DurationMinutes int `json:"duration_minutes"`
160+
BasedOnLastPost bool `json:"based_on_last_post"`
161+
StatusType string `json:"status_type"`
162+
CategoryID int `json:"category_id"`
163+
}
164+
156165
func GetTopicByID(client *Client, id int) (response *TopicData, err error) {
157166
data, sendErr := client.Get(fmt.Sprintf("t/%d", id))
158167

0 commit comments

Comments
 (0)