Skip to content

Commit

Permalink
Add function to remove Icon Syntax for Channels that don't support it
Browse files Browse the repository at this point in the history
  • Loading branch information
jolzee committed Nov 13, 2020
1 parent bb0c33a commit 012aff8
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/teneo-assets/ExtensionHelper.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@ class ExtensionHelper {
return displayClickableList(['content': content, hasLongOptions: hasLongOptions, 'permanent': true, 'disabled': true] as Map)
}


static String displayClickableList(def content, def channel, def hasLongOptions = false) {
return displayClickableList(['content': content, hasLongOptions: hasLongOptions, 'permanent': false] as Map)
}
Expand Down Expand Up @@ -267,6 +268,10 @@ class ExtensionHelper {
JsonOutput.toJson(attachment)
}

static String removeIconSyntax(def content) {
return content.replaceAll("\\[\\[(.{1,30}?)\\]", "");
}

private static String dateFormat(String isoDate) {
Calendar cal = javax.xml.bind.DatatypeConverter.parseDateTime(isoDate)
DateFormat df = DateFormat.getDateInstance()
Expand Down

0 comments on commit 012aff8

Please sign in to comment.