DotNetNomads/UltraMafia

Fix pin issue on non super groups

binali-rustamov opened this issue · 1 comments

Make message pin as optional feature.
Because of following error:

elegram.Bot.Exceptions.ApiRequestException: Bad Request: not enough rights to pin a message
   at Telegram.Bot.TelegramBotClient.MakeRequestAsync[TResponse](IRequest`1 request, CancellationToken cancellationToken)
   at UltraMafia.Frontend.Telegram.TelegramFrontendExtensions.CreateOrUpdateRegistrationMessage(ITelegramBotClient bot, GameSession session, TelegramFrontendSettings settings) in /tmp/src/UltraMafia/Frontend/Telegram/TelegramFrontendExtensions.cs:line 143
   at UltraMafia.Frontend.Telegram.TelegramFrontend.<>c__DisplayClass33_0.<<OnGamerJoined>b__0>d.MoveNext() in /tmp/src/UltraMafia/Frontend/Telegram/TelegramFrontend.cs:line 562
--- End of stack trace from previous location where exception was thrown ---
   at UltraMafia.Frontend.Telegram.TelegramFrontendExtensions.LockAndDo(ITelegramBotClient bot, Func`1 action) in /tmp/src/UltraMafia/Frontend/Telegram/TelegramFrontendExtensions.cs:line 171

This issue fixed in 1.0.1, now bot will check access to pin messages before pinning it.