mirror of
https://github.com/status-im/status-github-bot.git
synced 2025-02-04 17:33:57 +00:00
tip-kudos-recipients: Adapt regex to new Disco message format
This commit is contained in:
parent
872ed94fff
commit
c6bae03661
@ -293,10 +293,10 @@ function parseKudosReceivers (message) {
|
||||
function countStarReactions (message, kudosReceivers) {
|
||||
let reactionCount = 0
|
||||
if (message.reactions) {
|
||||
const starsRegex = /> \*(\d+) :star:s\s+\*/g
|
||||
const starsRegex = /> \*(\d+) :star:s?\s*\*/g
|
||||
reactionCount = getReactionCount(starsRegex, message.text)
|
||||
if (reactionCount === 0) {
|
||||
const reactionsRegex = /> \*`(\d+)` Reactions?\s+\*/g
|
||||
const reactionsRegex = /> \*`(\d+)` Reactions?\s*\*/g
|
||||
reactionCount = getReactionCount(reactionsRegex, message.text)
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user