aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBohdan Horbeshko <bodqhrohro@gmail.com>2022-02-05 18:46:24 +0300
committerBohdan Horbeshko <bodqhrohro@gmail.com>2022-02-05 18:46:24 +0300
commitd2f35075e35f7ff0ca92a4fca7a8f07b3d139f90 (patch)
tree0d2ee3c4f7f27e0342ab174905433f855026bb9c
parent6f4cd5547a4ba1b01e966404eb6985b3c1dbf503 (diff)
Support dice messages
-rw-r--r--telegram/utils.go3
1 files changed, 3 insertions, 0 deletions
diff --git a/telegram/utils.go b/telegram/utils.go
index 00bf93f..910bfd6 100644
--- a/telegram/utils.go
+++ b/telegram/utils.go
@@ -486,6 +486,9 @@ func (c *Client) messageToText(message *client.Message) string {
contact.Contact.Vcard,
jid,
)
+ case client.TypeMessageDice:
+ dice, _ := message.Content.(*client.MessageDice)
+ return fmt.Sprintf("%s 1d6: [%v]", dice.Emoji, dice.Value)
}
return fmt.Sprintf("unknown message (%s)", message.Content.MessageContentType())