diff options
author | Bohdan Horbeshko <bodqhrohro@gmail.com> | 2022-03-11 19:12:36 +0300 |
---|---|---|
committer | Bohdan Horbeshko <bodqhrohro@gmail.com> | 2022-03-11 19:12:36 +0300 |
commit | f6e62fe1fd208cba8214db70fe1ebbdc9bb41115 (patch) | |
tree | dff45ff812970bf738e40f1f3274bd49b9f61eec /telegram/utils.go | |
parent | 7ddc3c448278191f19d616cf3b730bdbe8dc63cd (diff) |
Merge adjacent formatting entities of same kind
Diffstat (limited to 'telegram/utils.go')
-rw-r--r-- | telegram/utils.go | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/telegram/utils.go b/telegram/utils.go index 6c16a74..9b72242 100644 --- a/telegram/utils.go +++ b/telegram/utils.go @@ -484,7 +484,7 @@ func (c *Client) messageToText(message *client.Message, preview bool) string { } else { return formatter.Format( photo.Caption.Text, - formatter.SortEntities(photo.Caption.Entities), + photo.Caption.Entities, markupFunction, ) } @@ -495,7 +495,7 @@ func (c *Client) messageToText(message *client.Message, preview bool) string { } else { return formatter.Format( audio.Caption.Text, - formatter.SortEntities(audio.Caption.Entities), + audio.Caption.Entities, markupFunction, ) } @@ -506,7 +506,7 @@ func (c *Client) messageToText(message *client.Message, preview bool) string { } else { return formatter.Format( video.Caption.Text, - formatter.SortEntities(video.Caption.Entities), + video.Caption.Entities, markupFunction, ) } @@ -517,7 +517,7 @@ func (c *Client) messageToText(message *client.Message, preview bool) string { } else { return formatter.Format( document.Caption.Text, - formatter.SortEntities(document.Caption.Entities), + document.Caption.Entities, markupFunction, ) } @@ -528,7 +528,7 @@ func (c *Client) messageToText(message *client.Message, preview bool) string { } else { return formatter.Format( text.Text.Text, - formatter.SortEntities(text.Text.Entities), + text.Text.Entities, markupFunction, ) } @@ -539,7 +539,7 @@ func (c *Client) messageToText(message *client.Message, preview bool) string { } else { return formatter.Format( voice.Caption.Text, - formatter.SortEntities(voice.Caption.Entities), + voice.Caption.Entities, markupFunction, ) } @@ -552,7 +552,7 @@ func (c *Client) messageToText(message *client.Message, preview bool) string { } else { return formatter.Format( animation.Caption.Text, - formatter.SortEntities(animation.Caption.Entities), + animation.Caption.Entities, markupFunction, ) } |