Skip to content

Commit

Permalink
feat(dependencies): 🐛 redemption pubsub now automatically uses token …
Browse files Browse the repository at this point in the history
…owner's channel
  • Loading branch information
ColeWalker committed Oct 4, 2020
1 parent 579dfc4 commit 229acec
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/schema/redemption-pubsub-type-schema.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,11 @@ export const RedemptionPubSubResolvers = {
const clients = injector.get(TwitchClients)

const twitchClient = await clients.apiClient()

const myId = (await twitchClient.getTokenInfo()).userId
const pubSubClient = await clients.pubSubClient()
await pubSubClient.registerUserListener(twitchClient)
const curriedOnRedemption = (cb: any) =>
pubSubClient.onRedemption('23573216', cb)
pubSubClient.onRedemption(myId, cb)

const asyncified = asyncify(curriedOnRedemption)

Expand Down

0 comments on commit 229acec

Please sign in to comment.