Stores chat messages in daily archive files
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
raucao 9f477ba14b
Update badge link
1 week ago
dist 2.0.0 1 week ago
src Remove noise from logs 1 week ago
.gitignore Port source from legacy module repo 4 years ago
.jshintrc Port source from legacy module repo 4 years ago
README.md Update badge link 1 week ago
package-lock.json 2.0.0 1 week ago
package.json 2.0.0 1 week ago
webpack.config.js Fix build config to work with node.js 1 week ago

README.md

Release

remoteStorage Module: Chat Messages

Stores chat messages in daily archive documents.

Usage

Open a daily archive and write messages to it:

const RemoteStorage = require("remotestoragejs");
const ChatMessages  = require("remotestorage-module-chat-messages");
const remoteStorage = new RemoteStorage({ modules: [ ChatMessages ] });

const archive = new remoteStorage.chatMessages.DailyArchive({
  service: {
    protocol: 'IRC',
    domain: 'irc.libera.chat'
  },
  channelName: '#kosmos',
  date: new Date(),
  isPublic: true // Channel logs will be written to public folder
});

const messages = [
  { "date": "2015-06-05T17:35:28.454Z", "user": "jimmy", "text": "knock knock" },
  { "date": "2015-06-05T17:36:05.123Z", "user": "walter", "text": "who's there?" }
];

archive.addMessages(messages);

See the inline source code documentation (JSDoc) for usage details and function arguments. For a real-world integration example, see hubot-remotestorage-logger.

Support, bugs, feedback, questions

Come and chat with us: https://wiki.kosmos.org/Main_Page#Chat