From d2e574d1867bbdca3ff8f8f50c8dda9df9d57cb6 Mon Sep 17 00:00:00 2001 From: RoyceDa Date: Sun, 22 Mar 2026 18:28:28 +0200 Subject: [PATCH 1/4] =?UTF-8?q?CI/CD=20=D0=B1=D0=B5=D0=B7=20=D1=80=D0=B5?= =?UTF-8?q?=D1=81=D1=82=D0=B0=D1=80=D1=82=D0=B0=20=D0=B4=D0=BE=D0=BA=D0=B5?= =?UTF-8?q?=D1=80=D0=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitea/workflows/service-packs.yaml | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/.gitea/workflows/service-packs.yaml b/.gitea/workflows/service-packs.yaml index 43bff8e..5061cbb 100644 --- a/.gitea/workflows/service-packs.yaml +++ b/.gitea/workflows/service-packs.yaml @@ -88,8 +88,16 @@ jobs: find packs -maxdepth 3 -type f 2>/dev/null || true test -n "$(find packs -type f -print -quit 2>/dev/null)" || { echo "packs is empty"; exit 1; } - - name: Install SCP in Docker container - run: apt-get install -y openssh-client + - name: Clean files before upload + uses: appleboy/ssh-action@master + with: + host: ${{ secrets.SDU_SSH_HOST }} + username: ${{ secrets.SDU_SSH_USERNAME }} + password: ${{ secrets.SDU_SSH_PASSWORD }} + port: 22 + script: | + mkdir -p "${{ secrets.SDU_SSH_PACKS }}" + find "${{ secrets.SDU_SSH_PACKS }}" -mindepth 1 -type f -delete - name: Upload to SSH using SCP uses: appleboy/scp-action@master @@ -101,4 +109,4 @@ jobs: source: "packs/*" target: "${{ secrets.SDU_SSH_PACKS }}" strip_components: 1 - rm: true \ No newline at end of file + rm: false \ No newline at end of file From a1c8b3d95a00aaf93b27bde7567e400eb92003f2 Mon Sep 17 00:00:00 2001 From: RoyceDa Date: Sun, 22 Mar 2026 19:21:11 +0200 Subject: [PATCH 2/4] =?UTF-8?q?=D0=A2=D1=80=D0=B0=D0=BD=D1=81=D0=BB=D1=8F?= =?UTF-8?q?=D1=86=D0=B8=D1=8F=20Emoji=20=D0=B8=D0=B7=20Unicode=20=D0=BA=20?= =?UTF-8?q?=D0=BE=D0=B1=D1=89=D0=B5=D0=BC=D1=83=20=D0=B2=D0=B8=D0=B4=D1=83?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/components/TextParser/TextParser.tsx | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/app/components/TextParser/TextParser.tsx b/app/components/TextParser/TextParser.tsx index 9cbdf4c..cf517b6 100644 --- a/app/components/TextParser/TextParser.tsx +++ b/app/components/TextParser/TextParser.tsx @@ -119,6 +119,20 @@ export function TextParser(props: TextParserProps) { return <>{match}; } }, + { + // unicode emojis + pattern: [/\p{Emoji_Presentation}/u], + render: (match: string) => { + let textWithoutEmojis = props.text.replace(/\p{Emoji_Presentation}/gu, ''); + if(textWithoutEmojis.length <= (props.oversizeIfTextSmallerThan ?? 0)) { + return ; + } + return ; + }, + flush: (match: string) => { + return ; + } + }, { // :emoji_code: pattern: [/:emoji_([a-zA-Z0-9_-]+):/], From 6dc35d7ccae08d001b619cb80d0b7141044742b9 Mon Sep 17 00:00:00 2001 From: RoyceDa Date: Sun, 22 Mar 2026 19:49:59 +0200 Subject: [PATCH 3/4] =?UTF-8?q?=D0=9D=D0=BE=D0=B2=D0=BE=D0=B5=20=D0=B2?= =?UTF-8?q?=D0=BB=D0=BE=D0=B6=D0=B5=D0=BD=D0=B8=D0=B5=20=D0=97=D0=92=D0=9E?= =?UTF-8?q?=D0=9D=D0=9E=D0=9A=20=D1=82=D0=B5=D0=BF=D0=B5=D1=80=D1=8C=20?= =?UTF-8?q?=D0=BE=D1=82=D0=BF=D1=80=D0=B0=D0=B2=D0=BB=D1=8F=D0=B5=D1=82?= =?UTF-8?q?=D1=81=D1=8F=20=D0=BE=D1=82=20=D0=BB=D0=B8=D1=86=D0=B0=20=D0=B7?= =?UTF-8?q?=D0=B2=D0=BE=D0=BD=D1=8F=D1=89=D0=B5=D0=B3=D0=BE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../MessageAttachments/MessageCall.tsx | 12 +++++++----- app/providers/CallProvider/CallProvider.tsx | 17 +++++++---------- .../protocol/packets/packet.message.ts | 2 +- 3 files changed, 15 insertions(+), 16 deletions(-) diff --git a/app/components/MessageAttachments/MessageCall.tsx b/app/components/MessageAttachments/MessageCall.tsx index 478afdd..0e4ea35 100644 --- a/app/components/MessageAttachments/MessageCall.tsx +++ b/app/components/MessageAttachments/MessageCall.tsx @@ -4,6 +4,7 @@ import { Avatar, Box, Flex, Text } from "@mantine/core"; import { useRosettaColors } from "@/app/hooks/useRosettaColors"; import { IconPhoneOutgoing, IconX } from "@tabler/icons-react"; import { translateDurationToTime } from "@/app/providers/CallProvider/translateDurationTime"; +import { usePublicKey } from "@/app/providers/AccountProvider/usePublicKey"; export function MessageCall(props: AttachmentProps) { const { @@ -13,9 +14,10 @@ export function MessageCall(props: AttachmentProps) { props.attachment, props.parent, ); + const publicKey = usePublicKey(); const preview = getPreview(); - const callerRole = preview.split("::")[0]; - const duration = parseInt(preview.split("::")[1]); + const caller = props.parent.from == publicKey; + const duration = parseInt(preview); const colors = useRosettaColors(); const error = duration == 0; @@ -30,10 +32,10 @@ export function MessageCall(props: AttachmentProps) { {!error && <> - {callerRole == "0" && ( + {!caller && ( )} - {callerRole == "1" && ( + {caller && ( @@ -45,7 +47,7 @@ export function MessageCall(props: AttachmentProps) { { - error ? (callerRole == "0" ? "Missed call" : "Rejected call") : (callerRole == "0" ? "Incoming call" : "Outgoing call") + error ? (!caller ? "Missed call" : "Rejected call") : (!caller ? "Incoming call" : "Outgoing call") } {!error && diff --git a/app/providers/CallProvider/CallProvider.tsx b/app/providers/CallProvider/CallProvider.tsx index bf1d342..052d83b 100644 --- a/app/providers/CallProvider/CallProvider.tsx +++ b/app/providers/CallProvider/CallProvider.tsx @@ -462,21 +462,18 @@ export function CallProvider(props : CallProviderProps) { * Отправляет сообщение в диалог с звонящим с информацией о звонке */ const generateCallAttachment = () => { - let preview = ""; - if(roleRef.current == CallRole.CALLER){ - preview += "1::"; + if(roleRef.current != CallRole.CALLER){ + /** + * Только звонящий отправляет информацию о звонке в виде вложения, чтобы ее можно было отобразить в UI диалога, например длительность звонка + */ + return; } - if(roleRef.current == CallRole.CALLEE){ - preview += "0::"; - } - preview += duration.toString(); - sendMessage(activeCall, "", [{ id: generateRandomKey(16), - preview: preview, + preview: duration.toString(), type: AttachmentType.CALL, blob: "" - }], false); + }], true); } const accept = () => { diff --git a/app/providers/ProtocolProvider/protocol/packets/packet.message.ts b/app/providers/ProtocolProvider/protocol/packets/packet.message.ts index 66ba616..323908b 100644 --- a/app/providers/ProtocolProvider/protocol/packets/packet.message.ts +++ b/app/providers/ProtocolProvider/protocol/packets/packet.message.ts @@ -6,7 +6,7 @@ export enum AttachmentType { MESSAGES = 1, FILE = 2, AVATAR = 3, - CALL + CALL = 4 } export interface Attachment { From 7e977b762f88513d377047535ddc79e7b93d7e35 Mon Sep 17 00:00:00 2001 From: RoyceDa Date: Sun, 22 Mar 2026 19:52:24 +0200 Subject: [PATCH 4/4] =?UTF-8?q?=D0=9F=D1=80=D0=B0=D0=B2=D0=B8=D0=BB=D1=8C?= =?UTF-8?q?=D0=BD=D0=B0=D1=8F=20=D1=80=D0=B0=D1=81=D1=81=D1=82=D0=B0=D0=BD?= =?UTF-8?q?=D0=BE=D0=B2=D0=BA=D0=B0=20=D0=B8=D0=BA=D0=BE=D0=BD=D0=BE=D0=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/components/MessageAttachments/MessageCall.tsx | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/app/components/MessageAttachments/MessageCall.tsx b/app/components/MessageAttachments/MessageCall.tsx index 0e4ea35..aa9e28a 100644 --- a/app/components/MessageAttachments/MessageCall.tsx +++ b/app/components/MessageAttachments/MessageCall.tsx @@ -2,7 +2,7 @@ import { useAttachment } from "@/app/providers/AttachmentProvider/useAttachment" import { AttachmentProps } from "./MessageAttachments"; import { Avatar, Box, Flex, Text } from "@mantine/core"; import { useRosettaColors } from "@/app/hooks/useRosettaColors"; -import { IconPhoneOutgoing, IconX } from "@tabler/icons-react"; +import { IconPhoneIncoming, IconPhoneOutgoing, IconX } from "@tabler/icons-react"; import { translateDurationToTime } from "@/app/providers/CallProvider/translateDurationTime"; import { usePublicKey } from "@/app/providers/AccountProvider/usePublicKey"; @@ -33,12 +33,10 @@ export function MessageCall(props: AttachmentProps) { {!error && <> {!caller && ( - + )} {caller && ( - + )} } {error && <>