mirror of
https://github.com/nikoksr/notify.git
synced 2025-02-15 13:33:26 +02:00
Merge pull request #33 from pkwong4321/main
fix(service): Fix chat-id parsing in AddReceivers function
This commit is contained in:
commit
04cf3c11bc
@ -37,7 +37,7 @@ func New(apiToken string) (*Telegram, error) {
|
|||||||
func (t *Telegram) AddReceivers(chatIDs ...string) {
|
func (t *Telegram) AddReceivers(chatIDs ...string) {
|
||||||
for _, v := range chatIDs {
|
for _, v := range chatIDs {
|
||||||
chatID, err := strconv.ParseInt(v, 10, 64)
|
chatID, err := strconv.ParseInt(v, 10, 64)
|
||||||
if err != nil {
|
if err == nil {
|
||||||
t.chatIDs = append(t.chatIDs, chatID)
|
t.chatIDs = append(t.chatIDs, chatID)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user