File tree Expand file tree Collapse file tree 2 files changed +4
-4
lines changed
Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -133,21 +133,21 @@ wrapper.vm.$nextTick(() => {
133133
134134## Client events
135135
136- You can use ` userWhisper ` to send user event. Only private channel object and presence channel object have ` userWhisper ` .
136+ You can use ` whisper ` to send user event. Only private channel object and presence channel object have ` whisper ` .
137137
138138> Note: If you are using ` vue-test-utils ` , call ` $nextTick ` before assertion.
139139
140140Example:
141141``` javascript
142142// private channel
143- mockEcho .getPrivateChannel (' meeting' ).userWhisper (' meetingClicking' , { username: username })
143+ mockEcho .getPrivateChannel (' meeting' ).whisper (' meetingClicking' , { username: username })
144144wrapper .vm .$nextTick (() => {
145145 expect (wrapper .find (' .whisper-message' ).text ()).toBe (` ${ username} is clicking the button` )
146146 done ()
147147})
148148
149149// presence channel
150- mockEcho .getPresenceChannel (' chat' ).userWhisper (' chatClicking' , { username: username })
150+ mockEcho .getPresenceChannel (' chat' ).whisper (' chatClicking' , { username: username })
151151wrapper .vm .$nextTick (() => {
152152 expect (wrapper .find (' .whisper-message' ).text ()).toBe (` ${ username} is clicking the button` )
153153 done ()
Original file line number Diff line number Diff line change @@ -35,7 +35,7 @@ class PrivateChannel extends Channel {
3535 this . notificationFn = null
3636 }
3737
38- userWhisper ( eventName , event ) {
38+ whisper ( eventName , event ) {
3939 if ( typeof this . clientEvents [ `client-${ eventName } ` ] === 'undefined' ) {
4040 console . error ( `Channel didn't listen to client event: ${ eventName } ` )
4141 return
You can’t perform that action at this time.
0 commit comments