Thu, 31 May 2018 01:03:21 +0200
plugins.issues: Avoid triggering on #number at the end of a word (eg URLs)
plugins/issues.lua | file | annotate | diff | comparison | revisions |
--- a/plugins/issues.lua Thu May 31 00:59:20 2018 +0200 +++ b/plugins/issues.lua Thu May 31 01:03:21 2018 +0200 @@ -53,7 +53,7 @@ end); local function check_for_issue_id(message) - local issue_id = message.body and message.body:match"#(%d+)"; + local issue_id = message.body and message.body:match"^#(%d+)" or message.body:match"%s#(%d+)"; if issue_id then return bot:event("commands/issue", { param = issue_id, reply = message.reply, room = message.room }); end