|
@@ -12,10 +12,12 @@ ChatManager = class ChatManager {
|
|
}
|
|
}
|
|
|
|
|
|
/**
|
|
/**
|
|
- * Order two comparable objects as min, max
|
|
|
|
|
|
+ * Order two comparable objects (usually strings) as min, max.
|
|
*
|
|
*
|
|
* @param {Object} s1
|
|
* @param {Object} s1
|
|
|
|
+ * The first object.
|
|
* @param {Object} s2
|
|
* @param {Object} s2
|
|
|
|
+ * The second object.
|
|
* @returns {*[]}
|
|
* @returns {*[]}
|
|
* An array of the two objects, minimum first, maximum last.
|
|
* An array of the two objects, minimum first, maximum last.
|
|
*/
|
|
*/
|
|
@@ -76,6 +78,7 @@ ChatManager = class ChatManager {
|
|
*
|
|
*
|
|
* @param {Object} chat
|
|
* @param {Object} chat
|
|
* A chat object, with user1Id, user2Id, and messages keys.
|
|
* A chat object, with user1Id, user2Id, and messages keys.
|
|
|
|
+ *
|
|
* @returns {String}
|
|
* @returns {String}
|
|
* The id of the inserted chat document.
|
|
* The id of the inserted chat document.
|
|
*/
|
|
*/
|
|
@@ -97,6 +100,8 @@ ChatManager = class ChatManager {
|
|
* A chat object, with user1Id, user2Id, and messages keys.
|
|
* A chat object, with user1Id, user2Id, and messages keys.
|
|
* @param {String} chatValue
|
|
* @param {String} chatValue
|
|
* The message to push.
|
|
* The message to push.
|
|
|
|
+ *
|
|
|
|
+ * @returns {void}
|
|
*/
|
|
*/
|
|
static pushMessageMethod(chat, chatValue) {
|
|
static pushMessageMethod(chat, chatValue) {
|
|
check(chat, {
|
|
check(chat, {
|