Hi Guys,
Here I am. I am currently a bit in a fight with our systems. We make a few things, and one of those needs to know The Gifter and the Receiver of a Gift Sub, regardless of if it is a Gift Sub or a Community Gift Sub. I am however struggling with this is a big way. There is just no reliable way, at least, maybe I am too stupid for it.
However, platforms like StreamElements and StreamLabs do seem to know when they receive a gift eventsub, who the gifter is and match it to the person it received the gift. I myself tried to do this too;
- I tried using a few different event subs. channel.subscription.gift will give me the gifter, and then a channel.subscribe is triggered. Nice. However, there is no way for me to reliably match those, since Twitch does not guarantee to send them out in the correct order.
- I tried using other subs, like channel.subscription.message, but the same issues arises here.
- I even tried channel.chat.notification, but although this one provides the most context, I cannot make it work since I also don’t have both information here.
How do they do this reliably? Because, if you just match them based on their order, you are bound to have either the gifter or the receiver wrong. What is the correct way to do this? For some short info, we are using webhooks.
If anyone here has any clear knowledge about this, please let me know. I am getting a bit desperate.
Best regards,
Pascal