mirror of
https://github.com/logos-messaging/libchat.git
synced 2026-07-09 01:19:28 +00:00
Enable groupContext for GV2
This commit is contained in:
parent
ccaa0806b4
commit
90c975634a
@ -335,7 +335,16 @@ where
|
||||
}
|
||||
|
||||
fn metadata(&self) -> ConvoMetadata {
|
||||
ConvoMetadata::empty()
|
||||
let res = self.conversation.extensions().iter().find_map(|ext| {
|
||||
if let Extension::Unknown(ext_type, UnknownExtension(bytes)) = ext
|
||||
&& *ext_type == GROUP_METADATA_EXTENSION_TYPE
|
||||
{
|
||||
return ConvoMetaInfo::from_extension_bytes(bytes).ok();
|
||||
};
|
||||
None
|
||||
});
|
||||
|
||||
res.map(Into::into).unwrap_or_else(ConvoMetadata::empty)
|
||||
}
|
||||
|
||||
// fn conversation_state(&self) -> Result<ConversationState, ChatError> {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user