Skip to content

Commit

Permalink
feat(qq): rename <passive> attribute
Browse files Browse the repository at this point in the history
  • Loading branch information
XxLittleCxX committed Jan 29, 2024
1 parent d2d4444 commit fbe13ef
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions adapters/qq/src/message.ts
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,6 @@ export class QQGuildMessageEncoder<C extends Context = Context> extends MessageE
content: this.content,
msg_id,
image: this.fileUrl,

},
...(this.reference ? {
message_reference: {
Expand Down Expand Up @@ -175,7 +174,7 @@ export class QQGuildMessageEncoder<C extends Context = Context> extends MessageE
this.reference = attrs.id
await this.flush()
} else if (type === 'passive') {
if (attrs.id) this.passiveId = attrs.id
if (attrs.messageId) this.passiveId = attrs.messageId
if (attrs.eventId) this.passiveEventId = attrs.eventId
} else if ((type === 'img' || type === 'image') && (attrs.src || attrs.url)) {
await this.flush()
Expand Down Expand Up @@ -390,7 +389,7 @@ export class QQMessageEncoder<C extends Context = Context> extends MessageEncode
if (type === 'text') {
this.content += attrs.content
} else if (type === 'passive') {
this.passiveId = attrs.id
this.passiveId = attrs.messageId
this.passiveSeq = Number(attrs.seq)
} else if ((type === 'img' || type === 'image') && (attrs.src || attrs.url)) {
await this.flush()
Expand Down

0 comments on commit fbe13ef

Please sign in to comment.