plugins/issues.lua

changeset 147
7ab078186587
parent 131
51fd36d01b27
--- 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

mercurial