Skip to content

Commit

Permalink
feat: GroupsGroup add Like
Browse files Browse the repository at this point in the history
  • Loading branch information
SevereCloud committed Jan 11, 2022
1 parent 350db94 commit a4673aa
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions object/groups.go
Original file line number Diff line number Diff line change
Expand Up @@ -217,13 +217,26 @@ type GroupsGroup struct {
PublicDateLabel string `json:"public_date_label,omitempty"`
AuthorID int `json:"author_id,omitempty"`
Phone string `json:"phone,omitempty"`
Like GroupsGroupLike `json:"like"`
}

// ToMention return mention.
func (group GroupsGroup) ToMention() string {
return fmt.Sprintf("[club%d|%s]", group.ID, group.Name)
}

// GroupsGroupLike struct.
type GroupsGroupLike struct {
IsLiked BaseBoolInt `json:"is_liked"`
Friends GroupsGroupLikeFriends `json:"friends"`
}

// GroupsGroupLikeFriends struct.
type GroupsGroupLikeFriends struct {
Count int `json:"count"`
Preview []int `json:"preview"`
}

// GroupsLiveCovers struct.
type GroupsLiveCovers struct {
IsEnabled BaseBoolInt `json:"is_enabled"`
Expand Down

0 comments on commit a4673aa

Please sign in to comment.