mirror of
https://github.com/hexastack/hexabot
synced 2025-05-07 22:34:46 +00:00
fix: url built with buildUrl
This commit is contained in:
parent
cdf8461312
commit
36cd3179d8
@ -16,6 +16,7 @@ import { ReactNode } from "react";
|
||||
import { ROUTES } from "@/services/api.class";
|
||||
import { EntityType } from "@/services/types";
|
||||
import { IMessage, IMessageFull } from "@/types/message.types";
|
||||
import { buildURL } from "@/utils/URL";
|
||||
|
||||
import { AttachmentViewer } from "../components/AttachmentViewer";
|
||||
import { Carousel } from "../components/Carousel";
|
||||
@ -134,10 +135,7 @@ export function getAvatarSrc(
|
||||
entity: EntityType.USER | EntityType.SUBSCRIBER,
|
||||
id?: string,
|
||||
) {
|
||||
//remove trailing slash
|
||||
return `${String(apiUrl).replace(/\/$/, "")}${ROUTES[entity]}/${
|
||||
id || "bot"
|
||||
}/profile_pic`;
|
||||
return buildURL(apiUrl, `${ROUTES[entity]}/${id || "bot"}/profile_pic`);
|
||||
}
|
||||
|
||||
export function getMessagePosition(
|
||||
|
Loading…
Reference in New Issue
Block a user