File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed
Wissance.MossbauerLab.Watcher/Wissance.MossbauerLab.Watcher.Services/Notification Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -34,7 +34,7 @@ public async Task<bool> NotifySpectrumSavedAsync(IList<SpectrumReadyData> spectr
3434 try
3535 {
3636 ITelegramBotClient client = new TelegramBotClient ( _tgRequisites . BotKey ) ;
37- ChatId targetChatId = GetChatId ( _tgRequisites ) ;
37+ ChatId targetChatId = GetChatId ( ) ;
3838 Message msg = CreateMessageFromTemplate ( spectra ) ;
3939 username = targetChatId . Username ;
4040 await client . SendTextMessageAsync ( targetChatId , msg . Text ) ;
@@ -66,8 +66,9 @@ private Message CreateMessageFromTemplate(IList<SpectrumReadyData> spectra)
6666 return msg ;
6767 }
6868
69- private ChatId GetChatId ( TelegramSendRequisites _tgRequisites )
69+ private ChatId GetChatId ( )
7070 {
71+ // This is tutorial about where to get chatId : https://gist.github.com/nafiesl/4ad622f344cd1dc3bb1ecbe468ff9f8a
7172 if ( _tgRequisites . GroupId . HasValue )
7273 return new ChatId ( _tgRequisites . GroupId . Value ) ;
7374 return new ChatId ( _tgRequisites . GroupName ) ;
You can’t perform that action at this time.
0 commit comments