castle-chat-lib
Advanced tools
Comparing version 2.15.0 to 2.16.0
{ | ||
"name": "castle-chat-lib", | ||
"version": "2.15.0", | ||
"version": "2.16.0", | ||
"description": "", | ||
@@ -5,0 +5,0 @@ "main": "src/index.js", |
@@ -78,2 +78,3 @@ import _ from 'lodash'; | ||
channel_online_counts: msg.channel_online_counts, | ||
channel_online_user_ids: msg.channel_online_user_ids, | ||
}); | ||
@@ -83,2 +84,11 @@ } | ||
}); | ||
this._socket.on('update', (msg) => { | ||
try { | ||
if (this._updateHandler) { | ||
let parsedUpdate = JSON.parse(msg); | ||
this._updateHandler(parsedUpdate.type, parsedUpdate.body); | ||
} | ||
} catch (e) {} | ||
}); | ||
} | ||
@@ -135,2 +145,6 @@ | ||
setOnUpdateHandler(handler) { | ||
this._updateHandler = handler; | ||
} | ||
unseeChatMessageIds(chatMessageIds) { | ||
@@ -137,0 +151,0 @@ for (let i = 0; i < chatMessageIds.length; i++) { |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
8725
294