Merge pull request #304 from intling-luo/main

修改群公告的参数名 feed_id 为 notice_id
This commit is contained in:
手瓜一十雪 2024-08-26 11:11:32 +08:00 committed by GitHub
commit 65bbed0c26
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
5 changed files with 10 additions and 10 deletions

View File

@ -225,9 +225,9 @@ export class NTQQGroupApi {
async kickMemberV2Inner(param: KickMemberV2Req) {
return this.context.session.getGroupService().kickMemberV2(param);
}
async deleteGroupBulletin(GroupCode: string, feedId: string) {
async deleteGroupBulletin(GroupCode: string, noticeId: string) {
const _Pskey = (await this.core.apis.UserApi.getPSkey(['qun.qq.com'])).domainPskeyMap.get('qun.qq.com')!;
return this.context.session.getGroupService().deleteGroupBulletin(GroupCode, _Pskey, feedId);
return this.context.session.getGroupService().deleteGroupBulletin(GroupCode, _Pskey, noticeId);
}
async quitGroupV2(GroupCode: string, needDeleteLocalMsg: boolean) {
const param = {

View File

@ -57,7 +57,7 @@ export interface WebApiGroupMemberRet {
export interface WebApiGroupNoticeFeed {
u: number;//发送者
fid: string;//fid
fid: string;//fid,notice_id
pubt: number;//时间
msg: {
text: string

View File

@ -209,7 +209,7 @@ export interface NodeIKernelGroupService {
getGroupBulletin(groupCode: string): unknown;
deleteGroupBulletin(groupCode: string, seq: string, feedId: string): void;
deleteGroupBulletin(groupCode: string, seq: string, noticeId: string): void;
publishGroupBulletin(groupCode: string, pskey: string, data: any): Promise<GeneralCallResult>;

View File

@ -8,9 +8,9 @@ const SchemaData = {
type: 'object',
properties: {
group_id: { type: ['number', 'string'] },
feed_id: { type: 'string' },
notice_id: { type: 'string' },
},
required: ['group_id','feed_id'],
required: ['group_id','notice_id'],
} as const satisfies JSONSchema;
type Payload = FromSchema<typeof SchemaData>;
@ -22,7 +22,7 @@ export class DelGroupNotice extends BaseAction<Payload, any> {
async _handle(payload: Payload) {
const NTQQGroupApi = this.core.apis.GroupApi;
const group = payload.group_id.toString();
const feedId = payload.feed_id;
return await NTQQGroupApi.deleteGroupBulletin(group, feedId);
const noticeId = payload.notice_id;
return await NTQQGroupApi.deleteGroupBulletin(group, noticeId);
}
}

View File

@ -6,7 +6,7 @@ import { FromSchema, JSONSchema } from 'json-schema-to-ts';
interface GroupNotice {
sender_id: number;
publish_time: number;
feed_id: string;
notice_id: string;
message: {
text: string
image: Array<{
@ -46,7 +46,7 @@ export class GetGroupNotice extends BaseAction<Payload, GroupNotice[]> {
const retApiNotice: WebApiGroupNoticeFeed = ret.feeds[key];
const retNotice: GroupNotice = {
//...ret.feeds[key],
feed_id: retApiNotice.fid,
notice_id: retApiNotice.fid,
sender_id: retApiNotice.u,
publish_time: retApiNotice.pubt,
message: {