mirror of
https://github.com/NapNeko/NapCatQQ.git
synced 2024-11-16 04:45:46 +00:00
Merge pull request #304 from intling-luo/main
修改群公告的参数名 feed_id 为 notice_id
This commit is contained in:
commit
65bbed0c26
@ -225,9 +225,9 @@ export class NTQQGroupApi {
|
|||||||
async kickMemberV2Inner(param: KickMemberV2Req) {
|
async kickMemberV2Inner(param: KickMemberV2Req) {
|
||||||
return this.context.session.getGroupService().kickMemberV2(param);
|
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')!;
|
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) {
|
async quitGroupV2(GroupCode: string, needDeleteLocalMsg: boolean) {
|
||||||
const param = {
|
const param = {
|
||||||
|
@ -57,7 +57,7 @@ export interface WebApiGroupMemberRet {
|
|||||||
|
|
||||||
export interface WebApiGroupNoticeFeed {
|
export interface WebApiGroupNoticeFeed {
|
||||||
u: number;//发送者
|
u: number;//发送者
|
||||||
fid: string;//fid
|
fid: string;//fid,notice_id
|
||||||
pubt: number;//时间
|
pubt: number;//时间
|
||||||
msg: {
|
msg: {
|
||||||
text: string
|
text: string
|
||||||
|
@ -209,7 +209,7 @@ export interface NodeIKernelGroupService {
|
|||||||
|
|
||||||
getGroupBulletin(groupCode: string): unknown;
|
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>;
|
publishGroupBulletin(groupCode: string, pskey: string, data: any): Promise<GeneralCallResult>;
|
||||||
|
|
||||||
|
@ -8,9 +8,9 @@ const SchemaData = {
|
|||||||
type: 'object',
|
type: 'object',
|
||||||
properties: {
|
properties: {
|
||||||
group_id: { type: ['number', 'string'] },
|
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;
|
} as const satisfies JSONSchema;
|
||||||
|
|
||||||
type Payload = FromSchema<typeof SchemaData>;
|
type Payload = FromSchema<typeof SchemaData>;
|
||||||
@ -22,7 +22,7 @@ export class DelGroupNotice extends BaseAction<Payload, any> {
|
|||||||
async _handle(payload: Payload) {
|
async _handle(payload: Payload) {
|
||||||
const NTQQGroupApi = this.core.apis.GroupApi;
|
const NTQQGroupApi = this.core.apis.GroupApi;
|
||||||
const group = payload.group_id.toString();
|
const group = payload.group_id.toString();
|
||||||
const feedId = payload.feed_id;
|
const noticeId = payload.notice_id;
|
||||||
return await NTQQGroupApi.deleteGroupBulletin(group, feedId);
|
return await NTQQGroupApi.deleteGroupBulletin(group, noticeId);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -6,7 +6,7 @@ import { FromSchema, JSONSchema } from 'json-schema-to-ts';
|
|||||||
interface GroupNotice {
|
interface GroupNotice {
|
||||||
sender_id: number;
|
sender_id: number;
|
||||||
publish_time: number;
|
publish_time: number;
|
||||||
feed_id: string;
|
notice_id: string;
|
||||||
message: {
|
message: {
|
||||||
text: string
|
text: string
|
||||||
image: Array<{
|
image: Array<{
|
||||||
@ -46,7 +46,7 @@ export class GetGroupNotice extends BaseAction<Payload, GroupNotice[]> {
|
|||||||
const retApiNotice: WebApiGroupNoticeFeed = ret.feeds[key];
|
const retApiNotice: WebApiGroupNoticeFeed = ret.feeds[key];
|
||||||
const retNotice: GroupNotice = {
|
const retNotice: GroupNotice = {
|
||||||
//...ret.feeds[key],
|
//...ret.feeds[key],
|
||||||
feed_id: retApiNotice.fid,
|
notice_id: retApiNotice.fid,
|
||||||
sender_id: retApiNotice.u,
|
sender_id: retApiNotice.u,
|
||||||
publish_time: retApiNotice.pubt,
|
publish_time: retApiNotice.pubt,
|
||||||
message: {
|
message: {
|
||||||
|
Loading…
Reference in New Issue
Block a user