We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 0e0deb5 commit 182a9d4Copy full SHA for 182a9d4
src/ui/OGMessageItemBody/index.tsx
@@ -37,8 +37,15 @@ export default function OGMessageItemBody({
37
}: Props): ReactElement {
38
const imageRef = useRef<HTMLDivElement>(null);
39
const { stringSet } = useContext(LocalizationContext);
40
+
41
const openOGUrl = (): void => {
- if (message?.ogMetaData?.url) window.open(message?.ogMetaData?.url);
42
+ let url = message?.ogMetaData?.url;
43
+ if (url) {
44
+ if (!url.startsWith('http://') && !url.startsWith('https://')) {
45
+ url = 'https://' + url;
46
+ }
47
+ window.open(url);
48
49
};
50
const isMessageMentioned = isMentionEnabled && message?.mentionedMessageTemplate?.length > 0 && message?.mentionedUsers?.length > 0;
51
const tokens = useMemo(() => {
0 commit comments