FIX callback query and BUTTON_DATA_INVALID error with hashStorage

This commit is contained in:
Hamidreza Ghavami
2023-05-20 20:29:28 +04:30
parent 4dfe527f20
commit 8c5648eb09
4 changed files with 172 additions and 47 deletions
+19
View File
@@ -0,0 +1,19 @@
package job
import (
"x-ui/web/service"
)
type CheckHashStorageJob struct {
tgbotService service.Tgbot
}
func NewCheckHashStorageJob() *CheckHashStorageJob {
return new(CheckHashStorageJob)
}
// Here Run is an interface method of the Job interface
func (j *CheckHashStorageJob) Run() {
// Remove expired hashes from storage
j.tgbotService.GetHashStorage().RemoveExpiredHashes()
}