cleanup code
This commit is contained in:
parent
26452d0f53
commit
c06c7958e2
10 changed files with 64 additions and 14 deletions
|
@ -41,11 +41,12 @@ func InlineDownloadResultHandler(
|
|||
bot *gotgbot.Bot,
|
||||
ctx *ext.Context,
|
||||
) error {
|
||||
dlCtx, ok := core.InlineTasks[ctx.ChosenInlineResult.ResultId]
|
||||
taskID := ctx.ChosenInlineResult.ResultId
|
||||
dlCtx, ok := core.GetTask(taskID)
|
||||
if !ok {
|
||||
return nil
|
||||
}
|
||||
defer delete(core.InlineTasks, ctx.ChosenInlineResult.ResultId)
|
||||
defer core.DeleteTask(taskID)
|
||||
|
||||
mediaChan := make(chan *models.Media, 1)
|
||||
errChan := make(chan error, 1)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue