robot-mafia / nestjs-telegraf

🤖 Powerful Nest module for easy and fast creation Telegram bots
https://nestjs-telegraf.0x467.com
MIT License
507 stars 86 forks source link

@Message decorator issue (typeorm/refrect-metadata related) #1174

Open Kiura opened 5 months ago

Kiura commented 5 months ago

Hi, thanks for the great library. One of the reasons I am using telegraf over grammy )

Basically, there is a weird issue with the decorator when combined with typeorm. Whenever I include typeorm, the message becomes this:

async (ctx = context) => {
    await execute(i + 1, ctx);
}

When I expect it to be string. After long hours of hunting the issue a colleague of mine found out the issue was related to refrect-metadata. Once the dependency was updated the issue was gone.

bukhalo commented 1 month ago

Could you provide a more in-depth example?

Kiura commented 1 month ago

@bukhalo, unfortunately, I don't remember the details. I believe we can close the issue and keep it so others with the same issue know what to do when/if such issue occurs. To resolve the issue one simply needs to update refrect-metadata dependency