fix(onebot): handle non-friend group invitations

Refs #636
This commit is contained in:
DrSmoothl committed 2026-11-02 07:55:40 +08:00
1 parent 0fa912a32e
commit 2b63f375fc
8 files changed
+184 -8

No files matched your search

+6
View File
@@ -121,6 +121,12 @@ export interface GroupRequestInfo {
operateTransInfo?: Uint8Array;
}
/** Invitations handled by the invited account, rather than a group administrator.
* Notification types 1 and 2 use different approval discriminators. */
export function isSelfGroupInvitation(request: Pick<GroupRequestInfo, 'eventType'>): boolean {
return request.eventType === 2 || request.eventType === 10;
}
/** Approval tuple required by OIDB 0x10C8. The OneBot flag is opaque to
* clients, but carrying the complete tuple makes delayed handling stateless. */
export type GroupRequestHandle = Pick<