feat: implement default mark msg as read and add get clientkey onebot api

This commit is contained in:
H3CoF6 committed 2026-05-08 16:42:19 +08:00
1 parent e3e364db63
commit 7e2ba60073
5 files changed
+50 -3

No files matched your search

+10 -2
View File
@@ -26,7 +26,7 @@ import {
fetchGroupRequests as fetchGroupRequests_,
fetchDownloadRKeys as fetchDownloadRKeys_,
} from './bridge-contacts';
import { WebHonorType } from './web/group-honor';
import type { WebHonorType } from './web/group-honor';
import {
muteGroupMember as muteGroupMember_,
muteGroupAll as muteGroupAll_,
@@ -65,7 +65,8 @@ import {
markGroupMessageRead as markPrivateMsgAsRead_,
setFriendRemark as setFriendRemark_,
fetchGroupFileCount as fetchGroupFileCount_,
getGroupHonorInfo as getGroupHonorInfo_,
getGroupHonorInfo as getGroupHonorInfo_,
forceFetchClientKey as forceFetchClientKey_,
} from './bridge-actions';
import type { GroupFilesResult } from './bridge-actions';
import type { MediaIndexNode } from './bridge-actions';
@@ -90,6 +91,12 @@ export interface DownloadRKeyInfo {
type: number;
}
export interface ClientKeyInfo {
clientKey: string;
expireTime: string;
keyIndex: string
}
const log = createLogger('Bridge');
const eventLog = createLogger('Event');
@@ -455,6 +462,7 @@ export class Bridge {
async getGroupHonorInfo(groupId: number, type: WebHonorType | string): Promise<any> {
return getGroupHonorInfo_(this, groupId, type);
}
async forceFetchClientKey(): Promise<ClientKeyInfo> { return forceFetchClientKey_(this)}
async fetchGroupFileCount(groupId: number): Promise<{ fileCount: number; maxCount: number }> { return fetchGroupFileCount_(this, groupId); }
}