Support dice messages

This commit is contained in:
Bohdan Horbeshko 2022-02-05 10:46:24 -05:00
parent 6f4cd5547a
commit d2f35075e3

View file

@ -486,6 +486,9 @@ func (c *Client) messageToText(message *client.Message) string {
contact.Contact.Vcard, contact.Contact.Vcard,
jid, 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()) return fmt.Sprintf("unknown message (%s)", message.Content.MessageContentType())