|
|
@ -63,10 +63,11 @@ type Fileable interface { |
|
|
|
|
|
|
|
|
|
|
|
// BaseChat is base type for all chat config types.
|
|
|
|
// BaseChat is base type for all chat config types.
|
|
|
|
type BaseChat struct { |
|
|
|
type BaseChat struct { |
|
|
|
ChatID int // required
|
|
|
|
ChatID int // required
|
|
|
|
ChannelUsername string |
|
|
|
ChannelUsername string |
|
|
|
ReplyToMessageID int |
|
|
|
ReplyToMessageID int |
|
|
|
ReplyMarkup interface{} |
|
|
|
ReplyMarkup interface{} |
|
|
|
|
|
|
|
DisableNotification bool |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
// values returns url.Values representation of BaseChat
|
|
|
|
// values returns url.Values representation of BaseChat
|
|
|
@ -91,6 +92,8 @@ func (chat *BaseChat) values() (url.Values, error) { |
|
|
|
v.Add("reply_markup", string(data)) |
|
|
|
v.Add("reply_markup", string(data)) |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
v.Add("disable_notification", strconv.FormatBool(chat.DisableNotification)) |
|
|
|
|
|
|
|
|
|
|
|
return v, nil |
|
|
|
return v, nil |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
@ -135,6 +138,8 @@ func (file BaseFile) params() (map[string]string, error) { |
|
|
|
params["file_size"] = strconv.Itoa(file.FileSize) |
|
|
|
params["file_size"] = strconv.Itoa(file.FileSize) |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
params["disable_notification"] = strconv.FormatBool(file.DisableNotification) |
|
|
|
|
|
|
|
|
|
|
|
return params, nil |
|
|
|
return params, nil |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|