File tree 1 file changed +8
-5
lines changed
1 file changed +8
-5
lines changed Original file line number Diff line number Diff line change @@ -166,13 +166,16 @@ type BaseEdit struct {
166
166
func (edit BaseEdit ) values () (url.Values , error ) {
167
167
v := url.Values {}
168
168
169
- if edit .ChannelUsername != "" {
170
- v .Add ("chat_id" , edit .ChannelUsername )
169
+ if edit .InlineMessageID == "" {
170
+ if edit .ChannelUsername != "" {
171
+ v .Add ("chat_id" , edit .ChannelUsername )
172
+ } else {
173
+ v .Add ("chat_id" , strconv .FormatInt (edit .ChatID , 10 ))
174
+ }
175
+ v .Add ("message_id" , strconv .Itoa (edit .MessageID ))
171
176
} else {
172
- v .Add ("chat_id " , strconv . FormatInt ( edit .ChatID , 10 ) )
177
+ v .Add ("inline_message_id " , edit .InlineMessageID )
173
178
}
174
- v .Add ("message_id" , strconv .Itoa (edit .MessageID ))
175
- v .Add ("inline_message_id" , edit .InlineMessageID )
176
179
177
180
if edit .ReplyMarkup != nil {
178
181
data , err := json .Marshal (edit .ReplyMarkup )
You can’t perform that action at this time.
0 commit comments