Skip to content

Commit

Permalink
fix: better type for channel last message
Browse files Browse the repository at this point in the history
  • Loading branch information
tomMoulard committed Apr 25, 2024
1 parent 1eaece2 commit c1e5098
Showing 1 changed file with 24 additions and 22 deletions.
46 changes: 24 additions & 22 deletions pkg/channel/types.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
package channel

import "github.com/tomMoulard/sendbird-go/pkg/message"

const (
DistincModeAll string = "all"
DistincModeDistinct string = "distinct"
Expand Down Expand Up @@ -62,26 +64,26 @@ type Operator struct {

// ChannelResource is the resource of a channel.
type ChannelResource struct {
Name string `json:"name"`
ChannelURL string `json:"channel_url"`
CoverURL string `json:"cover_url"`
CustomType string `json:"custom_type"`
UnreadMessageCount int `json:"unread_message_count"`
Data string `json:"data"`
IsDistinct bool `json:"is_distinct"`
IsPublic bool `json:"is_public"`
IsSuper bool `json:"is_super"`
IsEphemeral bool `json:"is_ephemeral"`
IsAccessCodeRequired bool `json:"is_access_code_required"`
MemberCount int `json:"member_count"`
JoinedMemberCount int `json:"joined_member_count"`
UnreadMentionCount int `json:"unread_mention_count"`
CreatedBy CreatedBy `json:"created_by"`
Members []Member `json:"members"`
Operators []Operator `json:"operators"`
LastMessage interface{} `json:"last_message"`
MessageSurvivalSeconds int `json:"message_survival_seconds"`
MaxLengthMessage int `json:"max_length_message"`
CreatedAt int `json:"created_at"`
Freeze bool `json:"freeze"`
Name string `json:"name"`
ChannelURL string `json:"channel_url"`
CoverURL string `json:"cover_url"`
CustomType string `json:"custom_type"`
UnreadMessageCount int `json:"unread_message_count"`
Data string `json:"data"`
IsDistinct bool `json:"is_distinct"`
IsPublic bool `json:"is_public"`
IsSuper bool `json:"is_super"`
IsEphemeral bool `json:"is_ephemeral"`
IsAccessCodeRequired bool `json:"is_access_code_required"`
MemberCount int `json:"member_count"`
JoinedMemberCount int `json:"joined_member_count"`
UnreadMentionCount int `json:"unread_mention_count"`
CreatedBy CreatedBy `json:"created_by"`
Members []Member `json:"members"`
Operators []Operator `json:"operators"`
LastMessage message.MessageResource `json:"last_message"`
MessageSurvivalSeconds int `json:"message_survival_seconds"`
MaxLengthMessage int `json:"max_length_message"`
CreatedAt int `json:"created_at"`
Freeze bool `json:"freeze"`
}

0 comments on commit c1e5098

Please sign in to comment.