fix(chat): correct apiEndpoint routing for direct messages in ChatItem
This commit is contained in:
parent
f312316400
commit
441a6c4453
1 changed files with 5 additions and 4 deletions
|
|
@ -95,10 +95,11 @@ export function ChatItem({
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
|
|
||||||
// Dynamischen Endpunkt basierend auf Chat-Typ bestimmen
|
// Determine the dynamic endpoint based on the chat type
|
||||||
const apiEndpoint = isDirect
|
const apiEndpoint =
|
||||||
? `/api/dm/messages/${message.id}`
|
isDirect === "dm"
|
||||||
: `/api/messages/${message.id}`;
|
? `/api/dm/messages/${message.id}`
|
||||||
|
: `/api/messages/${message.id}`;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Handles the asynchronous deletion of the chat message.
|
* Handles the asynchronous deletion of the chat message.
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue