diff --git a/Services/uTTWEventSub.pas b/Services/uTTWEventSub.pas index 5ebe551..f59a516 100644 --- a/Services/uTTWEventSub.pas +++ b/Services/uTTWEventSub.pas @@ -243,8 +243,18 @@ begin if md.subscription_type = 'channel.follow' then if Assigned(FOnFollow) then FOnFollow(ParseFollowEvent(AText)); - //todo доделать парсинг типов нотификаций! - // Тут аналогично можно вызывать ParseSubEvent, ParseGiftEvent, ParseRaidEvent + + if md.subscription_type = 'channel.subscribe' then + if Assigned(FOnSub) then + FOnSub(ParseSubEvent(AText)); + + if md.subscription_type = 'channel.subscription.gift' then + if Assigned(FOnGift) then + FOnGift(ParseGiftEvent(AText)); + + if md.subscription_type = 'channel.raid' then + if Assigned(FOnRaid) then + FOnRaid(ParseRaidEvent(AText)); end else if md.message_type = 'session_keepalive' then toLog(3, 'EventMSG', 'Получен keepalive');