3 Commits

Author SHA1 Message Date
6b95652a76 Update package meta 2021-09-04 12:57:47 +02:00
89c4ee229a 1.0.1 2017-10-24 17:04:21 +02:00
990b081b3d Use standard logger instead of RS.log 2017-10-24 17:03:54 +02:00
3 changed files with 10 additions and 13 deletions

2
dist/build.js vendored

File diff suppressed because one or more lines are too long

View File

@@ -360,7 +360,7 @@
* Updates and writes an existing archive document
*/
_updateDocument: function(archive, messages) {
RemoteStorage.log('[chat-messages] Updating archive document', archive);
console.debug('[chat-messages] Updating archive document', archive);
if (Array.isArray(messages)) {
messages.forEach(function(message) {
@@ -379,7 +379,7 @@
* Creates and writes a new archive document
*/
_createDocument: function(messages) {
RemoteStorage.log('[chat-messages] Creating new archive document');
console.debug('[chat-messages] Creating new archive document');
let archive = this._buildArchiveObject();
if (Array.isArray(messages)) {
@@ -454,11 +454,11 @@
let path = this.path.substring(0, this.path.length-this.dateId.length)+archive.today['@id'];
return this.client.storeObject('daily-archive', path, archive).then(() => {
RemoteStorage.log('[chat-messages] Previous archive written to remote storage', path, archive);
console.debug('[chat-messages] Previous archive written to remote storage', path, archive);
return archive;
});
} else {
RemoteStorage.log('[chat-messages] Previous archive not found');
console.debug('[chat-messages] Previous archive not found');
return false;
}
});
@@ -534,13 +534,13 @@
* Write archive document
*/
_sync: function(obj) {
RemoteStorage.log('[chat-messages] Writing archive object', obj);
console.debug('[chat-messages] Writing archive object', obj);
return this.client.storeObject('daily-archive', this.path, obj).then(function(){
RemoteStorage.log('[chat-messages] Archive written to remote storage');
console.debug('[chat-messages] Archive written to remote storage');
return true;
},function(error){
console.log('[chat-messages] Error trying to store object', error);
console.warn('[chat-messages] Error trying to store object', error);
return error;
});
}

View File

@@ -1,6 +1,6 @@
{
"name": "remotestorage-module-chat-messages",
"version": "1.0.0",
"version": "1.0.1",
"description": "Stores chat messages in daily archive files",
"main": "./dist/build.js",
"scripts": {
@@ -9,10 +9,7 @@
"build": "NODE_ENV=production webpack -p",
"version": "npm run build && git add dist/"
},
"author": "Kosmos Developers <mail@kosmos.org> (https://kosmos.org)",
"contributors": [
"Sebastian Kippe <sebastian@kip.pe>"
],
"author": "Kosmos Contributors <mail@kosmos.org> (https://kosmos.org)",
"license": "MIT",
"repository": {
"type": "git",