Skip to content

Commit

Permalink
Revert "fixed Transfer message err (#239)"
Browse files Browse the repository at this point in the history
This reverts commit e713afd.
  • Loading branch information
choogoo authored Aug 20, 2024
1 parent e713afd commit 08648d2
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "wechaty-puppet-xp",
"version": "2.2.0",
"version": "2.1.1",
"description": "Puppet XP for Wechaty",
"type": "module",
"exports": {
Expand Down
6 changes: 3 additions & 3 deletions src/puppet-xp.ts
Original file line number Diff line number Diff line change
Expand Up @@ -238,7 +238,7 @@ class PuppetXp extends PUPPET.Puppet {

private onHookRecvMsg (args: any) {
// log.info('onHookRecvMsg', JSON.stringify(args))
let type:any = PUPPET.types.Message.Unknown
let type = PUPPET.types.Message.Unknown
let roomId = ''
let toId = ''
let talkerId = ''
Expand All @@ -251,7 +251,7 @@ class PuppetXp extends PUPPET.Puppet {
xml2js.parseString(String(args[4]), { explicitArray: false, ignoreAttrs: true }, function (err: any, json: any) {
log.verbose('PuppetXp', 'xml2json err:%s', err)
// log.verbose('PuppetXp', 'json content:%s', JSON.stringify(json))
if (json && json.msgsource && json.msgsource.atuserlist === 'atuserlist') {
if (json.msgsource && json.msgsource.atuserlist === 'atuserlist') {
type = PUPPET.types.Message.GroupNote
} else {
type = PUPPET.types.Message.Text
Expand Down Expand Up @@ -495,7 +495,7 @@ class PuppetXp extends PUPPET.Puppet {

this.emit('room-join', { inviteeIdList: inviteeList, inviterId: inviter.id, roomId })
}
} else if (type === PUPPET.types.Message.Transfer) { /* empty */ } else {
} else {
this.messageStore[payload.id] = payload
if (this.isReady) {
this.emit('message', { messageId: payload.id })
Expand Down

0 comments on commit 08648d2

Please sign in to comment.