https://github.com/lskjs/lsk-chat
LSK Chat, Messages and Comments module
https://github.com/lskjs/lsk-chat
chat comments isomorphic javascript lsk messages module nodejs react universal
Last synced: 2 months ago
JSON representation
LSK Chat, Messages and Comments module
- Host: GitHub
- URL: https://github.com/lskjs/lsk-chat
- Owner: lskjs
- License: mit
- Created: 2017-05-05T12:21:06.000Z (about 9 years ago)
- Default Branch: master
- Last Pushed: 2018-12-04T18:05:10.000Z (over 7 years ago)
- Last Synced: 2025-01-17T23:30:25.628Z (over 1 year ago)
- Topics: chat, comments, isomorphic, javascript, lsk, messages, module, nodejs, react, universal
- Language: JavaScript
- Homepage: https://lsk.mgbeta.ru/demo/chat
- Size: 85 KB
- Stars: 3
- Watchers: 5
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
Awesome Lists containing this project
README
# LSK Chat module
```js
Message.getRole(userId) -> owner
Message.is('owner') // ?
Message.roles = {
owner: {
read: ['title', 'createdAt'], // all
write: ['user, 'owner'] // info
}
guest: {
read: ['title', 'createdAt'], // all
write: ['user, 'owner'] // null
}
validate params
1) OWNER
2) Public
Message.isOwner = (userId) => { this.ownerId } ['content']
Message.canWrite = ['content']
MEssage.canWrite = ['content']
schema = {
title: {
canWrite: () => {}
}
}
```