Skip to content

Commit 9b9afb1

Browse files
wolveixjomei
authored andcommitted
Support custom emoji
1 parent f2cb9bd commit 9b9afb1

File tree

1 file changed

+11
-4
lines changed

1 file changed

+11
-4
lines changed

object.go

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -161,10 +161,11 @@ type FileObject struct {
161161
}
162162

163163
type Icon struct {
164-
Type FileType `json:"type"`
165-
Emoji *Emoji `json:"emoji,omitempty"`
166-
File *FileObject `json:"file,omitempty"`
167-
External *FileObject `json:"external,omitempty"`
164+
Type FileType `json:"type"`
165+
Emoji *Emoji `json:"emoji,omitempty"`
166+
CustomEmoji *CustomEmoji `json:"custom_emoji,omitempty"`
167+
File *FileObject `json:"file,omitempty"`
168+
External *FileObject `json:"external,omitempty"`
168169
}
169170

170171
// GetURL returns the external or internal URL depending on the image type.
@@ -180,6 +181,12 @@ func (i Icon) GetURL() string {
180181

181182
type Emoji string
182183

184+
type CustomEmoji struct {
185+
ID string `json:"id"`
186+
Name string `json:"name"`
187+
URL string `json:"url"`
188+
}
189+
183190
type PropertyID string
184191

185192
func (pID PropertyID) String() string {

0 commit comments

Comments
 (0)