Skip to content

Commit

Permalink
feat: ✨ add quote ids when room add (#81)
Browse files Browse the repository at this point in the history
* feat: ✨ add quote ids when room add

* 1.0.105
  • Loading branch information
su-chang authored Jan 2, 2025
1 parent 50d5dfa commit 94c34d8
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@juzi/wechaty-puppet-service",
"version": "1.0.104",
"version": "1.0.105",
"description": "Puppet Service for Wechaty",
"type": "module",
"exports": {
Expand Down Expand Up @@ -73,7 +73,7 @@
"@juzi/wechaty-puppet": "^1.0.84"
},
"dependencies": {
"@juzi/wechaty-grpc": "^1.0.89",
"@juzi/wechaty-grpc": "^1.0.90",
"clone-class": "^1.1.1",
"ducks": "^1.0.2",
"file-box": "^1.5.5",
Expand Down
3 changes: 2 additions & 1 deletion src/client/puppet-service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1734,14 +1734,15 @@ class PuppetService extends PUPPET.Puppet {
roomId : string,
contactId : string,
inviteOnly : boolean,
quoteIds : string[],
): Promise<void> {
log.verbose('PuppetService', 'roomAdd(%s, %s)', roomId, contactId)

const request = new grpcPuppet.RoomAddRequest()
request.setId(roomId)
request.setContactId(contactId)
request.setInviteOnly(inviteOnly)

request.setQuoteIdsList(quoteIds)
await util.promisify(
this.grpcManager.client.roomAdd
.bind(this.grpcManager.client),
Expand Down
3 changes: 2 additions & 1 deletion src/server/puppet-implementation.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1390,8 +1390,9 @@ function puppetImplementation (
const roomId = call.request.getId()
const contactId = call.request.getContactId()
const inviteOnly = call.request.getInviteOnly()
const quoteIds = call.request.getQuoteIdsList()

await puppet.roomAdd(roomId, contactId, inviteOnly)
await puppet.roomAdd(roomId, contactId, inviteOnly, quoteIds)

return callback(null, new grpcPuppet.RoomAddResponse())

Expand Down

0 comments on commit 94c34d8

Please sign in to comment.