Fix channels not active after selection and add Fetch Channels button to Channels tab

Co-authored-by: xCyanGrizzly <53275238+xCyanGrizzly@users.noreply.github.com>
This commit is contained in:
copilot-swe-agent[bot]
2026-03-05 22:04:28 +00:00
parent 2bb3caf7d9
commit 8d508d5a86
3 changed files with 46 additions and 7 deletions

View File

@@ -453,7 +453,7 @@ export async function saveChannelSelections(
try {
let linked = 0;
for (const ch of channels) {
// Upsert the channel record (new channels default to disabled)
// Upsert the channel record and activate it (user explicitly selected it)
const channel = await prisma.telegramChannel.upsert({
where: { telegramId: BigInt(ch.telegramId) },
create: {
@@ -461,11 +461,12 @@ export async function saveChannelSelections(
title: ch.title,
type: "SOURCE",
isForum: ch.isForum,
isActive: false,
isActive: true,
},
update: {
title: ch.title,
isForum: ch.isForum,
isActive: true,
},
});