1 files changed, 5 insertions(+), 2 deletions(-)

M googlechat.groovy
M googlechat.groovy +5 -2
@@ 26,7 26,7 @@ import com.atlassian.jira.event.issue.*
 
 import org.ofbiz.core.entity.GenericValue
 
-Long WEBHOOK_CHAT_CUSTOMFIELD_ID = 16901;
+Long WEBHOOK_CHAT_CUSTOMFIELD_ID = 16520;
 
 def log(msg) {
 	System.out.println(msg);

          
@@ 178,7 178,10 @@ class SimpleChatMessage implements ChatM
 			def formattedComment = event.comment?.body?.replaceAll(~"\\{noformat\\}\\r?", '```')?.replaceAll(~"\\{color[#:0-9a-f]*\\}", "")?.replaceAll(~"^h[1-6]\\. (.*)", '*$1*')?.replaceAll(~'[\n\r]{4}', "\n")?.replaceAll(~'\\[([^|]+)\\|(http[^]]+)\\]', '<$2|$1>')?.replaceAll(~'\\{\\{(.*?)\\}\\}', '`$1`');
 			//log "Pre-formatting: ${event.comment?.body}";
 			//log "Post-formatting: ${formattedComment}";
-			return formattedComment;
+			if (event?.changeLog) { 
+				return '`Comment`: ' + formattedComment;
+			} else 
+				return formattedComment;
 		}
 	}