New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

happychat-service

Package Overview
Dependencies
Maintainers
3
Versions
104
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

happychat-service - npm Package Compare versions

Comparing version 0.8.4 to 0.8.5

34

lib/chat-list.js

@@ -26,5 +26,5 @@ 'use strict';

var _get = require('lodash/get');
var _get5 = require('lodash/get');
var _get2 = _interopRequireDefault(_get);
var _get6 = _interopRequireDefault(_get5);

@@ -290,3 +290,2 @@ var _set = require('lodash/set');

debug('chat has not been assigned, finding an operator', e, channelIdentity, room_name);
_this4._chats = (0, _set2.default)(_this4._chats, channelIdentity.id, [STATUS_PENDING, channelIdentity]);
var chat = _this4.insertPendingChat(channelIdentity);

@@ -313,4 +312,14 @@ _this4.emit('chat.status', 'pending', chat);

value: function setChatAsMissed(chat, error) {
debug('setChatAsMissed', chat, (0, _get6.default)(this._chats, chat.id));
var _get = (0, _get6.default)(this._chats, chat.id, []);
var _get2 = _slicedToArray(_get, 1);
var status = _get2[0];
this._chats = (0, _set2.default)(this._chats, chat.id, [STATUS_MISSED, chat]);
this.emit('miss', error, chat);
if (status !== STATUS_MISSED) {
this.emit('miss', error, chat);
}
}

@@ -339,3 +348,3 @@ }, {

return new Promise(function (resolve) {
resolve((0, _get2.default)(_this5._chats, chat_id, [])[2]);
resolve((0, _get6.default)(_this5._chats, chat_id, [])[2]);
});

@@ -403,3 +412,14 @@ }

value: function insertPendingChat(channelIdentity) {
this._chats = (0, _set2.default)(this._chats, channelIdentity.id, [STATUS_PENDING, channelIdentity]);
debug('insertPendingChat', channelIdentity);
var _get3 = (0, _get6.default)(this._chats, channelIdentity.id, []);
var _get4 = _slicedToArray(_get3, 1);
var status = _get4[0];
if (!status) {
this._chats = (0, _set2.default)(this._chats, channelIdentity.id, [STATUS_PENDING, channelIdentity]);
}
return channelIdentity;

@@ -439,3 +459,3 @@ }

return new Promise(function (resolve) {
(0, _set2.default)(_this8, '_chats', (0, _omit2.default)((0, _get2.default)(_this8, '_chats', {}), chat.id));
(0, _set2.default)(_this8, '_chats', (0, _omit2.default)((0, _get6.default)(_this8, '_chats', {}), chat.id));
resolve(chat);

@@ -442,0 +462,0 @@ });

{
"name": "happychat-service",
"version": "0.8.4",
"version": "0.8.5",
"description": "Socket.IO based chat server for happychat.",

@@ -5,0 +5,0 @@ "main": "index.js",

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc