diff options
Diffstat (limited to 'bridge/helper/helper.go')
-rw-r--r-- | bridge/helper/helper.go | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/bridge/helper/helper.go b/bridge/helper/helper.go index fb65d8d9..0208dff1 100644 --- a/bridge/helper/helper.go +++ b/bridge/helper/helper.go @@ -86,6 +86,12 @@ func GetSubLines(message string, maxLineLength int, clippingMessage string) []st var lines []string for _, line := range strings.Split(strings.TrimSpace(message), "\n") { + if line == "" { + // Prevent sending empty messages, so we'll skip this line + // if it has no content. + continue + } + if maxLineLength == 0 || len([]byte(line)) <= maxLineLength { lines = append(lines, line) continue |