@evo/chat-core
Advanced tools
Comparing version 0.3.2 to 0.3.3
@@ -36,2 +36,4 @@ 'use strict'; | ||
// improve, check incoming data for methods | ||
var Besida = exports.Besida = function () { | ||
@@ -118,7 +120,8 @@ function Besida(swindonObj, userRole) { | ||
var role = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : this.userRole; | ||
var status = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : this.defaultChatStatus; | ||
var _this2 = this; | ||
var status = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : this.defaultChatStatus; | ||
var limit = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : this.chatsLoadStep; | ||
var project = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : this.chatsProject; | ||
var limit = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : this.chatsLoadStep; | ||
@@ -129,5 +132,6 @@ // this kostil' is made, to prevent meta/history load, | ||
if (status !== this.chatsStatus) this.chatsStatus = status; | ||
if (project !== this.chatsProject) this.chatsProject = project; | ||
var offset = this.chatsLoadOffset[this.userRole][this.chatsStatus]; | ||
return this.oSwindon.call('chat.subscribe', [], { role: role, offset: offset, limit: limit, status: status }).then(function (_ref) { | ||
return this.oSwindon.call('chat.subscribe', [], { role: role, offset: offset, limit: limit, status: status, project: project }).then(function (_ref) { | ||
var name = _ref.name, | ||
@@ -204,2 +208,3 @@ rooms = _ref.rooms; | ||
store.setIn([setInEntity, setInIndex, 'response_median'], immData.get('response_median')); | ||
store.setIn([setInEntity, setInIndex, 'last_read_messages'], immData.get('last_read_messages')); | ||
}); | ||
@@ -206,0 +211,0 @@ |
@@ -24,2 +24,8 @@ 'use strict'; | ||
// Chat Projects | ||
var CHAT_PROJECT_PROM = exports.CHAT_PROJECT_PROM = 'prom'; | ||
var CHAT_PROJECT_BIGL = exports.CHAT_PROJECT_BIGL = 'bigl'; | ||
var CHAT_PROJECT_KABANCHIK = exports.CHAT_PROJECT_KABANCHIK = 'kabanchik'; | ||
var CHAT_PROJECT_SHAFA = exports.CHAT_PROJECT_SHAFA = 'shafa'; | ||
// chat | ||
@@ -26,0 +32,0 @@ var BESIDA_ROLE_COMPANY = exports.BESIDA_ROLE_COMPANY = 'company'; |
{ | ||
"name": "@evo/chat-core", | ||
"version": "0.3.2", | ||
"version": "0.3.3", | ||
"description": "core Besida module with base functional set for chat", | ||
@@ -5,0 +5,0 @@ "repository": { |
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
41918
742