Fix parsing messages without reactions

This commit is contained in:
Laura Hausmann 2023-01-18 03:48:48 +01:00
parent 9bab0102e8
commit 57a2f8720b
Signed by: zotan
GPG key ID: D044E84C5BE01605

View file

@ -450,7 +450,7 @@ namespace tgcli {
var rest = $"{text}{(msg.EditDate == 0 ? "" : $"{Ansi.Yellow}*")}";
if (msg.InteractionInfo.Reactions.Any(p => p.Type is ReactionType.ReactionTypeEmoji)) {
if (msg.InteractionInfo != null && msg.InteractionInfo.Reactions.Any(p => p.Type is ReactionType.ReactionTypeEmoji)) {
rest = $"{rest} {Ansi.Cyan}<--";
foreach (var reaction in msg.InteractionInfo.Reactions)
if (reaction.Type is ReactionType.ReactionTypeEmoji emoji)