Skip to content

Commit

Permalink
context: remove AnswerWebApp
Browse files Browse the repository at this point in the history
  • Loading branch information
demget committed Oct 6, 2022
1 parent 65f19ba commit 3ba2966
Showing 1 changed file with 0 additions and 12 deletions.
12 changes: 0 additions & 12 deletions context.go
Original file line number Diff line number Diff line change
Expand Up @@ -145,10 +145,6 @@ type Context interface {
// See Respond from bot.go.
Respond(resp ...*CallbackResponse) error

// AnswerWebApp sends a response to web app query.
// See AnswerWebApp from bot.go.
AnswerWebApp(result Result) error

// Get retrieves data from the context.
Get(key string) interface{}

Expand Down Expand Up @@ -458,14 +454,6 @@ func (c *nativeContext) Answer(resp *QueryResponse) error {
return c.b.Answer(c.u.Query, resp)
}

func (c *nativeContext) AnswerWebApp(result Result) error {
if c.u.Message == nil || c.u.Message.WebAppData == nil {
return errors.New("telebot: context web app is nil")
}
_, err := c.b.AnswerWebApp(c.u.Query, result)
return err
}

func (c *nativeContext) Set(key string, value interface{}) {
c.lock.Lock()
defer c.lock.Unlock()
Expand Down

0 comments on commit 3ba2966

Please sign in to comment.