# Private message
It is an event that is immediately delivered to users such as duplicate login and writing restrictions. This event is not delivered to other users.
# Event on duplicate login
This event is delivered to the existing user when the login is duplicated due to the duplicate clientkey.
channel.onPersonalDuplicateUser = function(event) {
// {"clientKey":"user unique key","messageDt":1598438072058}
console.log('onNotifyMuteUser', event);
}
1
2
3
4
2
3
4
Push result value
Value Identifier Description clientKey String Unique key for connecting terminal setting messageDt String Send date
# Code to be applied to the project
channel.onPersonalDuplicateUser = function(event) {
vChatCloud.disconnect();
openError("Logout due to duplicate login.", function() {
$('div.enterypopup').show();
$('div.chat_field').hide();
});
}
1
2
3
4
5
6
7
2
3
4
5
6
7
# Writing restriction event
channel.onPersonalMuteUser = function(event) {
// {"clientKey":"user unique key","nickName":"Kildong Hong","messageDt":1598438218334}
console.log('onNotifyMuteUser', event)
}
1
2
3
4
2
3
4
Push result value
Value Identifier Description clientKey String Unique key for connecting terminal setting nickName String The nickname of the user entering the chat room messageDt String Send date
# Code to be applied to the project
channel.onPersonalMuteUser = function(event) {
openError("Your writing is restricted.")
}
1
2
3
2
3
# Writing Restriction Release Event
channel.onPersonalUnmuteUser = function(event) {
// {"clientKey":"user unique key","nickName":"Kildong Hong","messageDt":1598438225886}
console.log('onNotifyMuteUser', event)
}
1
2
3
4
2
3
4
Push result value
Value Identifier Description clientKey String Unique key for connecting terminal setting nickName String The nickname of the user entering the chat room messageDt String Send date
# Code to be applied to the project
channel.onPersonalUnmuteUser = function(event) {
openError("The writing restriction has been lifted.")
}
1
2
3
2
3
# full code
message event full code
// personalInit() part is executed after joinRoom succeeds in login.js
function personalInit() {
// Event on duplicate login
channel.onPersonalDuplicateUser = function(event) {
vChatCloud.disconnect();
openError("Logout due to duplicate login.", function() {
$('div.enterypopup').show();
$('div.chat_field').hide();
});
}
// Writing restriction event
channel.onPersonalMuteUser = function(event) {
openError("Your writing is restricted.")
}
// Writing restriction release event
channel.onPersonalUnmuteUser = function(event) {
openError("The writing restriction has been lifted.")
}
}
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22