aboutsummaryrefslogtreecommitdiff
path: root/telegram/utils.go
diff options
context:
space:
mode:
authorBohdan Horbeshko <bodqhrohro@gmail.com>2022-02-14 03:05:59 +0300
committerBohdan Horbeshko <bodqhrohro@gmail.com>2022-02-14 03:05:59 +0300
commit915c40f1eed6ba139323c0fa15eed4ed3792f34b (patch)
treeb7e67604ea0451e2cc19f532a2c0954614eabd52 /telegram/utils.go
parent6cbfed824520e742532db502147d9c6bc524cc84 (diff)
Add an asciiarrows option (for clients that do not support Unicode ones)v1.1.2
Diffstat (limited to 'telegram/utils.go')
-rw-r--r--telegram/utils.go14
1 files changed, 11 insertions, 3 deletions
diff --git a/telegram/utils.go b/telegram/utils.go
index 086b7ae..7e93e57 100644
--- a/telegram/utils.go
+++ b/telegram/utils.go
@@ -617,10 +617,18 @@ func (c *Client) messageToPrefix(message *client.Message, fileString string) str
prefix := []string{}
// message direction
var directionChar string
- if message.IsOutgoing {
- directionChar = "➡ "
+ if c.Session.AsciiArrows {
+ if message.IsOutgoing {
+ directionChar = "> "
+ } else {
+ directionChar = "< "
+ }
} else {
- directionChar = "⬅ "
+ if message.IsOutgoing {
+ directionChar = "➡ "
+ } else {
+ directionChar = "⬅ "
+ }
}
prefix = append(prefix, directionChar+strconv.FormatInt(message.Id, 10))
// show sender in group chats