refactor: drop legacy room chatType

This commit is contained in:
Peter Steinberger
2026-01-17 05:40:28 +00:00
parent 07a3db153d
commit 8b42902cee
18 changed files with 19 additions and 42 deletions

View File

@@ -299,8 +299,7 @@ export async function runPreparedReply(
});
const isGroupSession =
sessionEntry?.chatType === "group" ||
sessionEntry?.chatType === "channel" ||
sessionEntry?.chatType === "room";
sessionEntry?.chatType === "channel";
const isMainSession = !isGroupSession && sessionKey === normalizeMainKey(sessionCfg?.mainKey);
prefixedBodyBase = await prependSystemEvents({
cfg,

View File

@@ -8,7 +8,7 @@ describe("finalizeInboundContext", () => {
const ctx: MsgContext = {
Body: "a\\nb\r\nc",
RawBody: "raw\\nline",
ChatType: "room",
ChatType: "channel",
From: "group:123@g.us",
GroupSubject: "Test",
};
@@ -35,4 +35,3 @@ describe("finalizeInboundContext", () => {
expect(ctx.BodyForCommands).toBe("say hi");
});
});

View File

@@ -254,7 +254,6 @@ export function buildStatusMessage(args: StatusArgs): string {
const isGroupSession =
entry?.chatType === "group" ||
entry?.chatType === "channel" ||
entry?.chatType === "room" ||
Boolean(args.sessionKey?.includes(":group:")) ||
Boolean(args.sessionKey?.includes(":channel:")) ||
Boolean(args.sessionKey?.startsWith("group:"));