Fix multiple issues

This commit is contained in:
2026-03-07 21:33:40 +01:00
parent 6926df9a2c
commit 2763de2711
11 changed files with 524 additions and 156 deletions

View File

@@ -270,6 +270,13 @@ export async function setChannelType(
if (!existing) return { success: false, error: "Channel not found" };
try {
if (type === "DESTINATION") {
// Setting as destination: use the full global destination logic
// so it updates the global settings key, creates WRITER links, etc.
return await setGlobalDestination(id);
}
// Setting as SOURCE — just change the type
await prisma.telegramChannel.update({
where: { id },
data: { type },