refactor: drop legacy room chatType
This commit is contained in:
@@ -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,
|
||||
|
||||
@@ -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");
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
@@ -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:"));
|
||||
|
||||
Reference in New Issue
Block a user