Transmit resub message

Signed-off-by: Knut Ahlers <knut@ahlers.me>
This commit is contained in:
Knut Ahlers 2021-05-28 00:29:50 +02:00
parent e0117c7cd1
commit 2bd3bb45a8
Signed by: luzifer
GPG key ID: 0066F03ED215AD7D
2 changed files with 3 additions and 0 deletions

View file

@ -54,6 +54,7 @@ func handleDemoAlert(w http.ResponseWriter, r *http.Request) {
data = map[string]interface{}{
"from": demoIssuer,
"is_resub": false,
"message": "",
"paid_for": "1",
"streak": "1",
"tier": "1000",
@ -65,6 +66,7 @@ func handleDemoAlert(w http.ResponseWriter, r *http.Request) {
data = map[string]interface{}{
"from": demoIssuer,
"is_resub": true,
"message": "Already 12 months! PogChamp",
"paid_for": "1",
"streak": "12",
"tier": "1000",

1
irc.go
View file

@ -255,6 +255,7 @@ func (ircHandler) handleTwitchUsernotice(m *irc.Message) {
fields := map[string]interface{}{
"from": displayName,
"is_resub": m.Tags["msg-id"] == "resub",
"message": m.Trailing(),
"paid_for": m.Tags["msg-param-multimonth-duration"],
"streak": m.Tags["msg-param-streak-months"],
"tier": m.Tags["msg-param-sub-plan"],