|
// Transform IRCv3 tags.. |
|
if(message.tags) { |
|
var tags = message.tags; |
|
for(var key in tags) { |
|
if(key !== "emote-sets" && key !== "ban-duration" && key !== "bits") { |
|
var value = tags[key]; |
|
if(_.isBoolean(value)) { value = null; } |
|
else if(value === "1") { value = true; } |
|
else if(value === "0") { value = false; } |
|
else if(_.isString(value)) { value = _.unescapeIRC(value); } |
|
tags[key] = value; |
|
} |
|
} |
|
} |
In some cases the original tag value is an actual integer, not a boolean. For example a resubscribe for 1 cumulative months. This is returned as a true value, which is surprising.
tmi.js/lib/client.js
Lines 92 to 105 in ddced23
In some cases the original tag value is an actual integer, not a boolean. For example a resubscribe for 1 cumulative months. This is returned as a
truevalue, which is surprising.