refactor: normalize inbound context
This commit is contained in:
@@ -136,6 +136,6 @@ export function resolveGroupSessionKey(ctx: MsgContext): GroupKeyResolution | nu
|
||||
legacyKey,
|
||||
channel: resolvedProvider,
|
||||
id: id || raw || from,
|
||||
chatType: resolvedKind === "channel" ? "room" : "group",
|
||||
chatType: resolvedKind === "channel" ? "channel" : "group",
|
||||
};
|
||||
}
|
||||
|
||||
@@ -7,7 +7,12 @@ export type SessionScope = "per-sender" | "global";
|
||||
|
||||
export type SessionChannelId = ChannelId | "webchat";
|
||||
|
||||
export type SessionChatType = "direct" | "group" | "room";
|
||||
export type SessionChatType =
|
||||
| "direct"
|
||||
| "group"
|
||||
| "channel"
|
||||
// Legacy alias for "channel".
|
||||
| "room";
|
||||
|
||||
export type SessionEntry = {
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user