stream-chat-angular 5.11.1 → 5.11.2
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/assets/version.d.ts +1 -1
- package/esm2020/assets/version.mjs +2 -2
- package/esm2020/lib/message/message.component.mjs +16 -5
- package/fesm2015/stream-chat-angular.mjs +16 -5
- package/fesm2015/stream-chat-angular.mjs.map +1 -1
- package/fesm2020/stream-chat-angular.mjs +16 -5
- package/fesm2020/stream-chat-angular.mjs.map +1 -1
- package/package.json +1 -1
- package/src/assets/version.ts +1 -1
|
@@ -20,7 +20,7 @@ import transliterate from '@stream-io/transliterate';
|
|
|
20
20
|
import * as i8 from 'angular-mentions';
|
|
21
21
|
import { MentionModule } from 'angular-mentions';
|
|
22
22
|
|
|
23
|
-
const version = '5.11.
|
|
23
|
+
const version = '5.11.2';
|
|
24
24
|
|
|
25
25
|
/**
|
|
26
26
|
* The `NotificationService` can be used to add or remove notifications. By default the [`NotificationList`](/chat/docs/sdk/angular/components/NotificationListComponent/) component displays the currently active notifications.
|
|
@@ -5191,7 +5191,7 @@ class MessageComponent {
|
|
|
5191
5191
|
this.hasTouchSupport = 'ontouchstart' in window || navigator.maxTouchPoints > 0;
|
|
5192
5192
|
this.subscriptions = [];
|
|
5193
5193
|
this.isViewInited = false;
|
|
5194
|
-
this.urlRegexp = /(?:(?:https?|ftp|file):\/\/|www\.|ftp
|
|
5194
|
+
this.urlRegexp = /(?:(?:https?|ftp|file):\/\/|www\.|ftp\.|(?:[a-zA-Z0-9-]+\.)+[a-zA-Z]{2,})(?![^\s]*@[^\s]*)(?:[^\s()<>]+|\([\w\d]+\))*(?<!@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,})/gim;
|
|
5195
5195
|
this.emojiRegexp = new RegExp(emojiRegex(), 'g');
|
|
5196
5196
|
this.shouldPreventMessageMenuClose = false;
|
|
5197
5197
|
this._visibleMessageActionsCount = 0;
|
|
@@ -5561,9 +5561,20 @@ class MessageComponent {
|
|
|
5561
5561
|
if (this.displayAs === 'html') {
|
|
5562
5562
|
return content;
|
|
5563
5563
|
}
|
|
5564
|
-
content = content.replace(this.urlRegexp, (match) =>
|
|
5565
|
-
|
|
5566
|
-
|
|
5564
|
+
content = content.replace(this.urlRegexp, (match) => {
|
|
5565
|
+
if (this.messageService.customLinkRenderer) {
|
|
5566
|
+
return this.messageService.customLinkRenderer(match);
|
|
5567
|
+
}
|
|
5568
|
+
else {
|
|
5569
|
+
let href = match;
|
|
5570
|
+
if (!href.startsWith('http') &&
|
|
5571
|
+
!href.startsWith('ftp') &&
|
|
5572
|
+
!href.startsWith('file')) {
|
|
5573
|
+
href = `https://${match}`;
|
|
5574
|
+
}
|
|
5575
|
+
return `<a href="${href}" target="_blank" rel="nofollow">${match}</a>`;
|
|
5576
|
+
}
|
|
5577
|
+
});
|
|
5567
5578
|
return content;
|
|
5568
5579
|
}
|
|
5569
5580
|
updateReadByText() {
|