Bugfix: use correct functions to parse caption entities in 'parse_caption_entities'

This commit is contained in:
Crax97 2022-06-19 23:03:26 +02:00 committed by Crax
parent 1f495cff36
commit 70f0438c7b

View file

@ -1250,8 +1250,8 @@ impl Message {
///
/// [`parse_entities`]: Message::parse_entities
pub fn parse_caption_entities(&self) -> Option<Vec<MessageEntityRef<'_>>> {
self.text()
.zip(self.entities())
self.caption()
.zip(self.caption_entities())
.map(|(t, e)| MessageEntityRef::parse(t, e))
}
}