Skip to content

Commit

Permalink
Merge pull request #86 from juzibot/feat/add-modify-tag
Browse files Browse the repository at this point in the history
  • Loading branch information
binsee authored Feb 21, 2024
2 parents 3ba49f3 + 15fa23e commit b5e69ef
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 3 deletions.
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@juzi/wechaty",
"version": "1.0.93",
"version": "1.0.94",
"description": "Wechaty is a RPA SDK for Chatbot Makers.",
"type": "module",
"exports": {
Expand Down Expand Up @@ -109,7 +109,7 @@
},
"homepage": "https://github.com/wechaty/",
"dependencies": {
"@juzi/wechaty-puppet-service": "^1.0.90",
"@juzi/wechaty-puppet-service": "^1.0.91",
"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.82",
"@juzi/wechaty-puppet": "^1.0.83",
"@juzi/wechaty-puppet-mock": "^1.0.1",
"@swc/core": "1.3.44",
"@swc/helpers": "^0.3.6",
Expand Down
11 changes: 11 additions & 0 deletions src/user-modules/tag.ts
Original file line number Diff line number Diff line change
Expand Up @@ -236,6 +236,17 @@ class TagMixin extends MixinBase {
}
}

static async modifyTag (tagInstance: TagInterface, tagNewName: string): Promise<void> {
log.verbose('Tag', 'modifyTag(%s, %s)', tagInstance)

try {
await this.wechaty.puppet.tagTagModify(tagInstance.id, tagNewName)
} catch (e) {
this.wechaty.emitError(e)
log.error('Tag', 'modifyTag() exception: %s', (e as Error).message)
}
}

override toString () {
return `<Tag#${this.name() || this.id}>`
}
Expand Down

0 comments on commit b5e69ef

Please sign in to comment.