Skip to content

Commit

Permalink
feat: 🎸 room dismiss
Browse files Browse the repository at this point in the history
  • Loading branch information
hcfw007 committed Jan 11, 2024
1 parent 050ce1e commit 0c4dbc6
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 0 deletions.
12 changes: 12 additions & 0 deletions src/client/puppet-service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2072,6 +2072,18 @@ class PuppetService extends PUPPET.Puppet {
)(request)
}

override async roomDismiss (roomId: string): Promise<void> {
log.verbose('PuppetService', 'roomDelAdmins(%s)', roomId)

const request = new grpcPuppet.RoomDismissRequest()
request.setId(roomId)

await util.promisify(
this.grpcManager.client.roomDismiss
.bind(this.grpcManager.client),
)(request)
}

/**
*
* Friendship
Expand Down
14 changes: 14 additions & 0 deletions src/server/puppet-implementation.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1759,6 +1759,20 @@ function puppetImplementation (
}
},

roomDismiss: async (call, callback) => {
log.verbose('PuppetServiceImpl', 'roomDismiss()')

try {
const roomId = call.request.getId()

await puppet.roomDismiss(roomId)

return callback(null, new grpcPuppet.RoomDismissResponse())
} catch (e) {
return grpcError('roomDelAdmins', e, callback)
}
},

start: async (call, callback) => {
log.verbose('PuppetServiceImpl', 'start()')
void call
Expand Down

0 comments on commit 0c4dbc6

Please sign in to comment.