Skip to content

Commit

Permalink
feat: 🎸 room dismiss
Browse files Browse the repository at this point in the history
  • Loading branch information
hcfw007 committed Dec 18, 2023
1 parent b9ca9ac commit 92f0e69
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@
},
"homepage": "https://github.com/wechaty/",
"dependencies": {
"@juzi/wechaty-puppet-service": "^1.0.86",
"@juzi/wechaty-puppet-service": "^1.0.88",
"clone-class": "^1.1.1",
"cmd-ts": "^0.10.0",
"cockatiel": "^2.0.2",
Expand All @@ -132,7 +132,7 @@
"@chatie/eslint-config": "^1.0.4",
"@chatie/semver": "^0.4.7",
"@chatie/tsconfig": "^4.6.3",
"@juzi/wechaty-puppet": "^1.0.74",
"@juzi/wechaty-puppet": "^1.0.75",
"@juzi/wechaty-puppet-mock": "^1.0.1",
"@swc/core": "1.3.44",
"@swc/helpers": "^0.3.6",
Expand Down
10 changes: 10 additions & 0 deletions src/user-modules/room.ts
Original file line number Diff line number Diff line change
Expand Up @@ -762,6 +762,16 @@ class RoomMixin extends MixinBase implements SayableSayer {
return this.remove(contact)
}

async dismiss (): Promise<void> {
log.verbose('Room', 'dismiss()')

if (!this.owner()?.self()) {
throw new Error('you cannot dismiss a room you don\'t own')
}

return this.wechaty.puppet.roomDismiss(this.id)
}

// private delLocal(contact: Contact): void {
// log.verbose('Room', 'delLocal(%s)', contact)

Expand Down

0 comments on commit 92f0e69

Please sign in to comment.