@cometchat/chat-uikit-react-native 5.2.2 → 5.2.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/src/CometChatConversations/CometChatConversations.tsx +3 -5
- package/src/CometChatMessageList/CometChatMessageList.tsx +62 -3
- package/src/CometChatMessageList/style.ts +43 -0
- package/src/shared/events/CometChatUIEventHandler/CometChatUIEventHandler.ts +3 -0
- package/src/shared/events/CometChatUIEventHandler/Listener.ts +4 -0
- package/src/shared/events/ListenerInitializer.ts +3 -0
- package/src/shared/events/messages.ts +1 -0
- package/src/shared/icons/components/message-blocked.tsx +32 -0
- package/src/shared/icons/icon-mapping.tsx +3 -1
- package/src/shared/resources/CometChatLocalizeNew/resources/de/translation.json +7 -5
- package/src/shared/resources/CometChatLocalizeNew/resources/en/translation.json +8 -5
- package/src/shared/resources/CometChatLocalizeNew/resources/es/translation.json +7 -5
- package/src/shared/resources/CometChatLocalizeNew/resources/fr/translation.json +7 -5
- package/src/shared/resources/CometChatLocalizeNew/resources/hi/translation.json +8 -5
- package/src/shared/resources/CometChatLocalizeNew/resources/hu/translation.json +7 -5
- package/src/shared/resources/CometChatLocalizeNew/resources/it/translation.json +8 -5
- package/src/shared/resources/CometChatLocalizeNew/resources/ja/translation.json +8 -5
- package/src/shared/resources/CometChatLocalizeNew/resources/ko/translation.json +8 -5
- package/src/shared/resources/CometChatLocalizeNew/resources/lt/translation.json +7 -5
- package/src/shared/resources/CometChatLocalizeNew/resources/ms/translation.json +7 -5
- package/src/shared/resources/CometChatLocalizeNew/resources/nl/translation.json +8 -5
- package/src/shared/resources/CometChatLocalizeNew/resources/pt/translation.json +7 -5
- package/src/shared/resources/CometChatLocalizeNew/resources/ru/translation.json +7 -5
- package/src/shared/resources/CometChatLocalizeNew/resources/sv/translation.json +7 -5
- package/src/shared/resources/CometChatLocalizeNew/resources/tr/translation.json +8 -5
- package/src/shared/resources/CometChatLocalizeNew/resources/zh/translation.json +7 -5
- package/src/shared/resources/CometChatLocalizeNew/resources/zh-tw/translation.json +7 -5
- package/src/shared/utils/MessageReceiptUtils.ts +32 -0
- package/src/shared/utils/MessageUtils.tsx +107 -4
- package/src/theme/provider.tsx +2 -2
- package/src/theme/type.ts +19 -1
package/package.json
CHANGED
|
@@ -49,6 +49,7 @@ import { ErrorEmptyView } from "../shared/views/ErrorEmptyView/ErrorEmptyView";
|
|
|
49
49
|
import { useTheme } from "../theme";
|
|
50
50
|
import { Skeleton } from "./Skeleton";
|
|
51
51
|
import { ConversationStyle, Style } from "./style";
|
|
52
|
+
import MessageReceiptUtils from "../shared/utils/MessageReceiptUtils";
|
|
52
53
|
import { deepMerge } from "../shared/helper/helperFunctions";
|
|
53
54
|
import Delete from "../shared/icons/components/delete";
|
|
54
55
|
import { DeepPartial } from "../shared/helper/types";
|
|
@@ -896,13 +897,10 @@ export const CometChatConversations = (props: ConversationInterface) => {
|
|
|
896
897
|
lastMessage.getSender().getUid() == loggedInUser.current!.getUid() &&
|
|
897
898
|
!lastMessage.getDeletedAt()
|
|
898
899
|
) {
|
|
899
|
-
|
|
900
|
-
if (lastMessage?.hasOwnProperty("readAt")) status = MessageReceipt.READ;
|
|
901
|
-
else if (lastMessage?.hasOwnProperty("deliveredAt")) status = MessageReceipt.DELIVERED;
|
|
902
|
-
else if (lastMessage?.hasOwnProperty("sentAt")) status = MessageReceipt.SENT;
|
|
900
|
+
const status = MessageReceiptUtils.getReceiptStatus(lastMessage);
|
|
903
901
|
readReceipt =
|
|
904
902
|
!receiptsVisibility || lastMessage?.getDeletedAt() ? null : (
|
|
905
|
-
<CometChatReceipt receipt={status} style={mergedStyles.itemStyle.receiptStyles} />
|
|
903
|
+
<CometChatReceipt receipt={status as MessageReceipt} style={mergedStyles.itemStyle.receiptStyles} />
|
|
906
904
|
);
|
|
907
905
|
}
|
|
908
906
|
|
|
@@ -70,6 +70,7 @@ import { CometChatBadge } from "../shared/views/CometChatBadge";
|
|
|
70
70
|
import { CometChatDate } from "../shared/views/CometChatDate";
|
|
71
71
|
import { CometChatEmojiKeyboard } from "../shared/views/CometChatEmojiKeyboard";
|
|
72
72
|
import { CometChatMessageBubble } from "../shared/views/CometChatMessageBubble";
|
|
73
|
+
import { getModerationStatus, ModerationBottomView } from "../shared/utils/MessageUtils";
|
|
73
74
|
import { CometChatQuickReactions } from "../shared/views/CometChatQuickReactions";
|
|
74
75
|
import { CometChatReactionList } from "../shared/views/CometChatReactionList";
|
|
75
76
|
import { CometChatReactions } from "../shared/views/CometChatReactions";
|
|
@@ -157,6 +158,10 @@ export interface CometChatMessageListProps {
|
|
|
157
158
|
* Custom sound URL for messages.
|
|
158
159
|
*/
|
|
159
160
|
customSoundForMessages?: string;
|
|
161
|
+
/**
|
|
162
|
+
* Hides moderation status UI (bottom view) and suppresses moderation toasts.
|
|
163
|
+
*/
|
|
164
|
+
hideModerationStatus?: boolean;
|
|
160
165
|
/**
|
|
161
166
|
* Alignment type for the message list.
|
|
162
167
|
*/
|
|
@@ -459,6 +464,7 @@ export const CometChatMessageList = memo(
|
|
|
459
464
|
receiptsVisibility = true,
|
|
460
465
|
disableSoundForMessages,
|
|
461
466
|
customSoundForMessages,
|
|
467
|
+
hideModerationStatus = false,
|
|
462
468
|
alignment = "standard",
|
|
463
469
|
avatarVisibility = true,
|
|
464
470
|
datePattern,
|
|
@@ -521,6 +527,7 @@ export const CometChatMessageList = memo(
|
|
|
521
527
|
const hideGroupActionMessages = isAgenticUser() ? true : propHideGroupActionMessages;
|
|
522
528
|
|
|
523
529
|
const callListenerId = "call_" + new Date().getTime();
|
|
530
|
+
const effectiveHideModeration = hideModerationStatus;
|
|
524
531
|
const groupListenerId = "group_" + new Date().getTime();
|
|
525
532
|
const uiEventListener = "uiEvent_" + new Date().getTime();
|
|
526
533
|
const callEventListener = "callEvent_" + new Date().getTime();
|
|
@@ -1811,6 +1818,9 @@ export const CometChatMessageList = memo(
|
|
|
1811
1818
|
onMessageEdited: (editedMessage: any) => {
|
|
1812
1819
|
messageEdited(editedMessage);
|
|
1813
1820
|
},
|
|
1821
|
+
onMessageModerated: (moderatedMessage: any) => {
|
|
1822
|
+
messageEdited(moderatedMessage);
|
|
1823
|
+
},
|
|
1814
1824
|
onFormMessageReceived: (formMessage: any) => {
|
|
1815
1825
|
newMessage(formMessage);
|
|
1816
1826
|
},
|
|
@@ -2223,6 +2233,8 @@ export const CometChatMessageList = memo(
|
|
|
2223
2233
|
const nextItemIsDelivered =
|
|
2224
2234
|
messagesContentListRef.current[currentIndex! - 1] &&
|
|
2225
2235
|
messagesContentListRef.current[currentIndex! - 1].getDeliveredAt();
|
|
2236
|
+
// Moderation status should override other receipt states for immediate error display
|
|
2237
|
+
const moderationStatus = getModerationStatus(item);
|
|
2226
2238
|
if (item.getReadAt() || nextItemIsRead) messageState = MessageReceipt.READ;
|
|
2227
2239
|
else if (item.getDeliveredAt() || nextItemIsDelivered)
|
|
2228
2240
|
messageState = MessageReceipt.DELIVERED;
|
|
@@ -2231,6 +2243,12 @@ export const CometChatMessageList = memo(
|
|
|
2231
2243
|
else if (isOutgoingMessage) messageState = MessageReceipt.WAIT;
|
|
2232
2244
|
else messageState = MessageReceipt.ERROR;
|
|
2233
2245
|
|
|
2246
|
+
// Moderation overrides
|
|
2247
|
+
if (moderationStatus === "pending") {
|
|
2248
|
+
messageState = MessageReceipt.WAIT; // show wait icon until approved/disapproved
|
|
2249
|
+
} else if (moderationStatus === "disapproved") {
|
|
2250
|
+
messageState = MessageReceipt.ERROR;
|
|
2251
|
+
}
|
|
2234
2252
|
// Determine if message has been edited.
|
|
2235
2253
|
// This example assumes you have a method (or property) like getEditedAt() that returns a timestamp when edited.
|
|
2236
2254
|
const isEdited =
|
|
@@ -2339,6 +2357,11 @@ export const CometChatMessageList = memo(
|
|
|
2339
2357
|
messageObject?.getReactions &&
|
|
2340
2358
|
messageObject?.getReactions() &&
|
|
2341
2359
|
messageObject?.getReactions().length > 0;
|
|
2360
|
+
const moderationStatus = getModerationStatus(messageObject);
|
|
2361
|
+
const isOutgoing = messageObject.getSender()?.getUid() === loggedInUser.current?.getUid();
|
|
2362
|
+
if (isOutgoing && moderationStatus && moderationStatus !== "unmoderated") {
|
|
2363
|
+
return null;
|
|
2364
|
+
}
|
|
2342
2365
|
return hasReaction
|
|
2343
2366
|
? (params: { maxContentWidth?: number }) => {
|
|
2344
2367
|
return (
|
|
@@ -2406,6 +2429,11 @@ export const CometChatMessageList = memo(
|
|
|
2406
2429
|
let isThreaded = item.getReplyCount() > 0;
|
|
2407
2430
|
|
|
2408
2431
|
let _style = getCurrentBubbleStyle(item);
|
|
2432
|
+
const moderationStatus = getModerationStatus(item);
|
|
2433
|
+
const isOutgoing = item.getSender()?.getUid() === loggedInUser.current?.getUid();
|
|
2434
|
+
if (isOutgoing && moderationStatus && moderationStatus !== "unmoderated") {
|
|
2435
|
+
return undefined; // hide thread view if moderated
|
|
2436
|
+
}
|
|
2409
2437
|
return !isThreaded ? undefined : (
|
|
2410
2438
|
<TouchableOpacity
|
|
2411
2439
|
onPress={() => openThreadView(item, null)}
|
|
@@ -2532,6 +2560,20 @@ export const CometChatMessageList = memo(
|
|
|
2532
2560
|
}
|
|
2533
2561
|
return option;
|
|
2534
2562
|
});
|
|
2563
|
+
// Restrict options for disapproved outgoing messages (only delete + copy for text)
|
|
2564
|
+
const moderationStatus = getModerationStatus(item);
|
|
2565
|
+
const isOutgoing = item.getSender?.()?.getUid?.() === loggedInUser.current?.getUid?.();
|
|
2566
|
+
if (moderationStatus === "disapproved" && isOutgoing) {
|
|
2567
|
+
optionsWithPressHandling = optionsWithPressHandling.filter((opt) => {
|
|
2568
|
+
if (opt.id === MessageOptionConstants.deleteMessage) return true;
|
|
2569
|
+
if (
|
|
2570
|
+
opt.id === MessageOptionConstants.copyMessage &&
|
|
2571
|
+
(item.getType?.() === MessageTypeConstants.text || item?.getType === MessageTypeConstants.text)
|
|
2572
|
+
)
|
|
2573
|
+
return true;
|
|
2574
|
+
return false;
|
|
2575
|
+
});
|
|
2576
|
+
}
|
|
2535
2577
|
setShowMessageOptions(optionsWithPressHandling);
|
|
2536
2578
|
},
|
|
2537
2579
|
[mergedTheme]
|
|
@@ -2602,8 +2644,24 @@ export const CometChatMessageList = memo(
|
|
|
2602
2644
|
}, [isThreaded, message, getLeadingView, hasTemplate, bubbleAlignment]);
|
|
2603
2645
|
|
|
2604
2646
|
const BottomView = useMemo(() => {
|
|
2605
|
-
|
|
2606
|
-
|
|
2647
|
+
const moderationStatus = getModerationStatus(message);
|
|
2648
|
+
const isOutgoing = message.getSender()?.getUid() === loggedInUser.current?.getUid();
|
|
2649
|
+
if (effectiveHideModeration) {
|
|
2650
|
+
return hasTemplate?.BottomView && hasTemplate?.BottomView(message, bubbleAlignment);
|
|
2651
|
+
} else {
|
|
2652
|
+
if (isOutgoing && moderationStatus === "disapproved") {
|
|
2653
|
+
return (
|
|
2654
|
+
<ModerationBottomView
|
|
2655
|
+
status={moderationStatus}
|
|
2656
|
+
moderationStyle={
|
|
2657
|
+
mergedTheme.messageListStyles.outgoingMessageBubbleStyles.moderationStyle
|
|
2658
|
+
}
|
|
2659
|
+
/>
|
|
2660
|
+
);
|
|
2661
|
+
}
|
|
2662
|
+
return hasTemplate?.BottomView && hasTemplate?.BottomView(message, bubbleAlignment);
|
|
2663
|
+
}
|
|
2664
|
+
}, [hasTemplate, message, bubbleAlignment, effectiveHideModeration]);
|
|
2607
2665
|
|
|
2608
2666
|
const StatusInfoView = useMemo(() => {
|
|
2609
2667
|
return hasTemplate?.StatusInfoView &&
|
|
@@ -3310,7 +3368,8 @@ export const CometChatMessageList = memo(
|
|
|
3310
3368
|
/>
|
|
3311
3369
|
) : (
|
|
3312
3370
|
<View style={{ flex: 1 }}>
|
|
3313
|
-
{
|
|
3371
|
+
{/* Show quick reactions for disapproved messages */}
|
|
3372
|
+
{!hideReactionOption && getModerationStatus(selectedMessage) !== "disapproved" && (
|
|
3314
3373
|
<CometChatQuickReactions
|
|
3315
3374
|
quickReactions={quickReactionList}
|
|
3316
3375
|
onReactionPress={reactToMessage}
|
|
@@ -392,6 +392,26 @@ export const getMessageListStylesLight = (
|
|
|
392
392
|
borderRadius: spacing.radius.r3,
|
|
393
393
|
minWidth: 90,
|
|
394
394
|
},
|
|
395
|
+
moderationStyle: {
|
|
396
|
+
containerStyle: {
|
|
397
|
+
backgroundColor: "#F9EAEF",
|
|
398
|
+
paddingVertical: 6,
|
|
399
|
+
borderBottomLeftRadius: 8,
|
|
400
|
+
borderBottomRightRadius: 8,
|
|
401
|
+
borderTopLeftRadius: 0,
|
|
402
|
+
borderTopRightRadius: 0,
|
|
403
|
+
flexDirection: "row",
|
|
404
|
+
alignItems: "center",
|
|
405
|
+
},
|
|
406
|
+
textStyle: {
|
|
407
|
+
color: color?.error,
|
|
408
|
+
...typography?.body?.regular,
|
|
409
|
+
flexShrink: 1,
|
|
410
|
+
paddingHorizontal: 2,
|
|
411
|
+
alignSelf: "center",
|
|
412
|
+
},
|
|
413
|
+
iconTintColor: color?.error,
|
|
414
|
+
},
|
|
395
415
|
dateStyles: {
|
|
396
416
|
containerStyle: {
|
|
397
417
|
paddingTop: spacing.padding.p2,
|
|
@@ -469,6 +489,7 @@ export const getMessageListStylesLight = (
|
|
|
469
489
|
padding: spacing.padding.p1,
|
|
470
490
|
paddingBottom: spacing.padding.p0,
|
|
471
491
|
borderRadius: spacing.radius.r3,
|
|
492
|
+
overflow: "hidden",
|
|
472
493
|
},
|
|
473
494
|
imageStyle: {
|
|
474
495
|
borderRadius: spacing.radius.r2,
|
|
@@ -874,6 +895,27 @@ export const getMessageListStylesDark = (
|
|
|
874
895
|
borderRadius: spacing.radius.r3,
|
|
875
896
|
minWidth: 90,
|
|
876
897
|
},
|
|
898
|
+
moderationStyle: {
|
|
899
|
+
containerStyle: {
|
|
900
|
+
backgroundColor: "#3A0C05",
|
|
901
|
+
paddingVertical: 6,
|
|
902
|
+
borderBottomLeftRadius: 8,
|
|
903
|
+
borderBottomRightRadius: 8,
|
|
904
|
+
borderTopLeftRadius: 0,
|
|
905
|
+
borderTopRightRadius: 0,
|
|
906
|
+
flexDirection: "row",
|
|
907
|
+
alignItems: "center",
|
|
908
|
+
overflow: 'hidden',
|
|
909
|
+
},
|
|
910
|
+
textStyle: {
|
|
911
|
+
color: color?.error,
|
|
912
|
+
...typography?.body?.regular,
|
|
913
|
+
flexShrink: 1,
|
|
914
|
+
paddingHorizontal: 2,
|
|
915
|
+
alignSelf: "center",
|
|
916
|
+
},
|
|
917
|
+
iconTintColor: color?.error,
|
|
918
|
+
},
|
|
877
919
|
dateStyles: {
|
|
878
920
|
containerStyle: {
|
|
879
921
|
paddingTop: spacing.padding.p2,
|
|
@@ -951,6 +993,7 @@ export const getMessageListStylesDark = (
|
|
|
951
993
|
padding: spacing.padding.p1,
|
|
952
994
|
paddingBottom: spacing.padding.p0,
|
|
953
995
|
borderRadius: spacing.radius.r3,
|
|
996
|
+
overflow: "hidden",
|
|
954
997
|
},
|
|
955
998
|
imageStyle: {
|
|
956
999
|
borderRadius: spacing.radius.r2,
|
|
@@ -191,6 +191,9 @@ export class CometChatUIEventHandler {
|
|
|
191
191
|
case listener._eventListener?.onAIAssistantMessageReceived?.name:
|
|
192
192
|
listener._eventListener?.onAIAssistantMessageReceived?.(param);
|
|
193
193
|
break;
|
|
194
|
+
case listener._eventListener?.onMessageModerated?.name:
|
|
195
|
+
listener._eventListener?.onMessageModerated?.(param);
|
|
196
|
+
break;
|
|
194
197
|
}
|
|
195
198
|
});
|
|
196
199
|
}
|
|
@@ -36,6 +36,7 @@ type MessageUIEvents = {
|
|
|
36
36
|
onMessageReactionRemoved?: Function;
|
|
37
37
|
onMessagesDeliveredToAll?: Function;
|
|
38
38
|
onMessagesReadByAll?: Function;
|
|
39
|
+
onMessageModerated?: Function;
|
|
39
40
|
onAIAssistantMessageReceived?: Function;
|
|
40
41
|
};
|
|
41
42
|
export class MessageUIEventListener {
|
|
@@ -65,6 +66,7 @@ export class MessageUIEventListener {
|
|
|
65
66
|
onMessageReactionRemoved?: Function = undefined;
|
|
66
67
|
onMessagesDeliveredToAll?: Function = undefined;
|
|
67
68
|
onMessagesReadByAll?: Function = undefined;
|
|
69
|
+
onMessageModerated?: Function = undefined;
|
|
68
70
|
onAIAssistantMessageReceived?: Function = undefined;
|
|
69
71
|
constructor({
|
|
70
72
|
ccMessageSent,
|
|
@@ -93,6 +95,7 @@ export class MessageUIEventListener {
|
|
|
93
95
|
onMessageReactionRemoved,
|
|
94
96
|
onMessagesDeliveredToAll,
|
|
95
97
|
onMessagesReadByAll,
|
|
98
|
+
onMessageModerated,
|
|
96
99
|
onAIAssistantMessageReceived,
|
|
97
100
|
}: MessageUIEvents) {
|
|
98
101
|
if (!isFalsy(ccMessageError)) this.ccMessageError = ccMessageError;
|
|
@@ -129,6 +132,7 @@ export class MessageUIEventListener {
|
|
|
129
132
|
this.onMessagesDeliveredToAll = onMessagesDeliveredToAll;
|
|
130
133
|
if (!isFalsy(onMessagesReadByAll)) this.onMessagesReadByAll = onMessagesReadByAll;
|
|
131
134
|
if (!isFalsy(onAIAssistantMessageReceived)) this.onAIAssistantMessageReceived = onAIAssistantMessageReceived;
|
|
135
|
+
if (!isFalsy(onMessageModerated)) this.onMessageModerated = onMessageModerated;
|
|
132
136
|
}
|
|
133
137
|
}
|
|
134
138
|
|
|
@@ -87,6 +87,9 @@ export class ListenerInitializer {
|
|
|
87
87
|
},
|
|
88
88
|
onAIAssistantMessageReceived: (message: CometChat.AIAssistantMessage) => {
|
|
89
89
|
CometChatUIEventHandler.emitMessageEvent(MessageEvents.onAIAssistantMessageReceived, message);
|
|
90
|
+
},
|
|
91
|
+
onMessageModerated: (message: CometChat.BaseMessage) => {
|
|
92
|
+
CometChatUIEventHandler.emitMessageEvent(MessageEvents.onMessageModerated, message);
|
|
90
93
|
}
|
|
91
94
|
});
|
|
92
95
|
}
|
|
@@ -24,5 +24,6 @@ export enum MessageEvents {
|
|
|
24
24
|
onCustomInteractiveMessageReceived = "onCustomInteractiveMessageReceived",
|
|
25
25
|
onMessageReactionAdded = "onMessageReactionAdded",
|
|
26
26
|
onMessageReactionRemoved = "onMessageReactionRemoved",
|
|
27
|
+
onMessageModerated = "onMessageModerated",
|
|
27
28
|
onAIAssistantMessageReceived = "onAIAssistantMessageReceived",
|
|
28
29
|
}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import Svg, { Mask, Path, G } from "react-native-svg";
|
|
2
|
+
import type { SvgProps } from "react-native-svg";
|
|
3
|
+
const SvgComponent = ({ height, width, color }: SvgProps) => (
|
|
4
|
+
<Svg
|
|
5
|
+
width={width}
|
|
6
|
+
height={height}
|
|
7
|
+
fill="none"
|
|
8
|
+
color={color}
|
|
9
|
+
viewBox="0 0 16 16"
|
|
10
|
+
>
|
|
11
|
+
<Mask
|
|
12
|
+
id="prefix__a"
|
|
13
|
+
width={16}
|
|
14
|
+
height={16}
|
|
15
|
+
x={0}
|
|
16
|
+
y={0}
|
|
17
|
+
maskUnits="userSpaceOnUse"
|
|
18
|
+
style={{
|
|
19
|
+
maskType: "alpha",
|
|
20
|
+
}}
|
|
21
|
+
>
|
|
22
|
+
<Path fill="#D9D9D9" d="M0 0h16v16H0z" />
|
|
23
|
+
</Mask>
|
|
24
|
+
<G mask="url(#prefix__a)">
|
|
25
|
+
<Path
|
|
26
|
+
fill="#F44649"
|
|
27
|
+
d="M2.283 13.667a.583.583 0 0 1-.514-.301.64.64 0 0 1-.086-.292.54.54 0 0 1 .085-.311l5.707-9.859a.6.6 0 0 1 .524-.301q.154 0 .293.073.14.074.232.228l5.707 9.859q.093.153.085.31a.64.64 0 0 1-.296.51.57.57 0 0 1-.304.084zm5.716-1.795q.229 0 .384-.155a.52.52 0 0 0 .155-.384.52.52 0 0 0-.155-.383.52.52 0 0 0-.384-.155.52.52 0 0 0-.383.155.52.52 0 0 0-.155.383q0 .229.155.384a.52.52 0 0 0 .383.155m0-1.744q.213 0 .357-.144a.48.48 0 0 0 .143-.356V7.295a.48.48 0 0 0-.143-.356.48.48 0 0 0-.357-.144.48.48 0 0 0-.356.144.48.48 0 0 0-.144.356v2.333q0 .213.144.356a.48.48 0 0 0 .357.144"
|
|
28
|
+
/>
|
|
29
|
+
</G>
|
|
30
|
+
</Svg>
|
|
31
|
+
);
|
|
32
|
+
export default SvgComponent;
|
|
@@ -310,7 +310,7 @@ import AISendButton from "./components/ai-send-button";
|
|
|
310
310
|
import AINewChatButton from "./components/ai-new-chat";
|
|
311
311
|
import AIChatHistory from "./components/ai-chat-history";
|
|
312
312
|
import AICopyOption from "./components/ai-copy-option";
|
|
313
|
-
|
|
313
|
+
import MessageBlocked from "./components/message-blocked";
|
|
314
314
|
|
|
315
315
|
/**************************************** */
|
|
316
316
|
|
|
@@ -631,4 +631,6 @@ export const ICONS = {
|
|
|
631
631
|
"ai-chat-history": AIChatHistory,
|
|
632
632
|
"ai-copy-option": AICopyOption,
|
|
633
633
|
|
|
634
|
+
"message-blocked": MessageBlocked,
|
|
635
|
+
|
|
634
636
|
} as const;
|
|
@@ -454,14 +454,16 @@
|
|
|
454
454
|
"MESSAGE_LIST_ACTION_SCOPE_CHANGED": "${byName} hat ${onName} zum ${role} ernannt",
|
|
455
455
|
"YOU_DONT_HAVE_STICKERS_YET": "Du hast noch keine Sticker.",
|
|
456
456
|
"meeting": "Besprechung",
|
|
457
|
+
"START_REPORTING": "Bericht starten",
|
|
458
|
+
"LOGOUT": "Abmelden",
|
|
459
|
+
"AI_ASSISTANTS": "KI-Assistenten",
|
|
460
|
+
"CREATE_CONVERSATION": "Konversation erstellen",
|
|
461
|
+
"EDIT_MODERATION": "Bearbeitung fehlgeschlagen. Ihre Nachricht wurde aufgrund der Moderationsrichtlinien blockiert.",
|
|
462
|
+
"BLOCKED_MODERATION":"Ihre Nachricht wurde aufgrund der Moderationsrichtlinien blockiert.",
|
|
457
463
|
"NO_CONVERSATION_HISTORY_FOUND": "Kein Gesprächsverlauf gefunden",
|
|
458
464
|
"SOMETHING_WENT_WRONG_ON_OUR_END": "Etwas ist schief gelaufen. Bitte versuchen Sie es erneut",
|
|
459
465
|
"START_A_CHAT": "Beginnen Sie einen Chat, indem Sie auf die Schaltfläche 'Neuer Chat' tippen",
|
|
460
466
|
"CHAT_HISTORY": "Chat-Verlauf",
|
|
461
467
|
"ASK_ANYTHING": "Frag etwas...",
|
|
462
|
-
"AI_ASSISTANT": "AI-Assistent"
|
|
463
|
-
"START_REPORTING": "Bericht starten",
|
|
464
|
-
"LOGOUT": "Abmelden",
|
|
465
|
-
"AI_ASSISTANTS": "KI-Assistenten",
|
|
466
|
-
"CREATE_CONVERSATION": "Konversation erstellen"
|
|
468
|
+
"AI_ASSISTANT": "AI-Assistent"
|
|
467
469
|
}
|
|
@@ -441,6 +441,7 @@
|
|
|
441
441
|
"DELETE_MESSAGE_CONFIRM":"Are you sure you want to delete this message? This action cannot be undone.",
|
|
442
442
|
"APP_CREDENTIALS" : "App Credentials",
|
|
443
443
|
"REGION": "Region",
|
|
444
|
+
"CHAT_PRIVATELY": "Chat Privately",
|
|
444
445
|
"WRONG_TEXT":"Looks like something went wrong.",
|
|
445
446
|
"WRONG_TEXT_TRY_AGAIN":"Please try again.",
|
|
446
447
|
"BLOCKED_USER_DESC": "Can't send a message as the user is blocked",
|
|
@@ -453,14 +454,16 @@
|
|
|
453
454
|
"MESSAGE_LIST_ACTION_SCOPE_CHANGED": "${byName} made ${onName} a ${role}",
|
|
454
455
|
"YOU_DONT_HAVE_STICKERS_YET": "You don’t have any stickers yet.",
|
|
455
456
|
"meeting": "Meeting",
|
|
457
|
+
"START_REPORTING": "Start Reporting",
|
|
458
|
+
"LOGOUT": "Logout",
|
|
459
|
+
"AI_ASSISTANTS": "AI Assistants",
|
|
460
|
+
"CREATE_CONVERSATION": "Create Conversation",
|
|
461
|
+
"EDIT_MODERATION": "Edit failed. Your message was blocked due to moderation policies.",
|
|
462
|
+
"BLOCKED_MODERATION":"Your message was blocked due to moderation policies.",
|
|
456
463
|
"NO_CONVERSATION_HISTORY_FOUND": "No conversation history found",
|
|
457
464
|
"SOMETHING_WENT_WRONG_ON_OUR_END": "Something went wrong on our end. Please try again.",
|
|
458
465
|
"START_A_CHAT": "Click the 'New Chat' button to start a chat.",
|
|
459
466
|
"CHAT_HISTORY": "Chat History",
|
|
460
467
|
"ASK_ANYTHING": "Ask anything...",
|
|
461
|
-
"AI_ASSISTANT": "AI Assistant"
|
|
462
|
-
"START_REPORTING": "Start Reporting",
|
|
463
|
-
"LOGOUT": "Logout",
|
|
464
|
-
"AI_ASSISTANTS": "AI Assistants",
|
|
465
|
-
"CREATE_CONVERSATION": "Create Conversation"
|
|
468
|
+
"AI_ASSISTANT": "AI Assistant"
|
|
466
469
|
}
|
|
@@ -454,14 +454,16 @@
|
|
|
454
454
|
"MESSAGE_LIST_ACTION_SCOPE_CHANGED": "${byName} hizo a ${onName} ${role}",
|
|
455
455
|
"YOU_DONT_HAVE_STICKERS_YET": "Aún no tienes ningún sticker.",
|
|
456
456
|
"meeting": "Reunión",
|
|
457
|
+
"START_REPORTING": "Iniciar informe",
|
|
458
|
+
"LOGOUT": "Cerrar sesión",
|
|
459
|
+
"AI_ASSISTANTS": "Asistentes de IA",
|
|
460
|
+
"CREATE_CONVERSATION": "Crear conversación",
|
|
461
|
+
"EDIT_MODERATION": "Edición fallida. Tu mensaje fue bloqueado debido a las políticas de moderación.",
|
|
462
|
+
"BLOCKED_MODERATION":"Tu mensaje fue bloqueado debido a las políticas de moderación.",
|
|
457
463
|
"NO_CONVERSATION_HISTORY_FOUND": "No se encontró el historial de conversaciones",
|
|
458
464
|
"SOMETHING_WENT_WRONG_ON_OUR_END": "Algo salió mal de nuestro lado. Por favor, intenta de nuevo.",
|
|
459
465
|
"START_A_CHAT": "Comienza un chat tocando el botón 'Nueva conversación'",
|
|
460
466
|
"CHAT_HISTORY": "Historial de chat",
|
|
461
467
|
"ASK_ANYTHING": "Pregunta lo que sea...",
|
|
462
|
-
"AI_ASSISTANT": "Asistente AI"
|
|
463
|
-
"START_REPORTING": "Iniciar informe",
|
|
464
|
-
"LOGOUT": "Cerrar sesión",
|
|
465
|
-
"AI_ASSISTANTS": "Asistentes de IA",
|
|
466
|
-
"CREATE_CONVERSATION": "Crear conversación"
|
|
468
|
+
"AI_ASSISTANT": "Asistente AI"
|
|
467
469
|
}
|
|
@@ -454,14 +454,16 @@
|
|
|
454
454
|
"YOU_INITIATED_GROUP_AUDIO_CALL": "Vous avez lancé un appel audio",
|
|
455
455
|
"YOU_INITIATED_GROUP_VIDEO_CALL": "Vous avez lancé un appel vidéo",
|
|
456
456
|
"meeting": "Réunion",
|
|
457
|
+
"START_REPORTING": "Commencer le rapport",
|
|
458
|
+
"LOGOUT": "Se déconnecter",
|
|
459
|
+
"AI_ASSISTANTS": "Assistants IA",
|
|
460
|
+
"CREATE_CONVERSATION": "Créer une conversation",
|
|
461
|
+
"EDIT_MODERATION": "Édition échouée. Votre message a été bloqué en raison des politiques de modération",
|
|
462
|
+
"BLOCKED_MODERATION":"Votre message a été bloqué en raison des politiques de modération.",
|
|
457
463
|
"NO_CONVERSATION_HISTORY_FOUND": "Aucun historique de conversation trouvé",
|
|
458
464
|
"SOMETHING_WENT_WRONG_ON_OUR_END": "Quelque chose a mal tourné de notre côté. Veuillez réessayer",
|
|
459
465
|
"START_A_CHAT": "Commencez un chat en appuyant sur le bouton 'Nouvelle conversation'",
|
|
460
466
|
"CHAT_HISTORY": "Historique des chats",
|
|
461
467
|
"ASK_ANYTHING": "Demandez n'importe quoi...",
|
|
462
|
-
"AI_ASSISTANT": "Assistant IA"
|
|
463
|
-
"START_REPORTING": "Commencer le rapport",
|
|
464
|
-
"LOGOUT": "Se déconnecter",
|
|
465
|
-
"AI_ASSISTANTS": "Assistants IA",
|
|
466
|
-
"CREATE_CONVERSATION": "Créer une conversation"
|
|
468
|
+
"AI_ASSISTANT": "Assistant IA"
|
|
467
469
|
}
|
|
@@ -441,6 +441,7 @@
|
|
|
441
441
|
"DELETE_MESSAGE_CONFIRM": "क्या आप वाकई इस संदेश को हटाना चाहते हैं? इस क्रिया को पूर्ववत नहीं किया जा सकता।",
|
|
442
442
|
"APP_CREDENTIALS" : "ऐप क्रेडेंशियल्स",
|
|
443
443
|
"REGION": "क्षेत्र",
|
|
444
|
+
"CHAT_PRIVATELY": "निजी रूप से चैट करें",
|
|
444
445
|
"WRONG_TEXT":"लगता है कुछ गलत हो गया।",
|
|
445
446
|
"WRONG_TEXT_TRY_AGAIN":"कृपया पुनः प्रयास करें।",
|
|
446
447
|
"BLOCKED_USER_DESC": "संदेश नहीं भेज सकते क्योंकि उपयोगकर्ता अवरुद्ध है",
|
|
@@ -453,14 +454,16 @@
|
|
|
453
454
|
"MESSAGE_LIST_ACTION_SCOPE_CHANGED": "${byName} ने ${onName} को ${role} बनाया",
|
|
454
455
|
"YOU_DONT_HAVE_STICKERS_YET": "आपके पास अभी तक कोई स्टिकर नहीं है।",
|
|
455
456
|
"meeting": "मीटिंग",
|
|
457
|
+
"START_REPORTING": "रिपोर्ट शुरू करें",
|
|
458
|
+
"LOGOUT": "लॉगआउट करें",
|
|
459
|
+
"AI_ASSISTANTS": "एआई सहायक",
|
|
460
|
+
"CREATE_CONVERSATION": "बातचीत बनाएँ",
|
|
461
|
+
"EDIT_MODERATION": "संपादन विफल हो गया। आपका संदेश मोडरेशन नीतियों के कारण ब्लॉक कर दिया गया।",
|
|
462
|
+
"BLOCKED_MODERATION":"आपका संदेश मोडरेशन नीतियों के कारण ब्लॉक कर दिया गया।",
|
|
456
463
|
"NO_CONVERSATION_HISTORY_FOUND": "कोई बातचीत का इतिहास नहीं मिला",
|
|
457
464
|
"SOMETHING_WENT_WRONG_ON_OUR_END": "हमारी ओर से कुछ गलत हो गया। कृपया पुनः प्रयास करें।",
|
|
458
465
|
"START_A_CHAT": "'नई चैट' बटन पर टैप करके चैट शुरू करें।",
|
|
459
466
|
"CHAT_HISTORY": "चैट इतिहास",
|
|
460
467
|
"ASK_ANYTHING": "कुछ भी पूछें...",
|
|
461
|
-
"AI_ASSISTANT": "एआई सहायक"
|
|
462
|
-
"START_REPORTING": "रिपोर्ट शुरू करें",
|
|
463
|
-
"LOGOUT": "लॉगआउट करें",
|
|
464
|
-
"AI_ASSISTANTS": "एआई सहायक",
|
|
465
|
-
"CREATE_CONVERSATION": "बातचीत बनाएँ"
|
|
468
|
+
"AI_ASSISTANT": "एआई सहायक"
|
|
466
469
|
}
|
|
@@ -454,14 +454,16 @@
|
|
|
454
454
|
"YOU_INITIATED_GROUP_AUDIO_CALL": "Hanghívást kezdeményezett",
|
|
455
455
|
"YOU_INITIATED_GROUP_VIDEO_CALL": "Videohívást kezdeményezett",
|
|
456
456
|
"meeting": "Találkozó",
|
|
457
|
+
"START_REPORTING": "Jelentés indítása",
|
|
458
|
+
"LOGOUT": "Kijelentkezés",
|
|
459
|
+
"AI_ASSISTANTS": "AI asszisztensek",
|
|
460
|
+
"CREATE_CONVERSATION": "Beszélgetés létrehozása",
|
|
461
|
+
"EDIT_MODERATION": "Szerkesztés sikertelen. Üzenetét moderálási irányelvek miatt blokkolták.",
|
|
462
|
+
"BLOCKED_MODERATION":"Üzenetét moderálási",
|
|
457
463
|
"NO_CONVERSATION_HISTORY_FOUND": "Nincs beszélgetési előzmény",
|
|
458
464
|
"SOMETHING_WENT_WRONG_ON_OUR_END": "Valami hiba történt nálunk. Kérjük, próbálja újra",
|
|
459
465
|
"START_A_CHAT": "Kezdje el a csevegést a 'Új csevegés' gombra kattintva",
|
|
460
466
|
"CHAT_HISTORY": "Chat előzményei",
|
|
461
467
|
"ASK_ANYTHING": "Kérdezz bármit...",
|
|
462
|
-
"AI_ASSISTANT": "AI asszisztens"
|
|
463
|
-
"START_REPORTING": "Jelentés indítása",
|
|
464
|
-
"LOGOUT": "Kijelentkezés",
|
|
465
|
-
"AI_ASSISTANTS": "AI asszisztensek",
|
|
466
|
-
"CREATE_CONVERSATION": "Beszélgetés létrehozása"
|
|
468
|
+
"AI_ASSISTANT": "AI asszisztens"
|
|
467
469
|
}
|
|
@@ -441,6 +441,7 @@
|
|
|
441
441
|
"DELETE_MESSAGE_CONFIRM": "Sei sicuro di voler eliminare questo messaggio? Questa azione non può essere annullata.",
|
|
442
442
|
"APP_CREDENTIALS": "Credenziali app",
|
|
443
443
|
"REGION": "Regione",
|
|
444
|
+
"CHAT_PRIVATELY": "Chatta privatamente",
|
|
444
445
|
"WRONG_TEXT": "Sembra che qualcosa sia andato storto.",
|
|
445
446
|
"WRONG_TEXT_TRY_AGAIN": "Riprova.",
|
|
446
447
|
"BLOCKED_USER_DESC": "Impossibile inviare un messaggio perché l'utente è bloccato",
|
|
@@ -453,14 +454,16 @@
|
|
|
453
454
|
"MESSAGE_LIST_ACTION_SCOPE_CHANGED": "${byName} ha reso ${onName} ${role}",
|
|
454
455
|
"YOU_DONT_HAVE_STICKERS_YET": "Non hai ancora nessuno sticker.",
|
|
455
456
|
"meeting": "Riunione",
|
|
457
|
+
"START_REPORTING": "Avvia report",
|
|
458
|
+
"LOGOUT": "Esci",
|
|
459
|
+
"AI_ASSISTANTS": "Assistenti AI",
|
|
460
|
+
"CREATE_CONVERSATION": "Crea conversazione",
|
|
461
|
+
"EDIT_MODERATION": "Modifica non riuscita. Il tuo messaggio è stato bloccato a causa delle politiche di moderazione.",
|
|
462
|
+
"BLOCKED_MODERATION":"Il tuo messaggio è stato bloccato a causa delle politiche di moderazione.",
|
|
456
463
|
"NO_CONVERSATION_HISTORY_FOUND": "Nessun storico delle conversazioni trovato",
|
|
457
464
|
"SOMETHING_WENT_WRONG_ON_OUR_END": "Qualcosa è andato storto da parte nostra. Per favore, riprova.",
|
|
458
465
|
"START_A_CHAT": "Inizia una chat toccando il pulsante 'Nuova conversazione'",
|
|
459
466
|
"CHAT_HISTORY": "Cronologia delle conversazioni",
|
|
460
467
|
"ASK_ANYTHING": "Chiedi qualsiasi cosa...",
|
|
461
|
-
"AI_ASSISTANT": "Assistente AI"
|
|
462
|
-
"START_REPORTING": "Avvia report",
|
|
463
|
-
"LOGOUT": "Esci",
|
|
464
|
-
"AI_ASSISTANTS": "Assistenti AI",
|
|
465
|
-
"CREATE_CONVERSATION": "Crea conversazione"
|
|
468
|
+
"AI_ASSISTANT": "Assistente AI"
|
|
466
469
|
}
|
|
@@ -441,6 +441,7 @@
|
|
|
441
441
|
"DELETE_MESSAGE_CONFIRM": "このメッセージを削除してもよろしいですか?この操作は元に戻せません。",
|
|
442
442
|
"APP_CREDENTIALS": "アプリ資格情報",
|
|
443
443
|
"REGION": "地域",
|
|
444
|
+
"CHAT_PRIVATELY": "プライベートチャット",
|
|
444
445
|
"WRONG_TEXT": "問題が発生したようです。",
|
|
445
446
|
"WRONG_TEXT_TRY_AGAIN": "もう一度お試しください。",
|
|
446
447
|
"BLOCKED_USER_DESC": "ユーザーがブロックされているためメッセージを送信できません",
|
|
@@ -453,14 +454,16 @@
|
|
|
453
454
|
"MESSAGE_LIST_ACTION_SCOPE_CHANGED": "${byName}が${onName}を${role}にしました",
|
|
454
455
|
"YOU_DONT_HAVE_STICKERS_YET": "まだスタンプがありません。",
|
|
455
456
|
"meeting": "ミーティング",
|
|
457
|
+
"START_REPORTING": "レポートを開始",
|
|
458
|
+
"LOGOUT": "ログアウト",
|
|
459
|
+
"AI_ASSISTANTS": "AIアシスタント",
|
|
460
|
+
"CREATE_CONVERSATION": "会話を作成",
|
|
461
|
+
"EDIT_MODERATION": "編集に失敗しました。あなたのメッセージはモデレーションポリシーによりブロックされました。",
|
|
462
|
+
"BLOCKED_MODERATION":"あなたのメッセージはモデレーションポリシーによりブロックされました。",
|
|
456
463
|
"NO_CONVERSATION_HISTORY_FOUND": "チャット履歴が見つかりません",
|
|
457
464
|
"SOMETHING_WENT_WRONG_ON_OUR_END": "当社側で問題が発生しました。もう一度試してください",
|
|
458
465
|
"START_A_CHAT": "'新しいチャット' ボタンをタップしてチャットを開始します",
|
|
459
466
|
"CHAT_HISTORY": "チャット履歴",
|
|
460
467
|
"ASK_ANYTHING": "何でも聞いてください...",
|
|
461
|
-
"AI_ASSISTANT": "AIアシスタント"
|
|
462
|
-
"START_REPORTING": "レポートを開始",
|
|
463
|
-
"LOGOUT": "ログアウト",
|
|
464
|
-
"AI_ASSISTANTS": "AIアシスタント",
|
|
465
|
-
"CREATE_CONVERSATION": "会話を作成"
|
|
468
|
+
"AI_ASSISTANT": "AIアシスタント"
|
|
466
469
|
}
|
|
@@ -441,6 +441,7 @@
|
|
|
441
441
|
"DELETE_MESSAGE_CONFIRM": "이 메시지를 삭제하시겠습니까? 이 작업은 취소할 수 없습니다.",
|
|
442
442
|
"APP_CREDENTIALS": "앱 자격 증명",
|
|
443
443
|
"REGION": "지역",
|
|
444
|
+
"CHAT_PRIVATELY": "비공개 채팅",
|
|
444
445
|
"WRONG_TEXT": "문제가 발생한 것 같습니다.",
|
|
445
446
|
"WRONG_TEXT_TRY_AGAIN": "다시 시도해 주세요.",
|
|
446
447
|
"BLOCKED_USER_DESC": "사용자가 차단되어 메시지를 보낼 수 없습니다",
|
|
@@ -453,14 +454,16 @@
|
|
|
453
454
|
"MESSAGE_LIST_ACTION_SCOPE_CHANGED": "${byName}님이 ${onName}님을 ${role} 역할로 설정했습니다",
|
|
454
455
|
"YOU_DONT_HAVE_STICKERS_YET": "아직 스티커가 없습니다.",
|
|
455
456
|
"meeting": "회의",
|
|
457
|
+
"START_REPORTING": "보고 시작",
|
|
458
|
+
"LOGOUT": "로그아웃",
|
|
459
|
+
"AI_ASSISTANTS": "AI 도우미",
|
|
460
|
+
"CREATE_CONVERSATION": "대화 생성",
|
|
461
|
+
"EDIT_MODERATION": "편집 실패. 귀하의 메시지는 관리 정책으로 인해 차단되었습니다.",
|
|
462
|
+
"BLOCKED_MODERATION":"귀하의 메시지는 관리 정책으로 인해 차단되었습니다.",
|
|
456
463
|
"NO_CONVERSATION_HISTORY_FOUND": "대화 기록이 없습니다",
|
|
457
464
|
"SOMETHING_WENT_WRONG_ON_OUR_END": "우리 측에서 문제가 발생했습니다. 다시 시도해주세요",
|
|
458
465
|
"START_A_CHAT": "'새로운 채팅' 버튼을 눌러 채팅을 시작하세요",
|
|
459
466
|
"CHAT_HISTORY": "채팅 기록",
|
|
460
467
|
"ASK_ANYTHING": "무엇이든 물어보세요...",
|
|
461
|
-
"AI_ASSISTANT": "AI 어시스턴트"
|
|
462
|
-
"START_REPORTING": "보고 시작",
|
|
463
|
-
"LOGOUT": "로그아웃",
|
|
464
|
-
"AI_ASSISTANTS": "AI 도우미",
|
|
465
|
-
"CREATE_CONVERSATION": "대화 생성"
|
|
468
|
+
"AI_ASSISTANT": "AI 어시스턴트"
|
|
466
469
|
}
|
|
@@ -454,14 +454,16 @@
|
|
|
454
454
|
"YOU_INITIATED_GROUP_AUDIO_CALL": "Hai avviato una chiamata audio",
|
|
455
455
|
"YOU_INITIATED_GROUP_VIDEO_CALL": "Hai avviato una videochiamata",
|
|
456
456
|
"meeting": "Susitikimas",
|
|
457
|
+
"START_REPORTING": "Pradėti ataskaitą",
|
|
458
|
+
"LOGOUT": "Atsijungti",
|
|
459
|
+
"AI_ASSISTANTS": "DI asistentai",
|
|
460
|
+
"CREATE_CONVERSATION": "Sukurti pokalbį",
|
|
461
|
+
"EDIT_MODERATION": "Redagavimas nepavyko. Jūsų pranešimas buvo užblokuotas dėl moderavimo politikos.",
|
|
462
|
+
"BLOCKED_MODERATION": "Jūsų pranešimas buvo užblokuotas dėl moderavimo politikos.",
|
|
457
463
|
"NO_CONVERSATION_HISTORY_FOUND": "Pokalbių istorija nerasta",
|
|
458
464
|
"SOMETHING_WENT_WRONG_ON_OUR_END": "Kažkas nepavyko iš mūsų pusės. Pabandykite dar kartą.",
|
|
459
465
|
"START_A_CHAT": "Pradėkite pokalbį paspaudę „Naujas pokalbis“ mygtuką",
|
|
460
466
|
"CHAT_HISTORY": "Pokalbių istorija",
|
|
461
467
|
"ASK_ANYTHING": "Klauskite bet ko...",
|
|
462
|
-
"AI_ASSISTANT": "AI asistentas"
|
|
463
|
-
"START_REPORTING": "Pradėti ataskaitą",
|
|
464
|
-
"LOGOUT": "Atsijungti",
|
|
465
|
-
"AI_ASSISTANTS": "DI asistentai",
|
|
466
|
-
"CREATE_CONVERSATION": "Sukurti pokalbį"
|
|
468
|
+
"AI_ASSISTANT": "AI asistentas"
|
|
467
469
|
}
|
|
@@ -454,14 +454,16 @@
|
|
|
454
454
|
"YOU_INITIATED_GROUP_AUDIO_CALL": "Anda telah memulakan panggilan audio",
|
|
455
455
|
"YOU_INITIATED_GROUP_VIDEO_CALL": "Anda telah memulakan panggilan video",
|
|
456
456
|
"meeting": "Mesyuarat",
|
|
457
|
+
"START_REPORTING": "Mulakan Laporan",
|
|
458
|
+
"LOGOUT": "Log keluar",
|
|
459
|
+
"AI_ASSISTANTS": "Pembantu AI",
|
|
460
|
+
"CREATE_CONVERSATION": "Buat Perbualan",
|
|
461
|
+
"EDIT_MODERATION": "Penyuntingan gagal. Mesej anda telah disekat kerana dasar moderasi.",
|
|
462
|
+
"BLOCKED_MODERATION": "Mesej anda telah disekat kerana dasar moderasi.",
|
|
457
463
|
"NO_CONVERSATION_HISTORY_FOUND": "Tiada sejarah perbualan ditemui",
|
|
458
464
|
"SOMETHING_WENT_WRONG_ON_OUR_END": "Sesuatu yang salah berlaku di pihak kami. Sila cuba lagi.",
|
|
459
465
|
"START_A_CHAT": "Mulakan perbualan dengan mengetik butang 'Sembang Baru'",
|
|
460
466
|
"CHAT_HISTORY": "Sejarah Sembang",
|
|
461
467
|
"ASK_ANYTHING": "Tanyakan apa-apa...",
|
|
462
|
-
"AI_ASSISTANT": "Pembantu AI"
|
|
463
|
-
"START_REPORTING": "Mulakan Laporan",
|
|
464
|
-
"LOGOUT": "Log keluar",
|
|
465
|
-
"AI_ASSISTANTS": "Pembantu AI",
|
|
466
|
-
"CREATE_CONVERSATION": "Buat Perbualan"
|
|
468
|
+
"AI_ASSISTANT": "Pembantu AI"
|
|
467
469
|
}
|
|
@@ -441,6 +441,7 @@
|
|
|
441
441
|
"DELETE_MESSAGE_CONFIRM": "Weet je zeker dat je dit bericht wilt verwijderen? Deze actie kan niet ongedaan worden gemaakt.",
|
|
442
442
|
"APP_CREDENTIALS": "App-gegevens",
|
|
443
443
|
"REGION": "Regio",
|
|
444
|
+
"CHAT_PRIVATELY": "Privé chatten",
|
|
444
445
|
"WRONG_TEXT": "Het lijkt erop dat er iets mis is gegaan.",
|
|
445
446
|
"WRONG_TEXT_TRY_AGAIN": "Probeer het opnieuw.",
|
|
446
447
|
"BLOCKED_USER_DESC": "Kan geen bericht sturen omdat de gebruiker geblokkeerd is",
|
|
@@ -453,14 +454,16 @@
|
|
|
453
454
|
"MESSAGE_LIST_ACTION_SCOPE_CHANGED": "${byName} heeft ${onName} ${role} gemaakt",
|
|
454
455
|
"YOU_DONT_HAVE_STICKERS_YET": "Je hebt nog geen stickers.",
|
|
455
456
|
"meeting": "Vergadering",
|
|
457
|
+
"START_REPORTING": "Rapportage starten",
|
|
458
|
+
"LOGOUT": "Uitloggen",
|
|
459
|
+
"AI_ASSISTANTS": "AI-assistenten",
|
|
460
|
+
"CREATE_CONVERSATION": "Gesprek maken",
|
|
461
|
+
"EDIT_MODERATION": "Bewerken mislukt. Je bericht werd geblokkeerd vanwege het moderatiebeleid.",
|
|
462
|
+
"BLOCKED_MODERATION": "Je bericht werd geblokkeerd vanwege het moderatiebeleid.",
|
|
456
463
|
"NO_CONVERSATION_HISTORY_FOUND": "Geen gesprekshistorie gevonden",
|
|
457
464
|
"SOMETHING_WENT_WRONG_ON_OUR_END": "Er ging iets mis aan onze kant. Probeer het opnieuw.",
|
|
458
465
|
"START_A_CHAT": "Start een chat door op de knop 'Nieuwe chat' te tikken",
|
|
459
466
|
"CHAT_HISTORY": "Chatgeschiedenis",
|
|
460
467
|
"ASK_ANYTHING": "Vraag iets...",
|
|
461
|
-
"AI_ASSISTANT": "AI-assistent"
|
|
462
|
-
"START_REPORTING": "Rapportage starten",
|
|
463
|
-
"LOGOUT": "Uitloggen",
|
|
464
|
-
"AI_ASSISTANTS": "AI-assistenten",
|
|
465
|
-
"CREATE_CONVERSATION": "Gesprek maken"
|
|
468
|
+
"AI_ASSISTANT": "AI-assistent"
|
|
466
469
|
}
|
|
@@ -454,14 +454,16 @@
|
|
|
454
454
|
"YOU_INITIATED_GROUP_AUDIO_CALL": "Você iniciou uma chamada de áudio",
|
|
455
455
|
"YOU_INITIATED_GROUP_VIDEO_CALL": "Você iniciou uma videochamada",
|
|
456
456
|
"meeting": "Reunião",
|
|
457
|
+
"START_REPORTING": "Iniciar relatório",
|
|
458
|
+
"LOGOUT": "Sair",
|
|
459
|
+
"AI_ASSISTANTS": "Assistentes de IA",
|
|
460
|
+
"CREATE_CONVERSATION": "Criar conversa",
|
|
461
|
+
"EDIT_MODERATION": "Edição falhou. Sua mensagem foi bloqueada devido às políticas de moderação.",
|
|
462
|
+
"BLOCKED_MODERATION": "Sua mensagem foi bloqueada devido às políticas de moderação.",
|
|
457
463
|
"NO_CONVERSATION_HISTORY_FOUND": "Nenhum histórico de conversa encontrado",
|
|
458
464
|
"SOMETHING_WENT_WRONG_ON_OUR_END": "Algo deu errado da nossa parte. Por favor, tente novamente.",
|
|
459
465
|
"START_A_CHAT": "Inicie um chat tocando no botão 'Nova conversa'",
|
|
460
466
|
"CHAT_HISTORY": "Histórico de chat",
|
|
461
467
|
"ASK_ANYTHING": "Pergunte qualquer coisa...",
|
|
462
|
-
"AI_ASSISTANT": "Assistente de IA"
|
|
463
|
-
"START_REPORTING": "Iniciar relatório",
|
|
464
|
-
"LOGOUT": "Sair",
|
|
465
|
-
"AI_ASSISTANTS": "Assistentes de IA",
|
|
466
|
-
"CREATE_CONVERSATION": "Criar conversa"
|
|
468
|
+
"AI_ASSISTANT": "Assistente de IA"
|
|
467
469
|
}
|
|
@@ -454,14 +454,16 @@
|
|
|
454
454
|
"YOU_INITIATED_GROUP_AUDIO_CALL": "Вы инициировали аудиозвонок",
|
|
455
455
|
"YOU_INITIATED_GROUP_VIDEO_CALL": "Вы инициировали видеозвонок",
|
|
456
456
|
"meeting": "Встреча",
|
|
457
|
+
"START_REPORTING": "Начать отчет",
|
|
458
|
+
"LOGOUT": "Выйти",
|
|
459
|
+
"AI_ASSISTANTS": "ИИ ассистенты",
|
|
460
|
+
"CREATE_CONVERSATION": "Создать разговор",
|
|
461
|
+
"EDIT_MODERATION": "Ошибка редактирования. Ваше сообщение было заблокировано из-за политик модерации.",
|
|
462
|
+
"BLOCKED_MODERATION": "Ваше сообщение было заблокировано из-за политик модерации.",
|
|
457
463
|
"NO_CONVERSATION_HISTORY_FOUND": "История чатов не найдена",
|
|
458
464
|
"SOMETHING_WENT_WRONG_ON_OUR_END": "Что-то пошло не так с нашей стороны. Пожалуйста, попробуйте снова.",
|
|
459
465
|
"START_A_CHAT": "Начните чат, нажав кнопку 'Новый чат'",
|
|
460
466
|
"CHAT_HISTORY": "История чатов",
|
|
461
467
|
"ASK_ANYTHING": "Спрашивайте все...",
|
|
462
|
-
"AI_ASSISTANT": "AI ассистент"
|
|
463
|
-
"START_REPORTING": "Начать отчет",
|
|
464
|
-
"LOGOUT": "Выйти",
|
|
465
|
-
"AI_ASSISTANTS": "ИИ ассистенты",
|
|
466
|
-
"CREATE_CONVERSATION": "Создать разговор"
|
|
468
|
+
"AI_ASSISTANT": "AI ассистент"
|
|
467
469
|
}
|
|
@@ -454,14 +454,16 @@
|
|
|
454
454
|
"YOU_INITIATED_GROUP_AUDIO_CALL": "Du har initierat ett ljudsamtal",
|
|
455
455
|
"YOU_INITIATED_GROUP_VIDEO_CALL": "Du har initierat ett videosamtal",
|
|
456
456
|
"meeting": "Möte",
|
|
457
|
+
"START_REPORTING": "Starta rapportering",
|
|
458
|
+
"LOGOUT": "Logga ut",
|
|
459
|
+
"AI_ASSISTANTS": "AI-assistenter",
|
|
460
|
+
"CREATE_CONVERSATION": "Skapa konversation",
|
|
461
|
+
"EDIT_MODERATION": "Redigering misslyckades. Ditt meddelande blockerades på grund av modereringspolicyer.",
|
|
462
|
+
"BLOCKED_MODERATION": "Ditt meddelande blockerades på grund av modereringspolicyer.",
|
|
457
463
|
"NO_CONVERSATION_HISTORY_FOUND": "Ingen konversationshistorik hittades",
|
|
458
464
|
"SOMETHING_WENT_WRONG_ON_OUR_END": "Något gick fel hos oss. Försök igen.",
|
|
459
465
|
"START_A_CHAT": "Starta en chatt genom att trycka på knappen 'Ny chatt'",
|
|
460
466
|
"CHAT_HISTORY": "Chattens historik",
|
|
461
467
|
"ASK_ANYTHING": "Fråga vad som helst...",
|
|
462
|
-
"AI_ASSISTANT": "AI-assistent"
|
|
463
|
-
"START_REPORTING": "Starta rapportering",
|
|
464
|
-
"LOGOUT": "Logga ut",
|
|
465
|
-
"AI_ASSISTANTS": "AI-assistenter",
|
|
466
|
-
"CREATE_CONVERSATION": "Skapa konversation"
|
|
468
|
+
"AI_ASSISTANT": "AI-assistent"
|
|
467
469
|
}
|
|
@@ -441,6 +441,7 @@
|
|
|
441
441
|
"DELETE_MESSAGE_CONFIRM": "Bu mesajı silmek istediğinizden emin misiniz? Bu işlem geri alınamaz.",
|
|
442
442
|
"APP_CREDENTIALS": "Uygulama Kimlik Bilgileri",
|
|
443
443
|
"REGION": "Bölge",
|
|
444
|
+
"CHAT_PRIVATELY": "Özel Sohbet",
|
|
444
445
|
"WRONG_TEXT": "Bir şeyler yanlış gitti gibi görünüyor.",
|
|
445
446
|
"WRONG_TEXT_TRY_AGAIN": "Lütfen tekrar deneyin.",
|
|
446
447
|
"BLOCKED_USER_DESC": "Kullanıcı engellendiği için mesaj gönderilemiyor",
|
|
@@ -453,14 +454,16 @@
|
|
|
453
454
|
"MESSAGE_LIST_ACTION_SCOPE_CHANGED": "${byName}, ${onName} kullanıcısını ${role} yaptı",
|
|
454
455
|
"YOU_DONT_HAVE_STICKERS_YET": "Henüz hiç çıkartman yok.",
|
|
455
456
|
"meeting": "Toplantı",
|
|
457
|
+
"START_REPORTING": "Raporlamayı başlat",
|
|
458
|
+
"LOGOUT": "Çıkış Yap",
|
|
459
|
+
"AI_ASSISTANTS": "Yapay Zekâ Asistanları",
|
|
460
|
+
"CREATE_CONVERSATION": "Konuşma oluştur",
|
|
461
|
+
"EDIT_MODERATION": "Düzenleme başarısız oldu. Mesajınız moderasyon politikaları nedeniyle engellendi.",
|
|
462
|
+
"BLOCKED_MODERATION": "Mesajınız moderasyon politikaları nedeniyle engellendi.",
|
|
456
463
|
"NO_CONVERSATION_HISTORY_FOUND": "Konuşma geçmişi bulunamadı.",
|
|
457
464
|
"SOMETHING_WENT_WRONG_ON_OUR_END": "Bizim tarafımızda bir sorun oluştu. Lütfen tekrar deneyin.",
|
|
458
465
|
"START_A_CHAT": "'Yeni Sohbet' butonuna tıklayarak sohbet başlatın.",
|
|
459
466
|
"CHAT_HISTORY": "Sohbet Geçmişi",
|
|
460
467
|
"ASK_ANYTHING": "Herhangi bir şey sorun...",
|
|
461
|
-
"AI_ASSISTANT": "AI Asistanı"
|
|
462
|
-
"START_REPORTING": "Raporlamayı başlat",
|
|
463
|
-
"LOGOUT": "Çıkış Yap",
|
|
464
|
-
"AI_ASSISTANTS": "Yapay Zekâ Asistanları",
|
|
465
|
-
"CREATE_CONVERSATION": "Konuşma oluştur"
|
|
468
|
+
"AI_ASSISTANT": "AI Asistanı"
|
|
466
469
|
}
|
|
@@ -454,14 +454,16 @@
|
|
|
454
454
|
"YOU_INITIATED_GROUP_AUDIO_CALL": "你已经发起了语音通话",
|
|
455
455
|
"YOU_INITIATED_GROUP_VIDEO_CALL": "你发起了视频通话",
|
|
456
456
|
"meeting": "会议",
|
|
457
|
+
"START_REPORTING": "开始报告",
|
|
458
|
+
"LOGOUT": "退出登录",
|
|
459
|
+
"AI_ASSISTANTS": "AI 助手",
|
|
460
|
+
"CREATE_CONVERSATION": "创建对话",
|
|
461
|
+
"EDIT_MODERATION": "编辑失败。您的消息因 moderation 政策而被屏蔽。",
|
|
462
|
+
"BLOCKED_MODERATION": "您的消息因 moderation 政策而被屏蔽。",
|
|
457
463
|
"NO_CONVERSATION_HISTORY_FOUND": "找不到对话历史",
|
|
458
464
|
"SOMETHING_WENT_WRONG_ON_OUR_END": "我们这边出了点问题,请重试",
|
|
459
465
|
"START_A_CHAT": "通过点击“新聊天”按钮开始聊天",
|
|
460
466
|
"CHAT_HISTORY": "聊天记录",
|
|
461
467
|
"ASK_ANYTHING": "提问任何问题...",
|
|
462
|
-
"AI_ASSISTANT": "AI 助手"
|
|
463
|
-
"START_REPORTING": "开始报告",
|
|
464
|
-
"LOGOUT": "退出登录",
|
|
465
|
-
"AI_ASSISTANTS": "AI 助手",
|
|
466
|
-
"CREATE_CONVERSATION": "创建对话"
|
|
468
|
+
"AI_ASSISTANT": "AI 助手"
|
|
467
469
|
}
|
|
@@ -454,14 +454,16 @@
|
|
|
454
454
|
"YOU_INITIATED_GROUP_AUDIO_CALL": "您已啟動音訊通話",
|
|
455
455
|
"YOU_INITIATED_GROUP_VIDEO_CALL": "您已啟動視訊通話",
|
|
456
456
|
"meeting": "會議",
|
|
457
|
+
"START_REPORTING": "開始報告",
|
|
458
|
+
"LOGOUT": "登出",
|
|
459
|
+
"AI_ASSISTANTS": "AI 助手",
|
|
460
|
+
"CREATE_CONVERSATION": "建立對話",
|
|
461
|
+
"EDIT_MODERATION": "編輯失敗。您的訊息因為管理政策被封鎖。",
|
|
462
|
+
"BLOCKED_MODERATION": "您的訊息因為管理政策被封鎖。",
|
|
457
463
|
"NO_CONVERSATION_HISTORY_FOUND": "找不到對話歷史",
|
|
458
464
|
"SOMETHING_WENT_WRONG_ON_OUR_END": "我們這邊出了點問題,請重試",
|
|
459
465
|
"START_A_CHAT": "點擊“新聊天”按鈕開始聊天",
|
|
460
466
|
"CHAT_HISTORY": "聊天記錄",
|
|
461
467
|
"ASK_ANYTHING": "提問任何問題...",
|
|
462
|
-
"AI_ASSISTANT": "AI 助手"
|
|
463
|
-
"START_REPORTING": "開始報告",
|
|
464
|
-
"LOGOUT": "登出",
|
|
465
|
-
"AI_ASSISTANTS": "AI 助手",
|
|
466
|
-
"CREATE_CONVERSATION": "建立對話"
|
|
468
|
+
"AI_ASSISTANT": "AI 助手"
|
|
467
469
|
}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { MessageReceipt } from "../constants/UIKitConstants";
|
|
2
|
+
import { CometChat } from "@cometchat/chat-sdk-react-native";
|
|
3
|
+
import { getModerationStatus } from "./MessageUtils";
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* Utility helper for deriving a message receipt status from a BaseMessage instance.
|
|
7
|
+
*/
|
|
8
|
+
export const MessageReceiptUtils = {
|
|
9
|
+
getReceiptStatus(message: CometChat.BaseMessage | undefined): MessageReceipt {
|
|
10
|
+
if (!message) return MessageReceipt.WAIT;
|
|
11
|
+
|
|
12
|
+
// Moderation status (if available)
|
|
13
|
+
const moderationStatus = getModerationStatus(message);
|
|
14
|
+
if (moderationStatus === "disapproved") return MessageReceipt.ERROR;
|
|
15
|
+
if (moderationStatus === "pending") return MessageReceipt.WAIT;
|
|
16
|
+
|
|
17
|
+
// Explicit error markers
|
|
18
|
+
const hasError = (message as any)?.error || (message as any)?.metadata?.error;
|
|
19
|
+
if (hasError) return MessageReceipt.ERROR;
|
|
20
|
+
|
|
21
|
+
// Deleted messages treated as error for receipts
|
|
22
|
+
if ((message as any)?.deletedAt) return MessageReceipt.ERROR;
|
|
23
|
+
|
|
24
|
+
if ((message as any)?.readAt) return MessageReceipt.READ;
|
|
25
|
+
if ((message as any)?.deliveredAt) return MessageReceipt.DELIVERED;
|
|
26
|
+
if ((message as any)?.sentAt) return MessageReceipt.SENT;
|
|
27
|
+
|
|
28
|
+
return MessageReceipt.WAIT;
|
|
29
|
+
},
|
|
30
|
+
};
|
|
31
|
+
|
|
32
|
+
export default MessageReceiptUtils;
|
|
@@ -12,11 +12,13 @@ import { ChatConfigurator } from "../framework";
|
|
|
12
12
|
import { Icon, IconName } from "../icons/Icon";
|
|
13
13
|
import { CometChatMessageTemplate } from "../modals";
|
|
14
14
|
import { CometChatMessageBubble } from "../views/CometChatMessageBubble";
|
|
15
|
-
import { BubbleStyles, CometChatTheme } from "../../theme/type";
|
|
15
|
+
import { BubbleStyles, CometChatTheme, OutgoingBubbleStyles } from "../../theme/type";
|
|
16
16
|
import { CometChatUIKit } from "../CometChatUiKit";
|
|
17
17
|
import { deepMerge } from "../helper/helperFunctions";
|
|
18
18
|
import { CometChatDate } from "../views/CometChatDate";
|
|
19
19
|
import { CometChatAvatar, CometChatReceipt } from "../views";
|
|
20
|
+
import { useCometChatTranslation } from "../resources/CometChatLocalizeNew";
|
|
21
|
+
import { useTheme } from "../../theme";
|
|
20
22
|
|
|
21
23
|
type MessageViewParamsType = {
|
|
22
24
|
message: CometChat.BaseMessage;
|
|
@@ -282,6 +284,8 @@ export const MessageUtils = {
|
|
|
282
284
|
avatarVisibility,
|
|
283
285
|
} = params;
|
|
284
286
|
const templatesMap = getTemplatesMap(templates!);
|
|
287
|
+
const baseStyle = getBubbleStyle(message, theme);
|
|
288
|
+
|
|
285
289
|
let hasTemplate = templatesMap.get(`${message.getCategory()}_${message.getType()}`);
|
|
286
290
|
if (templates!.length > 0) {
|
|
287
291
|
let customTemplate = templates!.find(
|
|
@@ -291,7 +295,24 @@ export const MessageUtils = {
|
|
|
291
295
|
if (customTemplate) hasTemplate = customTemplate;
|
|
292
296
|
}
|
|
293
297
|
|
|
294
|
-
|
|
298
|
+
// Only show moderation bottom view for outgoing disapproved messages
|
|
299
|
+
const moderationStatus = getModerationStatus(message);
|
|
300
|
+
const isOutgoing = message.getSender()?.getUid() === CometChatUIKit.loggedInUser?.getUid();
|
|
301
|
+
const styleForThisMessage =
|
|
302
|
+
isOutgoing && moderationStatus === "disapproved"
|
|
303
|
+
? deepMerge(baseStyle, {
|
|
304
|
+
containerStyle: {
|
|
305
|
+
borderBottomLeftRadius: 0,
|
|
306
|
+
borderBottomRightRadius: 0,
|
|
307
|
+
overflow: "hidden",
|
|
308
|
+
},
|
|
309
|
+
})
|
|
310
|
+
: baseStyle;
|
|
311
|
+
|
|
312
|
+
const DefaultModerationBottomView =
|
|
313
|
+
isOutgoing && moderationStatus === "disapproved" ? (
|
|
314
|
+
<ModerationBottomView status={moderationStatus} />
|
|
315
|
+
) : undefined;
|
|
295
316
|
|
|
296
317
|
return (
|
|
297
318
|
<CometChatMessageBubble
|
|
@@ -309,12 +330,15 @@ export const MessageUtils = {
|
|
|
309
330
|
HeaderView={
|
|
310
331
|
message.getReceiverType() === "group" ? getHeaderView(message, theme) : undefined
|
|
311
332
|
}
|
|
312
|
-
BottomView={
|
|
333
|
+
BottomView={
|
|
334
|
+
DefaultModerationBottomView ||
|
|
335
|
+
(hasTemplate?.BottomView && hasTemplate?.BottomView(message, alignment!))
|
|
336
|
+
}
|
|
313
337
|
StatusInfoView={
|
|
314
338
|
(hasTemplate?.StatusInfoView && hasTemplate!.StatusInfoView(message, alignment!)) ||
|
|
315
339
|
getStatusInfoView(message, theme, receiptsVisibility, datePattern)
|
|
316
340
|
}
|
|
317
|
-
style={
|
|
341
|
+
style={styleForThisMessage}
|
|
318
342
|
/>
|
|
319
343
|
);
|
|
320
344
|
},
|
|
@@ -349,3 +373,82 @@ export const getMessagePreviewInternal = (
|
|
|
349
373
|
</>
|
|
350
374
|
);
|
|
351
375
|
};
|
|
376
|
+
|
|
377
|
+
export const getModerationStatus = (message: CometChat.BaseMessage | any): string => {
|
|
378
|
+
if (message?.getModerationStatus) {
|
|
379
|
+
try {
|
|
380
|
+
return message.getModerationStatus();
|
|
381
|
+
} catch (e) {
|
|
382
|
+
console.log("🚀 ~ getModerationStatus ~ e:", e);
|
|
383
|
+
}
|
|
384
|
+
}
|
|
385
|
+
const rawStatus =
|
|
386
|
+
message?.getData?.()?.moderation?.status ||
|
|
387
|
+
message?.getData?.()?.metaData?.moderation?.status ||
|
|
388
|
+
message?.data?.moderation?.status ||
|
|
389
|
+
message?.data?.metaData?.moderation?.status ||
|
|
390
|
+
message?.moderationStatus;
|
|
391
|
+
if (!rawStatus) return "unmoderated";
|
|
392
|
+
return String(rawStatus);
|
|
393
|
+
};
|
|
394
|
+
|
|
395
|
+
export const ModerationBottomView = ({
|
|
396
|
+
status,
|
|
397
|
+
moderationStyle,
|
|
398
|
+
}: {
|
|
399
|
+
status: string;
|
|
400
|
+
moderationStyle?: OutgoingBubbleStyles["moderationStyle"];
|
|
401
|
+
}) => {
|
|
402
|
+
const { t } = useCometChatTranslation();
|
|
403
|
+
const theme = useTheme();
|
|
404
|
+
if (status !== "disapproved") return null;
|
|
405
|
+
|
|
406
|
+
const bubblePadH =
|
|
407
|
+
theme.messageListStyles.outgoingMessageBubbleStyles?.containerStyle?.paddingHorizontal ??
|
|
408
|
+
theme.spacing?.spacing?.s3 ?? 12;
|
|
409
|
+
|
|
410
|
+
const bubblePadB =
|
|
411
|
+
theme.messageListStyles.outgoingMessageBubbleStyles?.containerStyle?.paddingBottom ?? 0;
|
|
412
|
+
|
|
413
|
+
const bubbleRadius =
|
|
414
|
+
theme.messageListStyles.outgoingMessageBubbleStyles?.containerStyle?.borderRadius ?? 8;
|
|
415
|
+
|
|
416
|
+
const themeModerationStyle =
|
|
417
|
+
theme.messageListStyles.outgoingMessageBubbleStyles.moderationStyle || {};
|
|
418
|
+
|
|
419
|
+
const effective = deepMerge(themeModerationStyle, moderationStyle || {});
|
|
420
|
+
|
|
421
|
+
return (
|
|
422
|
+
<View
|
|
423
|
+
style={[
|
|
424
|
+
{
|
|
425
|
+
marginHorizontal: -bubblePadH,
|
|
426
|
+
marginBottom: -bubblePadB,
|
|
427
|
+
borderTopLeftRadius: 0,
|
|
428
|
+
borderTopRightRadius: 0,
|
|
429
|
+
borderBottomLeftRadius: bubbleRadius,
|
|
430
|
+
borderBottomRightRadius: bubbleRadius,
|
|
431
|
+
flexDirection: "row",
|
|
432
|
+
alignItems: "center",
|
|
433
|
+
},
|
|
434
|
+
effective?.containerStyle,
|
|
435
|
+
]}
|
|
436
|
+
>
|
|
437
|
+
<Icon
|
|
438
|
+
name="message-blocked"
|
|
439
|
+
color={effective?.iconTintColor}
|
|
440
|
+
containerStyle={{ paddingLeft: 12, paddingRight: 4, alignSelf: "stretch" }}
|
|
441
|
+
/>
|
|
442
|
+
<Text
|
|
443
|
+
numberOfLines={2}
|
|
444
|
+
style={[
|
|
445
|
+
effective?.textStyle,
|
|
446
|
+
]}
|
|
447
|
+
>
|
|
448
|
+
{t("BLOCKED_MODERATION")}
|
|
449
|
+
</Text>
|
|
450
|
+
</View>
|
|
451
|
+
);
|
|
452
|
+
};
|
|
453
|
+
|
|
454
|
+
|
package/src/theme/provider.tsx
CHANGED
|
@@ -73,7 +73,7 @@ export const CometChatThemeProvider = ({
|
|
|
73
73
|
mergedTheme.color as CometChatTheme["color"],
|
|
74
74
|
mergedTheme.typography as CometChatTheme["typography"]
|
|
75
75
|
);
|
|
76
|
-
return deepMerge(defaultLightThemeWithOverridesApplied,
|
|
76
|
+
return deepMerge(defaultLightThemeWithOverridesApplied, mergedTheme);
|
|
77
77
|
}
|
|
78
78
|
return parentProviderTheme.light;
|
|
79
79
|
}, [light, parentProviderTheme.light]);
|
|
@@ -97,7 +97,7 @@ export const CometChatThemeProvider = ({
|
|
|
97
97
|
mergedTheme.color as CometChatTheme["color"],
|
|
98
98
|
mergedTheme.typography as CometChatTheme["typography"]
|
|
99
99
|
);
|
|
100
|
-
return deepMerge(defaultDarkThemeWithOverridesApplied,
|
|
100
|
+
return deepMerge(defaultDarkThemeWithOverridesApplied, mergedTheme);
|
|
101
101
|
}
|
|
102
102
|
return parentProviderTheme.dark;
|
|
103
103
|
}, [dark, parentProviderTheme.dark]);
|
package/src/theme/type.ts
CHANGED
|
@@ -47,6 +47,14 @@ export type BubbleStyles = {
|
|
|
47
47
|
linkPreviewBubbleStyles?: DeepPartial<CometChatTheme["linkPreviewBubbleStyles"]>;
|
|
48
48
|
};
|
|
49
49
|
|
|
50
|
+
export type OutgoingBubbleStyles = Omit<BubbleStyles, 'assistantBubbleStyles'> & {
|
|
51
|
+
moderationStyle?: {
|
|
52
|
+
containerStyle?: ViewStyle;
|
|
53
|
+
textStyle?: TextStyle;
|
|
54
|
+
iconTintColor?: ColorValue;
|
|
55
|
+
};
|
|
56
|
+
};
|
|
57
|
+
|
|
50
58
|
export type ActionSheetStyle = {
|
|
51
59
|
optionsItemStyle: {
|
|
52
60
|
containerStyle: ViewStyle;
|
|
@@ -256,6 +264,11 @@ export interface CometChatTheme {
|
|
|
256
264
|
imageStyle: ImageStyle;
|
|
257
265
|
innerContainerStyle: ViewStyle;
|
|
258
266
|
dateReceiptContainerStyle: ViewStyle;
|
|
267
|
+
moderationStyle?: {
|
|
268
|
+
containerStyle?: ViewStyle;
|
|
269
|
+
textStyle?: TextStyle;
|
|
270
|
+
iconTintColor?: ColorValue;
|
|
271
|
+
};
|
|
259
272
|
};
|
|
260
273
|
threadHeaderStyles: {
|
|
261
274
|
containerStyle: ViewStyle;
|
|
@@ -279,6 +292,11 @@ export interface CometChatTheme {
|
|
|
279
292
|
playIconStyle?: ImageStyle;
|
|
280
293
|
playIconContainerStyle?: ViewStyle;
|
|
281
294
|
placeholderImage?: ImageSourcePropType;
|
|
295
|
+
moderationStyle?: {
|
|
296
|
+
containerStyle?: ViewStyle;
|
|
297
|
+
textStyle?: TextStyle;
|
|
298
|
+
iconTintColor?: ColorValue;
|
|
299
|
+
};
|
|
282
300
|
};
|
|
283
301
|
audioBubbleStyles?: {
|
|
284
302
|
threadedMessageStyle: CometChatTheme["threadedMessageStyles"];
|
|
@@ -438,7 +456,7 @@ export interface CometChatTheme {
|
|
|
438
456
|
};
|
|
439
457
|
dateSeparatorStyle?: DateSeparatorStyle;
|
|
440
458
|
incomingMessageBubbleStyles: DeepPartial<BubbleStyles>;
|
|
441
|
-
outgoingMessageBubbleStyles: DeepPartial<
|
|
459
|
+
outgoingMessageBubbleStyles: DeepPartial<OutgoingBubbleStyles>;
|
|
442
460
|
groupActionBubbleStyles: DeepPartial<CometChatTheme["groupActionBubbleStyles"]>;
|
|
443
461
|
callActionBubbleStyles: DeepPartial<CallActionBubbleStyles>;
|
|
444
462
|
messageInformationStyles: DeepPartial<CometChatTheme["messageInformationStyles"]>;
|