Trim end of url
This commit is contained in:
parent
34f5ac291e
commit
660944fd29
@ -9,7 +9,7 @@ import { MediaElement } from "Element/MediaElement";
|
||||
async function fetchUrlPreviewInfo(url: string) {
|
||||
const api = new SnortApi();
|
||||
try {
|
||||
return await api.linkPreview(url);
|
||||
return await api.linkPreview(url.endsWith(")") ? url.slice(0, -1) : url);
|
||||
} catch (e) {
|
||||
console.warn(`Failed to load link preview`, url);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user