@@ -24,14 +24,14 @@ type sendMessageBody struct {
2424}
2525
2626type sendMessageOptions struct {
27- Channel chat1.ChatChannel `json:"channel,omitempty "`
27+ Channel chat1.ChatChannel `json:"channel"`
2828 ConversationID chat1.ConvIDStr `json:"conversation_id,omitempty"`
29- Message sendMessageBody `json:",omitempty"`
30- Filename string `json:"filename,omitempty"`
31- Title string `json:"title,omitempty"`
32- MsgID chat1.MessageID `json:"message_id,omitempty"`
33- ConfirmLumenSend bool `json:"confirm_lumen_send"`
34- ReplyTo * chat1.MessageID `json:"reply_to,omitempty"`
29+ Message sendMessageBody
30+ Filename string `json:"filename,omitempty"`
31+ Title string `json:"title,omitempty"`
32+ MsgID chat1.MessageID `json:"message_id,omitempty"`
33+ ConfirmLumenSend bool `json:"confirm_lumen_send"`
34+ ReplyTo * chat1.MessageID `json:"reply_to,omitempty"`
3535}
3636
3737type sendMessageParams struct {
@@ -122,7 +122,7 @@ func (a *API) GetTextMessages(channel chat1.ChatChannel, unreadOnly bool) ([]cha
122122 return res , nil
123123}
124124
125- func (a * API ) SendMessage (channel chat1.ChatChannel , body string , args ... interface {} ) (resp SendResponse , err error ) {
125+ func (a * API ) SendMessage (channel chat1.ChatChannel , body string , args ... any ) (resp SendResponse , err error ) {
126126 defer a .Trace (& err , "SendMessage" )()
127127 arg := newSendArg (sendMessageOptions {
128128 Channel : channel ,
@@ -133,14 +133,14 @@ func (a *API) SendMessage(channel chat1.ChatChannel, body string, args ...interf
133133 return a .doSend (arg )
134134}
135135
136- func (a * API ) Broadcast (body string , args ... interface {} ) (SendResponse , error ) {
136+ func (a * API ) Broadcast (body string , args ... any ) (SendResponse , error ) {
137137 return a .SendMessage (chat1.ChatChannel {
138138 Name : a .GetUsername (),
139139 Public : true ,
140140 }, body , args ... )
141141}
142142
143- func (a * API ) SendMessageByConvID (convID chat1.ConvIDStr , body string , args ... interface {} ) (resp SendResponse , err error ) {
143+ func (a * API ) SendMessageByConvID (convID chat1.ConvIDStr , body string , args ... any ) (resp SendResponse , err error ) {
144144 defer a .Trace (& err , "SendMessageByConvID" )()
145145 arg := newSendArg (sendMessageOptions {
146146 ConversationID : convID ,
@@ -152,7 +152,7 @@ func (a *API) SendMessageByConvID(convID chat1.ConvIDStr, body string, args ...i
152152}
153153
154154// SendMessageByTlfName sends a message on the given TLF name
155- func (a * API ) SendMessageByTlfName (tlfName string , body string , args ... interface {} ) (resp SendResponse , err error ) {
155+ func (a * API ) SendMessageByTlfName (tlfName string , body string , args ... any ) (resp SendResponse , err error ) {
156156 defer a .Trace (& err , "SendMessageByTlfName" )()
157157 arg := newSendArg (sendMessageOptions {
158158 Channel : chat1.ChatChannel {
@@ -165,7 +165,7 @@ func (a *API) SendMessageByTlfName(tlfName string, body string, args ...interfac
165165 return a .doSend (arg )
166166}
167167
168- func (a * API ) SendMessageByTeamName (teamName string , inChannel * string , body string , args ... interface {} ) (resp SendResponse , err error ) {
168+ func (a * API ) SendMessageByTeamName (teamName string , inChannel * string , body string , args ... any ) (resp SendResponse , err error ) {
169169 defer a .Trace (& err , "SendMessageByTeamName" )()
170170 channel := "general"
171171 if inChannel != nil {
@@ -184,7 +184,7 @@ func (a *API) SendMessageByTeamName(teamName string, inChannel *string, body str
184184 return a .doSend (arg )
185185}
186186
187- func (a * API ) SendReply (channel chat1.ChatChannel , replyTo * chat1.MessageID , body string , args ... interface {} ) (SendResponse , error ) {
187+ func (a * API ) SendReply (channel chat1.ChatChannel , replyTo * chat1.MessageID , body string , args ... any ) (SendResponse , error ) {
188188 arg := newSendArg (sendMessageOptions {
189189 Channel : channel ,
190190 Message : sendMessageBody {
@@ -195,7 +195,7 @@ func (a *API) SendReply(channel chat1.ChatChannel, replyTo *chat1.MessageID, bod
195195 return a .doSend (arg )
196196}
197197
198- func (a * API ) SendReplyByConvID (convID chat1.ConvIDStr , replyTo * chat1.MessageID , body string , args ... interface {} ) (SendResponse , error ) {
198+ func (a * API ) SendReplyByConvID (convID chat1.ConvIDStr , replyTo * chat1.MessageID , body string , args ... any ) (SendResponse , error ) {
199199 arg := newSendArg (sendMessageOptions {
200200 ConversationID : convID ,
201201 Message : sendMessageBody {
@@ -206,7 +206,7 @@ func (a *API) SendReplyByConvID(convID chat1.ConvIDStr, replyTo *chat1.MessageID
206206 return a .doSend (arg )
207207}
208208
209- func (a * API ) SendReplyByTlfName (tlfName string , replyTo * chat1.MessageID , body string , args ... interface {} ) (SendResponse , error ) {
209+ func (a * API ) SendReplyByTlfName (tlfName string , replyTo * chat1.MessageID , body string , args ... any ) (SendResponse , error ) {
210210 arg := newSendArg (sendMessageOptions {
211211 Channel : chat1.ChatChannel {
212212 Name : tlfName ,
@@ -418,7 +418,7 @@ func (a *API) LeaveChannel(teamName string, channelName string) (chat1.EmptyRes,
418418// Send lumens in chat /////////////////////////////////
419419////////////////////////////////////////////////////////
420420
421- func (a * API ) InChatSend (channel chat1.ChatChannel , body string , args ... interface {} ) (SendResponse , error ) {
421+ func (a * API ) InChatSend (channel chat1.ChatChannel , body string , args ... any ) (SendResponse , error ) {
422422 arg := newSendArg (sendMessageOptions {
423423 Channel : channel ,
424424 Message : sendMessageBody {
@@ -429,7 +429,7 @@ func (a *API) InChatSend(channel chat1.ChatChannel, body string, args ...interfa
429429 return a .doSend (arg )
430430}
431431
432- func (a * API ) InChatSendByConvID (convID chat1.ConvIDStr , body string , args ... interface {} ) (SendResponse , error ) {
432+ func (a * API ) InChatSendByConvID (convID chat1.ConvIDStr , body string , args ... any ) (SendResponse , error ) {
433433 arg := newSendArg (sendMessageOptions {
434434 ConversationID : convID ,
435435 Message : sendMessageBody {
@@ -440,7 +440,7 @@ func (a *API) InChatSendByConvID(convID chat1.ConvIDStr, body string, args ...in
440440 return a .doSend (arg )
441441}
442442
443- func (a * API ) InChatSendByTlfName (tlfName string , body string , args ... interface {} ) (SendResponse , error ) {
443+ func (a * API ) InChatSendByTlfName (tlfName string , body string , args ... any ) (SendResponse , error ) {
444444 arg := newSendArg (sendMessageOptions {
445445 Channel : chat1.ChatChannel {
446446 Name : tlfName ,
@@ -501,7 +501,7 @@ type clearCmdsParams struct {
501501
502502type clearCmdsArg struct {
503503 Method string `json:"method"`
504- Params clearCmdsParams `json:"params,omitempty "`
504+ Params clearCmdsParams `json:"params"`
505505}
506506
507507func (a * API ) ClearCommands (filter * chat1.ClearCommandAPIParam ) error {
@@ -517,7 +517,7 @@ func (a *API) ClearCommands(filter *chat1.ClearCommandAPIParam) error {
517517}
518518
519519type listCmdsOptions struct {
520- Channel chat1.ChatChannel `json:"channel,omitempty "`
520+ Channel chat1.ChatChannel `json:"channel"`
521521 ConversationID chat1.ConvIDStr `json:"conversation_id,omitempty"`
522522}
523523
@@ -572,7 +572,7 @@ func (a *API) listCommands(arg listCmdsArg) ([]chat1.UserBotCommandOutput, error
572572}
573573
574574type listMembersOptions struct {
575- Channel chat1.ChatChannel `json:"channel,omitempty "`
575+ Channel chat1.ChatChannel `json:"channel"`
576576 ConversationID chat1.ConvIDStr `json:"conversation_id,omitempty"`
577577}
578578
@@ -636,7 +636,7 @@ type GetMessagesResult struct {
636636}
637637
638638type getMessagesOptions struct {
639- Channel chat1.ChatChannel `json:"channel,omitempty "`
639+ Channel chat1.ChatChannel `json:"channel"`
640640 ConversationID chat1.ConvIDStr `json:"conversation_id,omitempty"`
641641 MessageIDs []chat1.MessageID `json:"message_ids,omitempty"`
642642}
0 commit comments