@evo/chat-core
Advanced tools
Comparing version 0.7.13 to 0.7.15
@@ -36,5 +36,5 @@ 'use strict'; | ||
exports.getUserRoleInRoom = getUserRoleInRoom; | ||
exports.isSpellingError = isSpellingError; | ||
exports.prepareMessage = prepareMessage; | ||
exports.prepareContextMessage = prepareContextMessage; | ||
exports.isSpellingError = isSpellingError; | ||
@@ -201,5 +201,16 @@ var _immutable = require('immutable'); | ||
function getRoom(store, roomIdent) { | ||
return store && (store.get('chats') || _immutable2.default.List()).find(function (chat) { | ||
var room = store && (store.get('chats') || _immutable2.default.List()).find(function (chat) { | ||
return chat.get('room_ident') === roomIdent; | ||
}); | ||
if (room) return room; | ||
return _immutable2.default.Map({ | ||
room_ident: roomIdent, | ||
joined: false, | ||
users: {}, | ||
room_bans: [], | ||
response_median: 0, | ||
last_read_messages: {}, | ||
history: [] | ||
}); | ||
} | ||
@@ -273,6 +284,2 @@ | ||
function isSpellingError(error) { | ||
return [c.ERROR_TYPE_STOP_WORD, c.ERROR_TYPE_CAPS_LOCK].includes(error); | ||
} | ||
function prepareMessage(baseStore, msgId, roomIdent, body, platform, source, device) { | ||
@@ -342,2 +349,6 @@ var isTemporaryMessage = arguments.length > 7 && arguments[7] !== undefined ? arguments[7] : false; | ||
})); | ||
} | ||
function isSpellingError(error) { | ||
return [c.ERROR_TYPE_STOP_WORD, c.ERROR_TYPE_CAPS_LOCK].includes(error); | ||
} |
{ | ||
"name": "@evo/chat-core", | ||
"version": "0.7.13", | ||
"version": "0.7.15", | ||
"description": "core Besida module with base functional set for chat", | ||
@@ -5,0 +5,0 @@ "author": "d.medvinskiy", |
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
61292
1120