This repository has been archived by the owner on May 17, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2
/
docked.html
51 lines (42 loc) · 1.88 KB
/
docked.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
<html>
<head>
<meta name="viewport" content="width=device-width, initial-scale=1">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
<script src="https://cluster1.telifoun.com/webapi/en/mqttchat.js?appid=mqttchat-87226030&uf=0"></script>
</head>
<body>
<div id="mqttchat"
data-layout="docked"
class="mqttchat-lite"
data-user-name="user"
data-user-surname="126"
data-user-link=""
data-user-avatar="https://dm.henkel-dam.com/is/image/henkel/men_perfect_com_thumbnails_home_pack_400x400-wcms-international?scl=1&fmt=jpg"
data-user-id="126"
data-user-gender="0"
></div>
<script type="text/javascript">
/** On error event **/
telifounJQ(document).on("mqttchat-error",function(e){
console.log(JSON.stringify(e.mqttchat_data));
});
/** on page load complete **/
telifounJQ(document).ready(function() {
/** start chat with user id **/
telifounJQ(document).on("mqttchat-load-complete",function(e){
console.log("load complete");
/** start chat with userid 12 : must be called after loadComplete event **/
// telifounJQ.mqttchat_cloud.__startChatWithUser(12);
});
/** On Incoming Message Event **/
telifounJQ(document).on("mqttchat-incoming-message",function(e){
console.log(JSON.stringify(e.mqttchat_data));
});
/** On not readed messages count change event **/
telifounJQ(document).on("mqttchat-not-read-messages-count-update",function(e){
console.log(e.mqttchat_data);
});
});
</script>
</body>
</html>