Return subscription from channel-preview [skip-tests]
This commit is contained in:
@@ -24,6 +24,8 @@ type ChannelPreview struct {
|
||||
DisplayName string `json:"display_name"`
|
||||
DescriptionName *string `json:"description_name"`
|
||||
MessagesSent int `json:"messages_sent"`
|
||||
|
||||
Subscription *Subscription `json:"subscription"`
|
||||
}
|
||||
|
||||
func (c Channel) WithSubscription(sub *Subscription) ChannelWithSubscription {
|
||||
@@ -33,7 +35,7 @@ func (c Channel) WithSubscription(sub *Subscription) ChannelWithSubscription {
|
||||
}
|
||||
}
|
||||
|
||||
func (c Channel) Preview() ChannelPreview {
|
||||
func (c Channel) Preview(sub *Subscription) ChannelPreview {
|
||||
return ChannelPreview{
|
||||
ChannelID: c.ChannelID,
|
||||
OwnerUserID: c.OwnerUserID,
|
||||
@@ -41,5 +43,6 @@ func (c Channel) Preview() ChannelPreview {
|
||||
DisplayName: c.DisplayName,
|
||||
DescriptionName: c.DescriptionName,
|
||||
MessagesSent: c.MessagesSent,
|
||||
Subscription: sub,
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user