+// ---------------------------------------------------------------------------
+
+function getAbuseTargetUrl (abuse: MAbuseFull) {
+ return abuse.VideoAbuse?.Video?.url ||
+ abuse.VideoCommentAbuse?.VideoComment?.url ||
+ abuse.FlaggedAccount.Actor.url
+}
+
+// ---------------------------------------------------------------------------
+
+function buildRemoteVideoBaseUrl (video: MVideoWithHost, path: string, scheme?: string) {
+ if (!scheme) scheme = REMOTE_SCHEME.HTTP
+
+ const host = video.VideoChannel.Actor.Server.host
+
+ return scheme + '://' + host + path
+}
+
+// ---------------------------------------------------------------------------
+
+function checkUrlsSameHost (url1: string, url2: string) {
+ const idHost = new URL(url1).host
+ const actorHost = new URL(url2).host
+
+ return idHost && actorHost && idHost.toLowerCase() === actorHost.toLowerCase()
+}
+
+// ---------------------------------------------------------------------------
+