remove unused parameter ChannelSettings.SpamAllowed
This commit is contained in:
parent
ebded3077b
commit
125e3ba0b3
@ -30,9 +30,8 @@ func main() {
|
|||||||
var client = v1.New("https://token.url", "cb8ccf05e38a47543ad8477d49bcba99be73bff503ea6")
|
var client = v1.New("https://token.url", "cb8ccf05e38a47543ad8477d49bcba99be73bff503ea6")
|
||||||
ch := Channel{
|
ch := Channel{
|
||||||
Type: "telegram",
|
Type: "telegram",
|
||||||
Name: "@my_shopping_bot"
|
Name: "@my_shopping_bot",
|
||||||
Settings: ChannelSettings{
|
Settings: ChannelSettings{
|
||||||
SpamAllowed: false,
|
|
||||||
Status: Status{
|
Status: Status{
|
||||||
Delivered: ChannelFeatureNone,
|
Delivered: ChannelFeatureNone,
|
||||||
Read: ChannelFeatureReceive,
|
Read: ChannelFeatureReceive,
|
||||||
|
@ -221,7 +221,6 @@ func (c *MgClient) TransportChannels(request Channels) ([]ChannelListItem, int,
|
|||||||
// Type: "telegram",
|
// Type: "telegram",
|
||||||
// Name: "@my_shopping_bot",
|
// Name: "@my_shopping_bot",
|
||||||
// Settings: ChannelSettings{
|
// Settings: ChannelSettings{
|
||||||
// SpamAllowed: false,
|
|
||||||
// Status: Status{
|
// Status: Status{
|
||||||
// Delivered: ChannelFeatureNone,
|
// Delivered: ChannelFeatureNone,
|
||||||
// Read: ChannelFeatureReceive,
|
// Read: ChannelFeatureReceive,
|
||||||
@ -282,7 +281,6 @@ func (c *MgClient) ActivateTransportChannel(request Channel) (ActivateResponse,
|
|||||||
// Type: "telegram",
|
// Type: "telegram",
|
||||||
// Name: "@my_shopping_bot",
|
// Name: "@my_shopping_bot",
|
||||||
// Settings: ChannelSettings{
|
// Settings: ChannelSettings{
|
||||||
// SpamAllowed: false,
|
|
||||||
// Status: Status{
|
// Status: Status{
|
||||||
// Delivered: ChannelFeatureNone,
|
// Delivered: ChannelFeatureNone,
|
||||||
// Read: ChannelFeatureReceive,
|
// Read: ChannelFeatureReceive,
|
||||||
|
@ -36,7 +36,6 @@ func templateChannel(t *testing.T) uint64 {
|
|||||||
Type: "telegram",
|
Type: "telegram",
|
||||||
Name: "@test_channel_templates",
|
Name: "@test_channel_templates",
|
||||||
Settings: ChannelSettings{
|
Settings: ChannelSettings{
|
||||||
SpamAllowed: false,
|
|
||||||
Status: Status{
|
Status: Status{
|
||||||
Delivered: ChannelFeatureBoth,
|
Delivered: ChannelFeatureBoth,
|
||||||
Read: ChannelFeatureBoth,
|
Read: ChannelFeatureBoth,
|
||||||
@ -108,7 +107,6 @@ func TestMgClient_ActivateTransportChannel(t *testing.T) {
|
|||||||
Type: "telegram",
|
Type: "telegram",
|
||||||
Name: "@my_shopping_bot",
|
Name: "@my_shopping_bot",
|
||||||
Settings: ChannelSettings{
|
Settings: ChannelSettings{
|
||||||
SpamAllowed: false,
|
|
||||||
Status: Status{
|
Status: Status{
|
||||||
Delivered: ChannelFeatureNone,
|
Delivered: ChannelFeatureNone,
|
||||||
Read: ChannelFeatureReceive,
|
Read: ChannelFeatureReceive,
|
||||||
@ -152,7 +150,6 @@ func TestMgClient_ActivateNewTransportChannel(t *testing.T) {
|
|||||||
Type: "telegram",
|
Type: "telegram",
|
||||||
Name: "@my_shopping_bot",
|
Name: "@my_shopping_bot",
|
||||||
Settings: ChannelSettings{
|
Settings: ChannelSettings{
|
||||||
SpamAllowed: false,
|
|
||||||
Status: Status{
|
Status: Status{
|
||||||
Delivered: ChannelFeatureNone,
|
Delivered: ChannelFeatureNone,
|
||||||
Read: ChannelFeatureBoth,
|
Read: ChannelFeatureBoth,
|
||||||
@ -207,7 +204,6 @@ func TestMgClient_UpdateTransportChannel(t *testing.T) {
|
|||||||
ID: channelID,
|
ID: channelID,
|
||||||
Name: "@my_shopping_bot_2",
|
Name: "@my_shopping_bot_2",
|
||||||
Settings: ChannelSettings{
|
Settings: ChannelSettings{
|
||||||
SpamAllowed: false,
|
|
||||||
Status: Status{
|
Status: Status{
|
||||||
Delivered: ChannelFeatureNone,
|
Delivered: ChannelFeatureNone,
|
||||||
Read: ChannelFeatureBoth,
|
Read: ChannelFeatureBoth,
|
||||||
|
@ -67,6 +67,7 @@ const (
|
|||||||
)
|
)
|
||||||
|
|
||||||
type ErrorType string
|
type ErrorType string
|
||||||
|
|
||||||
const (
|
const (
|
||||||
GeneralError ErrorType = "general"
|
GeneralError ErrorType = "general"
|
||||||
CustomerNotExistsError = "customer_not_exists"
|
CustomerNotExistsError = "customer_not_exists"
|
||||||
@ -95,7 +96,6 @@ type Channel struct {
|
|||||||
|
|
||||||
// ChannelSettings struct
|
// ChannelSettings struct
|
||||||
type ChannelSettings struct {
|
type ChannelSettings struct {
|
||||||
SpamAllowed bool `json:"spam_allowed"`
|
|
||||||
Status Status `json:"status"`
|
Status Status `json:"status"`
|
||||||
Text ChannelSettingsText `json:"text"`
|
Text ChannelSettingsText `json:"text"`
|
||||||
Product Product `json:"product"`
|
Product Product `json:"product"`
|
||||||
|
Loading…
Reference in New Issue
Block a user