frankvHoof93 / TikTokLiveSharp

Port of TikTok live library for C#
https://vanhoof.dev
Other
139 stars 27 forks source link

Fix duplicate GiftMessage #44

Closed DanielSvoboda closed 8 months ago

DanielSvoboda commented 8 months ago

Fix to prevent duplicate gift messages from being handled. The issue was that the HandleGiftMessage function was being called for every gift message, even if the gift streak had ended.

frankvHoof93 commented 8 months ago

This would stop OnGiftMessage from running at all at the end of a streak, preventing users from realizing the streak has ended. There are 2 separate Message-Events for Gifts. 1: OnGift, which returns the Gift-Object, then runs events on that gift. 2: OnGiftMessage, which runs for each GiftMessage, and returns the message itself.