Skip to content

Commit

Permalink
feat: 🎸 logout
Browse files Browse the repository at this point in the history
  • Loading branch information
hcfw007 committed Dec 17, 2024
1 parent 02c567f commit 73973d0
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/model/mq.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ export enum MqCommandType {
dirtyPayload = 'dirtyPayload',
postUnpublish = 'postUnpublish',
tap = 'tap',
logout = 'logout',
}

export enum MqEventType {
Expand Down
7 changes: 7 additions & 0 deletions src/puppet.ts
Original file line number Diff line number Diff line change
Expand Up @@ -190,6 +190,13 @@ class PuppetRabbit extends PUPPET.Puppet {
return tap
}

override async logout() {
return this.mqManager.sendToServer({
commandType: MqCommandType.logout,
data: JSON.stringify({}),
})
}

initEvents() {
this.mqManager
.on('dong', (data: PUPPET.payloads.EventDong) => {
Expand Down

0 comments on commit 73973d0

Please sign in to comment.