Новая система пересылки сообщений без трансляции и транскодирования вложений

This commit is contained in:
RoyceDa
2026-03-28 17:07:43 +02:00
parent c9cff515e5
commit aaa4b4283a
4 changed files with 8 additions and 5 deletions

View File

@@ -104,7 +104,7 @@ export function Message(props: MessageProps) {
message: props.message,
attachments: props.attachments.filter(a => a.type != AttachmentType.MESSAGES),
message_id: props.message_id,
chacha_key_plain: props.chacha_key_plain
};
const avatars = useAvatars(user.publicKey);
@@ -126,6 +126,9 @@ export function Message(props: MessageProps) {
if (props.replyed) {
return false;
}
if(props.chacha_key_plain == ""){
return false;
}
if (messageReply.attachments.find((v) => ATTACHMENTS_NOT_ALLOWED_TO_REPLY.includes(v.type))) {
return false;
}
@@ -215,7 +218,7 @@ export function Message(props: MessageProps) {
fontSize: '13px',
color: messageStyle == MessageStyle.BUBBLES ? (computedTheme == 'light' ? (props.parent?.from_me ? 'white' : 'black') : 'white') : (computedTheme == 'light' ? 'black' : 'white')
}} ml={props.avatar_no_render ? 50 : undefined} onDoubleClick={(e) => e.stopPropagation()}>
<TextParser performanceEntityLimit={ENTITY_LIMITS_TO_PARSE_IN_MESSAGE} oversizeIfTextSmallerThan={1} text={props.message.trim() + props.chacha_key_plain}></TextParser>
<TextParser performanceEntityLimit={ENTITY_LIMITS_TO_PARSE_IN_MESSAGE} oversizeIfTextSmallerThan={1} text={props.message.trim()}></TextParser>
</Box>
</Flex>
</Flex>