Skip to content

Commit 73af7c7

Browse files
dmorrowhamchapman
authored andcommitted
Update PusherSwift.swift
1 parent 4c26917 commit 73af7c7

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

Sources/PusherSwift.swift

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -129,6 +129,13 @@ let CLIENT_NAME = "pusher-websocket-swift"
129129
open func unsubscribe(_ channelName: String) {
130130
self.connection.unsubscribe(channelName: channelName)
131131
}
132+
133+
/**
134+
Unsubscribes the client from all channels
135+
*/
136+
open func unsubscribe(_ channelName: String) {
137+
self.connection.unsubscribeAll()
138+
}
132139

133140
/**
134141
Binds the client's global channel to all events

0 commit comments

Comments
 (0)