HarukaNetwork / HarukaX

Telegram bot written in Go, built to scale.
Other
31 stars 31 forks source link

cannot set new welcome msgID when updating the cleanwelcome msgid due to welcome msg did not send #12

Open soekarnohatta opened 4 years ago

soekarnohatta commented 4 years ago

This happened when the welcome message did not send by the bot and when the bot sets the new welcome msgid, the error occured. To reproduce it, turn the bot off and wait for several updates and turn it back on. You will see it when the bot is catching the updates.

https://github.com/HarukaNetwork/HarukaX/blob/4191b3c2ef551b0b4d5e5910820ab9e63ab9ac09/harukax/modules/welcome/welcome.go#L147 https://github.com/HarukaNetwork/HarukaX/blob/4191b3c2ef551b0b4d5e5910820ab9e63ab9ac09/harukax/modules/welcome/welcome.go#L151

sentis nil due to the bot did not send the welcome, and when inserting the new msg id it leads to nil object