✨ Added WebhookInfo utils
This commit is contained in:
parent
b3f324e1b3
commit
6f7a4c9645
|
@ -0,0 +1,16 @@
|
|||
package telegram
|
||||
|
||||
import "time"
|
||||
|
||||
func (wi *WebhookInfo) HasURL() bool {
|
||||
return wi != nil && wi.URL != ""
|
||||
}
|
||||
|
||||
func (wi *WebhookInfo) LastErrorTime() *time.Time {
|
||||
if wi == nil {
|
||||
return nil
|
||||
}
|
||||
|
||||
led := time.Unix(wi.LastErrorDate, 0)
|
||||
return &led
|
||||
}
|
Loading…
Reference in New Issue