stream-chat-react-native-core 5.20.0-beta.5 → 5.20.1-beta.1
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/lib/commonjs/components/Message/MessageSimple/utils/generateMarkdownText.js +32 -0
- package/lib/commonjs/components/Message/MessageSimple/utils/generateMarkdownText.js.map +1 -0
- package/lib/commonjs/components/Message/MessageSimple/utils/parseLinks.js +3 -3
- package/lib/commonjs/components/Message/MessageSimple/utils/parseLinks.js.map +1 -1
- package/lib/commonjs/components/Message/MessageSimple/utils/renderText.js +24 -41
- package/lib/commonjs/components/Message/MessageSimple/utils/renderText.js.map +1 -1
- package/lib/commonjs/components/Reply/Reply.js +4 -4
- package/lib/commonjs/components/Reply/Reply.js.map +1 -1
- package/lib/commonjs/i18n/fr.json +22 -22
- package/lib/commonjs/i18n/hi.json +22 -22
- package/lib/commonjs/i18n/it.json +22 -22
- package/lib/commonjs/i18n/nl.json +22 -22
- package/lib/commonjs/i18n/ru.json +23 -23
- package/lib/commonjs/i18n/tr.json +23 -23
- package/lib/commonjs/utils/utils.js +2 -1
- package/lib/commonjs/utils/utils.js.map +1 -1
- package/lib/commonjs/version.json +1 -1
- package/lib/module/components/Message/MessageSimple/utils/generateMarkdownText.js +32 -0
- package/lib/module/components/Message/MessageSimple/utils/generateMarkdownText.js.map +1 -0
- package/lib/module/components/Message/MessageSimple/utils/parseLinks.js +3 -3
- package/lib/module/components/Message/MessageSimple/utils/parseLinks.js.map +1 -1
- package/lib/module/components/Message/MessageSimple/utils/renderText.js +24 -41
- package/lib/module/components/Message/MessageSimple/utils/renderText.js.map +1 -1
- package/lib/module/components/Reply/Reply.js +4 -4
- package/lib/module/components/Reply/Reply.js.map +1 -1
- package/lib/module/i18n/fr.json +22 -22
- package/lib/module/i18n/hi.json +22 -22
- package/lib/module/i18n/it.json +22 -22
- package/lib/module/i18n/nl.json +22 -22
- package/lib/module/i18n/ru.json +23 -23
- package/lib/module/i18n/tr.json +23 -23
- package/lib/module/utils/utils.js +2 -1
- package/lib/module/utils/utils.js.map +1 -1
- package/lib/module/version.json +1 -1
- package/lib/typescript/components/Message/MessageSimple/utils/generateMarkdownText.d.ts +3 -0
- package/lib/typescript/components/Message/MessageSimple/utils/renderText.d.ts +1 -1
- package/lib/typescript/i18n/fr.json +22 -22
- package/lib/typescript/i18n/hi.json +22 -22
- package/lib/typescript/i18n/it.json +22 -22
- package/lib/typescript/i18n/nl.json +22 -22
- package/lib/typescript/i18n/ru.json +23 -23
- package/lib/typescript/i18n/tr.json +23 -23
- package/package.json +1 -1
- package/src/components/Message/MessageSimple/utils/generateMarkdownText.ts +43 -0
- package/src/components/Message/MessageSimple/utils/parseLinks.ts +5 -5
- package/src/components/Message/MessageSimple/utils/renderText.tsx +10 -26
- package/src/components/Reply/Reply.tsx +16 -14
- package/src/i18n/fr.json +22 -22
- package/src/i18n/hi.json +22 -22
- package/src/i18n/it.json +22 -22
- package/src/i18n/nl.json +22 -22
- package/src/i18n/ru.json +23 -23
- package/src/i18n/tr.json +23 -23
- package/src/utils/utils.ts +2 -1
- package/src/version.json +1 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
|
-
"1 Reply": "
|
|
3
|
-
"1 Thread Reply": "
|
|
2
|
+
"1 Reply": "",
|
|
3
|
+
"1 Thread Reply": "",
|
|
4
4
|
"Allow access to your Gallery": "",
|
|
5
5
|
"Also send to channel": "",
|
|
6
6
|
"Are you sure you want to permanently delete this message?": "",
|
|
@@ -14,42 +14,42 @@
|
|
|
14
14
|
"Edit Message": "",
|
|
15
15
|
"Editing Message": "",
|
|
16
16
|
"Emoji matching": "इमोजी मिलान",
|
|
17
|
-
"Empty message...": "
|
|
17
|
+
"Empty message...": "",
|
|
18
18
|
"Error loading": "लोड होने मे त्रुटि",
|
|
19
|
-
"Error loading channel list...": "
|
|
20
|
-
"Error loading messages for this channel...": "
|
|
21
|
-
"Error while loading, please reload/refresh": "
|
|
22
|
-
"File type not supported": "
|
|
19
|
+
"Error loading channel list...": "",
|
|
20
|
+
"Error loading messages for this channel...": "",
|
|
21
|
+
"Error while loading, please reload/refresh": "",
|
|
22
|
+
"File type not supported": "",
|
|
23
23
|
"Flag": "",
|
|
24
24
|
"Flag Message": "",
|
|
25
25
|
"Flag action failed either due to a network issue or the message is already flagged": "",
|
|
26
26
|
"Instant Commands": "त्वरित कमांड",
|
|
27
27
|
"Links are disabled": "",
|
|
28
|
-
"Loading channels...": "
|
|
29
|
-
"Loading messages...": "
|
|
30
|
-
"Loading...": "
|
|
31
|
-
"Message Reactions": "",
|
|
28
|
+
"Loading channels...": "",
|
|
29
|
+
"Loading messages...": "",
|
|
30
|
+
"Loading...": "",
|
|
31
|
+
"Message Reactions": "संदेश प्रतिक्रियाएँ",
|
|
32
32
|
"Message deleted": "मैसेज हटा दिया गया",
|
|
33
33
|
"Message flagged": "",
|
|
34
34
|
"Mute User": "",
|
|
35
35
|
"Not supported": "समर्थित नहीं",
|
|
36
|
-
"Nothing yet...": "
|
|
36
|
+
"Nothing yet...": "",
|
|
37
37
|
"Ok": "",
|
|
38
38
|
"Only visible to you": "",
|
|
39
39
|
"Photo": "",
|
|
40
40
|
"Photos and Videos": "",
|
|
41
41
|
"Pin to Conversation": "",
|
|
42
|
-
"Pinned by": "
|
|
42
|
+
"Pinned by": "",
|
|
43
43
|
"Please enable access to your photos and videos so you can share them.": "",
|
|
44
44
|
"Please select a channel first": "",
|
|
45
|
-
"Reconnecting...": "
|
|
45
|
+
"Reconnecting...": "",
|
|
46
46
|
"Reply": "",
|
|
47
47
|
"Reply to Message": "",
|
|
48
48
|
"Resend": "",
|
|
49
|
-
"Search GIFs": "
|
|
50
|
-
"Send a message": "
|
|
49
|
+
"Search GIFs": "",
|
|
50
|
+
"Send a message": "",
|
|
51
51
|
"Sending links is not allowed in this conversation": "",
|
|
52
|
-
"Slow mode ON": "
|
|
52
|
+
"Slow mode ON": "",
|
|
53
53
|
"The message has been reported to a moderator.": "",
|
|
54
54
|
"Thread Reply": "",
|
|
55
55
|
"Unblock User": "",
|
|
@@ -58,12 +58,12 @@
|
|
|
58
58
|
"Unpin from Conversation": "",
|
|
59
59
|
"Unread Messages": "",
|
|
60
60
|
"Video": "",
|
|
61
|
-
"You": "
|
|
62
|
-
"You can't send messages in this channel": "",
|
|
61
|
+
"You": "",
|
|
62
|
+
"You can't send messages in this channel": "आप इस चैनल में संदेश नहीं भेज सकते",
|
|
63
63
|
"{{ firstUser }} and {{ nonSelfUserLength }} more are typing": "",
|
|
64
64
|
"{{ index }} of {{ photoLength }}": "",
|
|
65
|
-
"{{ replyCount }} Replies": "
|
|
66
|
-
"{{ replyCount }} Thread Replies": "
|
|
65
|
+
"{{ replyCount }} Replies": "",
|
|
66
|
+
"{{ replyCount }} Thread Replies": "",
|
|
67
67
|
"{{ user }} is typing": "",
|
|
68
|
-
"🏙 Attachment...": "
|
|
68
|
+
"🏙 Attachment...": ""
|
|
69
69
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
|
-
"1 Reply": "
|
|
3
|
-
"1 Thread Reply": "
|
|
2
|
+
"1 Reply": "",
|
|
3
|
+
"1 Thread Reply": "",
|
|
4
4
|
"Allow access to your Gallery": "",
|
|
5
5
|
"Also send to channel": "",
|
|
6
6
|
"Are you sure you want to permanently delete this message?": "",
|
|
@@ -14,42 +14,42 @@
|
|
|
14
14
|
"Edit Message": "",
|
|
15
15
|
"Editing Message": "",
|
|
16
16
|
"Emoji matching": "Abbinamento emoji",
|
|
17
|
-
"Empty message...": "
|
|
17
|
+
"Empty message...": "",
|
|
18
18
|
"Error loading": "Errore di caricamento",
|
|
19
|
-
"Error loading channel list...": "
|
|
20
|
-
"Error loading messages for this channel...": "
|
|
21
|
-
"Error while loading, please reload/refresh": "
|
|
22
|
-
"File type not supported": "
|
|
19
|
+
"Error loading channel list...": "",
|
|
20
|
+
"Error loading messages for this channel...": "",
|
|
21
|
+
"Error while loading, please reload/refresh": "",
|
|
22
|
+
"File type not supported": "",
|
|
23
23
|
"Flag": "",
|
|
24
24
|
"Flag Message": "",
|
|
25
25
|
"Flag action failed either due to a network issue or the message is already flagged": "",
|
|
26
26
|
"Instant Commands": "Comandi Istantanei",
|
|
27
27
|
"Links are disabled": "",
|
|
28
|
-
"Loading channels...": "
|
|
29
|
-
"Loading messages...": "
|
|
30
|
-
"Loading...": "
|
|
31
|
-
"Message Reactions": "",
|
|
28
|
+
"Loading channels...": "",
|
|
29
|
+
"Loading messages...": "",
|
|
30
|
+
"Loading...": "",
|
|
31
|
+
"Message Reactions": "Reazioni ai Messaggi",
|
|
32
32
|
"Message deleted": "Messaggio cancellato",
|
|
33
33
|
"Message flagged": "",
|
|
34
34
|
"Mute User": "",
|
|
35
35
|
"Not supported": "non supportato",
|
|
36
|
-
"Nothing yet...": "
|
|
36
|
+
"Nothing yet...": "",
|
|
37
37
|
"Ok": "",
|
|
38
38
|
"Only visible to you": "",
|
|
39
39
|
"Photo": "",
|
|
40
40
|
"Photos and Videos": "",
|
|
41
41
|
"Pin to Conversation": "",
|
|
42
|
-
"Pinned by": "
|
|
42
|
+
"Pinned by": "",
|
|
43
43
|
"Please enable access to your photos and videos so you can share them.": "",
|
|
44
44
|
"Please select a channel first": "",
|
|
45
|
-
"Reconnecting...": "
|
|
45
|
+
"Reconnecting...": "",
|
|
46
46
|
"Reply": "",
|
|
47
47
|
"Reply to Message": "",
|
|
48
48
|
"Resend": "",
|
|
49
|
-
"Search GIFs": "
|
|
50
|
-
"Send a message": "
|
|
49
|
+
"Search GIFs": "",
|
|
50
|
+
"Send a message": "",
|
|
51
51
|
"Sending links is not allowed in this conversation": "",
|
|
52
|
-
"Slow mode ON": "
|
|
52
|
+
"Slow mode ON": "",
|
|
53
53
|
"The message has been reported to a moderator.": "",
|
|
54
54
|
"Thread Reply": "",
|
|
55
55
|
"Unblock User": "",
|
|
@@ -58,12 +58,12 @@
|
|
|
58
58
|
"Unpin from Conversation": "",
|
|
59
59
|
"Unread Messages": "",
|
|
60
60
|
"Video": "",
|
|
61
|
-
"You": "
|
|
62
|
-
"You can't send messages in this channel": "",
|
|
61
|
+
"You": "",
|
|
62
|
+
"You can't send messages in this channel": "Non puoi inviare messaggi in questo canale",
|
|
63
63
|
"{{ firstUser }} and {{ nonSelfUserLength }} more are typing": "",
|
|
64
64
|
"{{ index }} of {{ photoLength }}": "",
|
|
65
|
-
"{{ replyCount }} Replies": "
|
|
66
|
-
"{{ replyCount }} Thread Replies": "
|
|
65
|
+
"{{ replyCount }} Replies": "",
|
|
66
|
+
"{{ replyCount }} Thread Replies": "",
|
|
67
67
|
"{{ user }} is typing": "",
|
|
68
|
-
"🏙 Attachment...": "
|
|
68
|
+
"🏙 Attachment...": ""
|
|
69
69
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
|
-
"1 Reply": "
|
|
3
|
-
"1 Thread Reply": "
|
|
2
|
+
"1 Reply": "",
|
|
3
|
+
"1 Thread Reply": "",
|
|
4
4
|
"Allow access to your Gallery": "",
|
|
5
5
|
"Also send to channel": "",
|
|
6
6
|
"Are you sure you want to permanently delete this message?": "",
|
|
@@ -14,42 +14,42 @@
|
|
|
14
14
|
"Edit Message": "",
|
|
15
15
|
"Editing Message": "",
|
|
16
16
|
"Emoji matching": "Emoji-overeenkomsten",
|
|
17
|
-
"Empty message...": "
|
|
17
|
+
"Empty message...": "",
|
|
18
18
|
"Error loading": "Probleem bij het laden",
|
|
19
|
-
"Error loading channel list...": "
|
|
20
|
-
"Error loading messages for this channel...": "
|
|
21
|
-
"Error while loading, please reload/refresh": "
|
|
22
|
-
"File type not supported": "
|
|
19
|
+
"Error loading channel list...": "",
|
|
20
|
+
"Error loading messages for this channel...": "",
|
|
21
|
+
"Error while loading, please reload/refresh": "",
|
|
22
|
+
"File type not supported": "",
|
|
23
23
|
"Flag": "",
|
|
24
24
|
"Flag Message": "",
|
|
25
25
|
"Flag action failed either due to a network issue or the message is already flagged": "",
|
|
26
26
|
"Instant Commands": "Directe Opdrachten",
|
|
27
27
|
"Links are disabled": "",
|
|
28
|
-
"Loading channels...": "
|
|
29
|
-
"Loading messages...": "
|
|
30
|
-
"Loading...": "
|
|
31
|
-
"Message Reactions": "",
|
|
28
|
+
"Loading channels...": "",
|
|
29
|
+
"Loading messages...": "",
|
|
30
|
+
"Loading...": "",
|
|
31
|
+
"Message Reactions": "Bericht Reacties",
|
|
32
32
|
"Message deleted": "Bericht verwijderd",
|
|
33
33
|
"Message flagged": "",
|
|
34
34
|
"Mute User": "",
|
|
35
35
|
"Not supported": "niet ondersteund",
|
|
36
|
-
"Nothing yet...": "
|
|
36
|
+
"Nothing yet...": "",
|
|
37
37
|
"Ok": "",
|
|
38
38
|
"Only visible to you": "",
|
|
39
39
|
"Photo": "",
|
|
40
40
|
"Photos and Videos": "",
|
|
41
41
|
"Pin to Conversation": "",
|
|
42
|
-
"Pinned by": "
|
|
42
|
+
"Pinned by": "",
|
|
43
43
|
"Please enable access to your photos and videos so you can share them.": "",
|
|
44
44
|
"Please select a channel first": "",
|
|
45
|
-
"Reconnecting...": "
|
|
45
|
+
"Reconnecting...": "",
|
|
46
46
|
"Reply": "",
|
|
47
47
|
"Reply to Message": "",
|
|
48
48
|
"Resend": "",
|
|
49
|
-
"Search GIFs": "
|
|
50
|
-
"Send a message": "
|
|
49
|
+
"Search GIFs": "",
|
|
50
|
+
"Send a message": "",
|
|
51
51
|
"Sending links is not allowed in this conversation": "",
|
|
52
|
-
"Slow mode ON": "
|
|
52
|
+
"Slow mode ON": "",
|
|
53
53
|
"The message has been reported to a moderator.": "",
|
|
54
54
|
"Thread Reply": "",
|
|
55
55
|
"Unblock User": "",
|
|
@@ -58,12 +58,12 @@
|
|
|
58
58
|
"Unpin from Conversation": "",
|
|
59
59
|
"Unread Messages": "",
|
|
60
60
|
"Video": "",
|
|
61
|
-
"You": "
|
|
62
|
-
"You can't send messages in this channel": "",
|
|
61
|
+
"You": "",
|
|
62
|
+
"You can't send messages in this channel": "Je kan geen berichten sturen in dit kanaal",
|
|
63
63
|
"{{ firstUser }} and {{ nonSelfUserLength }} more are typing": "",
|
|
64
64
|
"{{ index }} of {{ photoLength }}": "",
|
|
65
|
-
"{{ replyCount }} Replies": "
|
|
66
|
-
"{{ replyCount }} Thread Replies": "
|
|
65
|
+
"{{ replyCount }} Replies": "",
|
|
66
|
+
"{{ replyCount }} Thread Replies": "",
|
|
67
67
|
"{{ user }} is typing": "",
|
|
68
|
-
"🏙 Attachment...": "
|
|
68
|
+
"🏙 Attachment...": ""
|
|
69
69
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
|
-
"1 Reply": "
|
|
3
|
-
"1 Thread Reply": "
|
|
2
|
+
"1 Reply": "",
|
|
3
|
+
"1 Thread Reply": "",
|
|
4
4
|
"Allow access to your Gallery": "",
|
|
5
5
|
"Also send to channel": "",
|
|
6
6
|
"Are you sure you want to permanently delete this message?": "",
|
|
@@ -12,44 +12,44 @@
|
|
|
12
12
|
"Delete Message": "",
|
|
13
13
|
"Do you want to send a copy of this message to a moderator for further investigation?": "",
|
|
14
14
|
"Edit Message": "",
|
|
15
|
-
"Editing Message": "
|
|
15
|
+
"Editing Message": "",
|
|
16
16
|
"Emoji matching": "Соответствие эмодзи",
|
|
17
|
-
"Empty message...": "
|
|
17
|
+
"Empty message...": "",
|
|
18
18
|
"Error loading": "Ошибка при загрузке",
|
|
19
|
-
"Error loading channel list...": "
|
|
20
|
-
"Error loading messages for this channel...": "
|
|
21
|
-
"Error while loading, please reload/refresh": "
|
|
22
|
-
"File type not supported": "
|
|
19
|
+
"Error loading channel list...": "",
|
|
20
|
+
"Error loading messages for this channel...": "",
|
|
21
|
+
"Error while loading, please reload/refresh": "",
|
|
22
|
+
"File type not supported": "",
|
|
23
23
|
"Flag": "",
|
|
24
24
|
"Flag Message": "",
|
|
25
25
|
"Flag action failed either due to a network issue or the message is already flagged": "",
|
|
26
26
|
"Instant Commands": "Мгновенные Команды",
|
|
27
27
|
"Links are disabled": "",
|
|
28
|
-
"Loading channels...": "
|
|
29
|
-
"Loading messages...": "
|
|
30
|
-
"Loading...": "
|
|
31
|
-
"Message Reactions": "",
|
|
28
|
+
"Loading channels...": "",
|
|
29
|
+
"Loading messages...": "",
|
|
30
|
+
"Loading...": "",
|
|
31
|
+
"Message Reactions": "Сообщения Реакции",
|
|
32
32
|
"Message deleted": "Сообщение удалено",
|
|
33
33
|
"Message flagged": "",
|
|
34
34
|
"Mute User": "",
|
|
35
35
|
"Not supported": "не поддерживается",
|
|
36
|
-
"Nothing yet...": "
|
|
36
|
+
"Nothing yet...": "",
|
|
37
37
|
"Ok": "",
|
|
38
38
|
"Only visible to you": "",
|
|
39
39
|
"Photo": "",
|
|
40
40
|
"Photos and Videos": "",
|
|
41
41
|
"Pin to Conversation": "",
|
|
42
|
-
"Pinned by": "
|
|
42
|
+
"Pinned by": "",
|
|
43
43
|
"Please enable access to your photos and videos so you can share them.": "",
|
|
44
44
|
"Please select a channel first": "",
|
|
45
|
-
"Reconnecting...": "
|
|
45
|
+
"Reconnecting...": "",
|
|
46
46
|
"Reply": "",
|
|
47
47
|
"Reply to Message": "",
|
|
48
48
|
"Resend": "",
|
|
49
|
-
"Search GIFs": "
|
|
50
|
-
"Send a message": "
|
|
49
|
+
"Search GIFs": "",
|
|
50
|
+
"Send a message": "",
|
|
51
51
|
"Sending links is not allowed in this conversation": "",
|
|
52
|
-
"Slow mode ON": "
|
|
52
|
+
"Slow mode ON": "",
|
|
53
53
|
"The message has been reported to a moderator.": "",
|
|
54
54
|
"Thread Reply": "",
|
|
55
55
|
"Unblock User": "",
|
|
@@ -58,12 +58,12 @@
|
|
|
58
58
|
"Unpin from Conversation": "",
|
|
59
59
|
"Unread Messages": "",
|
|
60
60
|
"Video": "",
|
|
61
|
-
"You": "
|
|
62
|
-
"You can't send messages in this channel": "",
|
|
61
|
+
"You": "",
|
|
62
|
+
"You can't send messages in this channel": "Вы не можете отправлять сообщения в этот канал",
|
|
63
63
|
"{{ firstUser }} and {{ nonSelfUserLength }} more are typing": "",
|
|
64
64
|
"{{ index }} of {{ photoLength }}": "",
|
|
65
|
-
"{{ replyCount }} Replies": "
|
|
66
|
-
"{{ replyCount }} Thread Replies": "
|
|
65
|
+
"{{ replyCount }} Replies": "",
|
|
66
|
+
"{{ replyCount }} Thread Replies": "",
|
|
67
67
|
"{{ user }} is typing": "",
|
|
68
|
-
"🏙 Attachment...": "
|
|
68
|
+
"🏙 Attachment...": ""
|
|
69
69
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
|
-
"1 Reply": "
|
|
3
|
-
"1 Thread Reply": "
|
|
2
|
+
"1 Reply": "",
|
|
3
|
+
"1 Thread Reply": "",
|
|
4
4
|
"Allow access to your Gallery": "",
|
|
5
5
|
"Also send to channel": "",
|
|
6
6
|
"Are you sure you want to permanently delete this message?": "",
|
|
@@ -12,44 +12,44 @@
|
|
|
12
12
|
"Delete Message": "",
|
|
13
13
|
"Do you want to send a copy of this message to a moderator for further investigation?": "",
|
|
14
14
|
"Edit Message": "",
|
|
15
|
-
"Editing Message": "
|
|
15
|
+
"Editing Message": "",
|
|
16
16
|
"Emoji matching": "Emoji eşleştirme",
|
|
17
|
-
"Empty message...": "
|
|
17
|
+
"Empty message...": "",
|
|
18
18
|
"Error loading": "Yükleme hatası",
|
|
19
|
-
"Error loading channel list...": "
|
|
20
|
-
"Error loading messages for this channel...": "
|
|
21
|
-
"Error while loading, please reload/refresh": "
|
|
22
|
-
"File type not supported": "
|
|
19
|
+
"Error loading channel list...": "",
|
|
20
|
+
"Error loading messages for this channel...": "",
|
|
21
|
+
"Error while loading, please reload/refresh": "",
|
|
22
|
+
"File type not supported": "",
|
|
23
23
|
"Flag": "",
|
|
24
24
|
"Flag Message": "",
|
|
25
25
|
"Flag action failed either due to a network issue or the message is already flagged": "",
|
|
26
26
|
"Instant Commands": "Anlık Komutlar",
|
|
27
27
|
"Links are disabled": "",
|
|
28
|
-
"Loading channels...": "
|
|
29
|
-
"Loading messages...": "
|
|
30
|
-
"Loading...": "
|
|
31
|
-
"Message Reactions": "",
|
|
28
|
+
"Loading channels...": "",
|
|
29
|
+
"Loading messages...": "",
|
|
30
|
+
"Loading...": "",
|
|
31
|
+
"Message Reactions": "Mesaj Tepkileri",
|
|
32
32
|
"Message deleted": "Mesaj silindi",
|
|
33
33
|
"Message flagged": "",
|
|
34
34
|
"Mute User": "",
|
|
35
35
|
"Not supported": "Desteklenmiyor",
|
|
36
|
-
"Nothing yet...": "
|
|
36
|
+
"Nothing yet...": "",
|
|
37
37
|
"Ok": "",
|
|
38
38
|
"Only visible to you": "",
|
|
39
39
|
"Photo": "",
|
|
40
40
|
"Photos and Videos": "",
|
|
41
41
|
"Pin to Conversation": "",
|
|
42
|
-
"Pinned by": "
|
|
42
|
+
"Pinned by": "",
|
|
43
43
|
"Please enable access to your photos and videos so you can share them.": "",
|
|
44
44
|
"Please select a channel first": "",
|
|
45
|
-
"Reconnecting...": "
|
|
45
|
+
"Reconnecting...": "",
|
|
46
46
|
"Reply": "",
|
|
47
47
|
"Reply to Message": "",
|
|
48
48
|
"Resend": "",
|
|
49
|
-
"Search GIFs": "
|
|
50
|
-
"Send a message": "
|
|
49
|
+
"Search GIFs": "",
|
|
50
|
+
"Send a message": "",
|
|
51
51
|
"Sending links is not allowed in this conversation": "",
|
|
52
|
-
"Slow mode ON": "
|
|
52
|
+
"Slow mode ON": "",
|
|
53
53
|
"The message has been reported to a moderator.": "",
|
|
54
54
|
"Thread Reply": "",
|
|
55
55
|
"Unblock User": "",
|
|
@@ -58,12 +58,12 @@
|
|
|
58
58
|
"Unpin from Conversation": "",
|
|
59
59
|
"Unread Messages": "",
|
|
60
60
|
"Video": "",
|
|
61
|
-
"You": "
|
|
62
|
-
"You can't send messages in this channel": "",
|
|
61
|
+
"You": "",
|
|
62
|
+
"You can't send messages in this channel": "Bu konuşmaya mesaj gönderemezsiniz",
|
|
63
63
|
"{{ firstUser }} and {{ nonSelfUserLength }} more are typing": "",
|
|
64
64
|
"{{ index }} of {{ photoLength }}": "",
|
|
65
|
-
"{{ replyCount }} Replies": "
|
|
66
|
-
"{{ replyCount }} Thread Replies": "
|
|
65
|
+
"{{ replyCount }} Replies": "",
|
|
66
|
+
"{{ replyCount }} Thread Replies": "",
|
|
67
67
|
"{{ user }} is typing": "",
|
|
68
|
-
"🏙 Attachment...": "
|
|
68
|
+
"🏙 Attachment...": ""
|
|
69
69
|
}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "stream-chat-react-native-core",
|
|
3
3
|
"description": "The official React Native and Expo components for Stream Chat, a service for building chat applications",
|
|
4
|
-
"version": "5.20.
|
|
4
|
+
"version": "5.20.1-beta.1",
|
|
5
5
|
"author": {
|
|
6
6
|
"company": "Stream.io Inc",
|
|
7
7
|
"name": "Stream.io Inc"
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import truncate from 'lodash/truncate';
|
|
2
|
+
|
|
3
|
+
import { parseLinksFromText } from './parseLinks';
|
|
4
|
+
|
|
5
|
+
import type { DefaultStreamChatGenerics } from '../../../../types/types';
|
|
6
|
+
import type { MessageType } from '../../../MessageList/hooks/useMessageList';
|
|
7
|
+
|
|
8
|
+
export const generateMarkdownText = <
|
|
9
|
+
StreamChatGenerics extends DefaultStreamChatGenerics = DefaultStreamChatGenerics,
|
|
10
|
+
>(
|
|
11
|
+
message: MessageType<StreamChatGenerics>,
|
|
12
|
+
) => {
|
|
13
|
+
const { text } = message;
|
|
14
|
+
|
|
15
|
+
if (!text) return null;
|
|
16
|
+
|
|
17
|
+
// Trim the extra spaces from the text.
|
|
18
|
+
let resultText = text.trim();
|
|
19
|
+
|
|
20
|
+
// List of all the links present in the text.
|
|
21
|
+
const linkInfos = parseLinksFromText(resultText);
|
|
22
|
+
|
|
23
|
+
for (const linkInfo of linkInfos) {
|
|
24
|
+
const displayLink = truncate(linkInfo.raw, {
|
|
25
|
+
length: 200,
|
|
26
|
+
omission: '...',
|
|
27
|
+
});
|
|
28
|
+
// Convert raw links/emails in the text to respective markdown syntax.
|
|
29
|
+
// Eg: Hi getstream.io -> Hi [getstream.io](getstream.io).
|
|
30
|
+
const normalRegEx = new RegExp(linkInfo.raw, 'g');
|
|
31
|
+
const markdown = `[${displayLink}](${linkInfo.encodedUrl})`;
|
|
32
|
+
resultText = text.replace(normalRegEx, markdown);
|
|
33
|
+
|
|
34
|
+
// After previous step, in some cases, the mentioned user after `@` might have a link/email so we convert it back to normal raw text.
|
|
35
|
+
// Eg: Hi, @[test.user@gmail.com](mailto:test.user@gmail.com) to @test.user@gmail.com.
|
|
36
|
+
const mentionsRegex = new RegExp(`@\\[${displayLink}\\]\\(${linkInfo.encodedUrl}\\)`, 'g');
|
|
37
|
+
resultText = resultText.replace(mentionsRegex, `@${displayLink}`);
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
resultText = resultText.replace(/[<&"'>]/g, '\\$&');
|
|
41
|
+
|
|
42
|
+
return resultText;
|
|
43
|
+
};
|
|
@@ -12,13 +12,13 @@ interface LinkInfo {
|
|
|
12
12
|
const removeMarkdownLinksFromText = (input: string) => input.replace(/\[[\w\s]+\]\(.*\)/g, '');
|
|
13
13
|
|
|
14
14
|
/**
|
|
15
|
-
*
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
15
|
+
* This is done to avoid parsing usernames with dot as well as an email address in it.
|
|
16
|
+
*/
|
|
17
|
+
const removeUserNamesWithEmailFromText = (input: string) =>
|
|
18
|
+
input.replace(/@(\w+(\.\w+)?)(@\w+\.\w+)/g, '');
|
|
19
19
|
|
|
20
20
|
export const parseLinksFromText = (input: string): LinkInfo[] => {
|
|
21
|
-
const strippedInput = [removeMarkdownLinksFromText,
|
|
21
|
+
const strippedInput = [removeMarkdownLinksFromText, removeUserNamesWithEmailFromText].reduce(
|
|
22
22
|
(acc, fn) => fn(acc),
|
|
23
23
|
input,
|
|
24
24
|
);
|
|
@@ -4,7 +4,6 @@ import { GestureResponderEvent, Linking, Text, TextProps, View, ViewProps } from
|
|
|
4
4
|
// @ts-expect-error
|
|
5
5
|
import Markdown from 'react-native-markdown-package';
|
|
6
6
|
|
|
7
|
-
import truncate from 'lodash/truncate';
|
|
8
7
|
import {
|
|
9
8
|
DefaultRules,
|
|
10
9
|
defaultRules,
|
|
@@ -19,7 +18,7 @@ import {
|
|
|
19
18
|
|
|
20
19
|
import type { UserResponse } from 'stream-chat';
|
|
21
20
|
|
|
22
|
-
import {
|
|
21
|
+
import { generateMarkdownText } from './generateMarkdownText';
|
|
23
22
|
|
|
24
23
|
import type { MessageContextValue } from '../../../../contexts/messageContext/MessageContext';
|
|
25
24
|
import type { Colors, MarkdownStyle } from '../../../../contexts/themeContext/utils/theme';
|
|
@@ -62,7 +61,7 @@ const defaultMarkdownStyles: MarkdownStyle = {
|
|
|
62
61
|
},
|
|
63
62
|
};
|
|
64
63
|
|
|
65
|
-
const
|
|
64
|
+
const mentionsParseFunction: ParseFunction = (capture, parse, state) => ({
|
|
66
65
|
content: parseInline(parse, capture[0], state),
|
|
67
66
|
});
|
|
68
67
|
|
|
@@ -102,25 +101,7 @@ export const renderText = <
|
|
|
102
101
|
preventPress,
|
|
103
102
|
} = params;
|
|
104
103
|
|
|
105
|
-
|
|
106
|
-
// translate links
|
|
107
|
-
const { mentioned_users, text } = message;
|
|
108
|
-
|
|
109
|
-
if (!text) return null;
|
|
110
|
-
|
|
111
|
-
let newText = text.trim();
|
|
112
|
-
const linkInfos = parseLinksFromText(newText);
|
|
113
|
-
|
|
114
|
-
for (const linkInfo of linkInfos) {
|
|
115
|
-
const displayLink = truncate(linkInfo.raw, {
|
|
116
|
-
length: 200,
|
|
117
|
-
omission: '...',
|
|
118
|
-
});
|
|
119
|
-
const markdown = `[${displayLink}](${linkInfo.encodedUrl})`;
|
|
120
|
-
newText = newText.replace(linkInfo.raw, markdown);
|
|
121
|
-
}
|
|
122
|
-
|
|
123
|
-
newText = newText.replace(/[<&"'>]/g, '\\$&');
|
|
104
|
+
const markdownText = generateMarkdownText<StreamChatGenerics>(message);
|
|
124
105
|
|
|
125
106
|
const styles: MarkdownStyle = {
|
|
126
107
|
...defaultMarkdownStyles,
|
|
@@ -220,6 +201,9 @@ export const renderText = <
|
|
|
220
201
|
);
|
|
221
202
|
};
|
|
222
203
|
|
|
204
|
+
// take the @ mentions and turn them into markdown?
|
|
205
|
+
// translate links
|
|
206
|
+
const { mentioned_users } = message;
|
|
223
207
|
const mentionedUsers = Array.isArray(mentioned_users)
|
|
224
208
|
? mentioned_users.reduce((acc, cur) => {
|
|
225
209
|
const userName = cur.name || cur.id || '';
|
|
@@ -237,7 +221,7 @@ export const renderText = <
|
|
|
237
221
|
: '';
|
|
238
222
|
|
|
239
223
|
const regEx = new RegExp(`^\\B(${mentionedUsers})`, 'g');
|
|
240
|
-
const
|
|
224
|
+
const mentionsMatchFunction: MatchFunction = (source) => regEx.exec(source);
|
|
241
225
|
|
|
242
226
|
const mentionsReact: ReactNodeOutput = (node, output, { ...state }) => {
|
|
243
227
|
/**removes the @ prefix of username */
|
|
@@ -297,9 +281,9 @@ export const renderText = <
|
|
|
297
281
|
...(mentionedUsers
|
|
298
282
|
? {
|
|
299
283
|
mentions: {
|
|
300
|
-
match,
|
|
284
|
+
match: mentionsMatchFunction,
|
|
301
285
|
order: defaultRules.text.order - 0.5,
|
|
302
|
-
parse,
|
|
286
|
+
parse: mentionsParseFunction,
|
|
303
287
|
react: mentionsReact,
|
|
304
288
|
},
|
|
305
289
|
}
|
|
@@ -318,7 +302,7 @@ export const renderText = <
|
|
|
318
302
|
}}
|
|
319
303
|
styles={styles}
|
|
320
304
|
>
|
|
321
|
-
{
|
|
305
|
+
{markdownText}
|
|
322
306
|
</Markdown>
|
|
323
307
|
);
|
|
324
308
|
};
|
|
@@ -223,25 +223,26 @@ const ReplyWithContext = <
|
|
|
223
223
|
) : null}
|
|
224
224
|
<MessageTextContainer<StreamChatGenerics>
|
|
225
225
|
markdownStyles={
|
|
226
|
-
quotedMessage.
|
|
226
|
+
quotedMessage.type === 'deleted'
|
|
227
227
|
? merge({ em: { color: grey } }, deletedText)
|
|
228
228
|
: { text: styles.text, ...markdownStyles }
|
|
229
229
|
}
|
|
230
230
|
message={{
|
|
231
231
|
...quotedMessage,
|
|
232
|
-
text:
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
? quotedMessage.text.length > 170
|
|
236
|
-
? `${quotedMessage.text.slice(0, 170)}...`
|
|
232
|
+
text:
|
|
233
|
+
quotedMessage.type === 'deleted'
|
|
234
|
+
? `_${t('Message deleted')}_`
|
|
237
235
|
: quotedMessage.text
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
236
|
+
? quotedMessage.text.length > 170
|
|
237
|
+
? `${quotedMessage.text.slice(0, 170)}...`
|
|
238
|
+
: quotedMessage.text
|
|
239
|
+
: messageType === 'image'
|
|
240
|
+
? t('Photo')
|
|
241
|
+
: messageType === 'video'
|
|
242
|
+
? t('Video')
|
|
243
|
+
: messageType === 'file'
|
|
244
|
+
? lastAttachment?.title || ''
|
|
245
|
+
: '',
|
|
245
246
|
}}
|
|
246
247
|
onlyEmojis={onlyEmojis}
|
|
247
248
|
styles={{
|
|
@@ -308,7 +309,8 @@ const areEqual = <StreamChatGenerics extends DefaultStreamChatGenerics = Default
|
|
|
308
309
|
typeof prevQuotedMessage !== 'boolean' &&
|
|
309
310
|
typeof nextQuotedMessage !== 'boolean'
|
|
310
311
|
? prevQuotedMessage.id === nextQuotedMessage.id &&
|
|
311
|
-
prevQuotedMessage.deleted_at === nextQuotedMessage.deleted_at
|
|
312
|
+
prevQuotedMessage.deleted_at === nextQuotedMessage.deleted_at &&
|
|
313
|
+
prevQuotedMessage.type === nextQuotedMessage.type
|
|
312
314
|
: !!prevQuotedMessage === !!nextQuotedMessage;
|
|
313
315
|
|
|
314
316
|
if (!quotedMessageEqual) return false;
|