Skip to content

Commit

Permalink
fix: #677
Browse files Browse the repository at this point in the history
  • Loading branch information
pk5ls20 committed Dec 31, 2024
1 parent 13bda6e commit b984116
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/core/packet/context/operationContext.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ export class PacketOperationContext {
}

async GroupPoke(groupUin: number, uin: number) {
const req = trans.SendPoke.build(groupUin, uin);
const req = trans.SendPoke.build(uin, groupUin);
await this.context.client.sendOidbPacket(req);
}

Expand Down
2 changes: 1 addition & 1 deletion src/onebot/action/group/GroupPoke.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,6 @@ export class GroupPoke extends GetPacketStatusDepends<Payload, any> {
payloadSchema = SchemaData;

async _handle(payload: Payload) {
await this.core.apis.PacketApi.pkt.operation.GroupPoke(+payload.user_id, +payload.group_id);
await this.core.apis.PacketApi.pkt.operation.GroupPoke(+payload.group_id, +payload.user_id);
}
}
6 changes: 3 additions & 3 deletions src/onebot/action/packet/SendPoke.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@ export class SendPoke extends GetPacketStatusDepends<Payload, any> {

async _handle(payload: Payload) {
if (payload.group_id) {
this.core.apis.PacketApi.pkt.operation.GroupPoke(+payload.group_id, +payload.user_id);
await this.core.apis.PacketApi.pkt.operation.GroupPoke(+payload.group_id, +payload.user_id);
} else {
this.core.apis.PacketApi.pkt.operation.FriendPoke(+payload.user_id);
await this.core.apis.PacketApi.pkt.operation.FriendPoke(+payload.user_id);
}
}
}
}

0 comments on commit b984116

Please sign in to comment.