How to detect initial subscriptions for people with "special" names

This is definitely needed. Maybe move away from the PRIVMSG from twitchnotify altogether?

My workaround for now is to query the /search/channels endpoint and check for exact display-name matches. Thanks for the hint!

I don’t mind if they keep the priv message, if they include the user id of the subscriber as tags. Ideally tag for roomname + user like other locations.

A single command for both cases would simplify developing for it

Any word on this?
It’s pretty much impossible to know who is actually subscribing now if they have a “special” display name. Even with the hacky method of using search on each one there can be duplicate display names afaik.

The display names are also unique, but I very much agree that the hacky method is not ideal.

We’re still discussing how best to fix this internally. I’m at PAX Dev/West all week, so the updates will be slow.

PAX is over. Any updates?

Give them a day to get back in the office… Let alone it’s only 8:43am Seattle/San Francisco time right now.

They ain’t even in the office yet…

Most folks are flying back to our respective homes this morning. No update. I’ll let you know as soon as I have an update. :slight_smile:

Ohh excuse me, i thought pax was until the 2nd. Sorry for nagging :neutral_face:

No problem at all, @Kinsi! It ended yesterday. :slight_smile:

Any news on this? I’m bumping this as it has been over 3 weeks and I don’t want it to be auto-closed after a month.

Also, the new subscription message “USER just subscribed with Twitch Prime!” wasn’t caught by our regex and I had to manually insert the unrecognized subscriptions. We really need a proper way of handling those. Preferably the same way resubscriptions are handled.

// if bit 2 is to then we are in host mode
if (messageex[2] != 'to' && messageex[3] != 'to' && messageex[1] != 'viewers' && messageex[1] != 'viewer') {

Don’t use a regex.

Mine needed no changes since I take the string that TwitchNotify says and splits it around spaces.

    var who = messageex[0];

Granted yes we need something better for initial subs. But a regex is unneeded here I feel.

The thing is I don’t want to accidentially match new messages in the future that might sound similar, something like “Xyz just subscribed to [Hosting channel]”. Your example is especially error prone to newly added twitchnotify messages.
I’d rather retroactively manually increase a subscription in the database than take it away.

This is the current code, using regex is perfectly fine and more idiomatic:

match = re.match(r"^(.*?) just subscribed( with Twitch Prime)?!\s*$", message)
if match:
    return {"name": match.group(1), "months_in_a_row": 1}

So far it’s been rock solid. I had to do zero changes in order to deal with prime.

All twitchnotifys are new subscribers, with exclusion of the hosting specifics. So no need to parse for the count.

So my notification platform is solid. For anything use the subscribers API sounds like a better option for you for your database implementation, perhaps.

But hey, it’s a developers choice.

This is exactly why new subscriptions need to be on a separate IRC event, and not just a normal message from some strange user called “twitchnotify”

1 Like

If i do so, i get this error:

400 Bad request
Your browser sent an invalid request.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.