-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Messages/Alerts #30
Comments
Well we can have a message queue under the user schema. Different events would generate messages for that queue. We can utilize node's |
For commenting on resources you mean? What word filter would we implement? |
@Arinerron Not just for commenting, but yeah. There's already a wordfilter in place - porter from the old os. Try swearing in your about me |
I think we need to add a couple more words :P |
@NanaLan Ehh, I'll just trust you :P |
@The-Cheese-Eater commit them then |
We should use Scratch's swear remover. Theirs works much better, and then we can be sure Scratch approves if we use the same technology for filtering as them. |
@Arinerron we're using exactly the same filter as llk/s2forums. |
@NanaLan Really? Scratch's filter is that bad at catching them? I remember a comment on @thisandagain's profile about which filter they used for commenting, and I'm fairly certain it wasn't how we are doing it :P |
The filter shown in |
@thisandagain Oh, oops... What filter would you recommend we use? 😃 |
Didn't OpenSprites previously use a big list of swear words? I remember seeing a link somewhere in the old repo. |
Ideas: Message schema
(more info can be gained from the ObjectId link to generate the message) Alert schema
I'll turn the current User model into an OpenSprites model like I did with Resource and Collection and then we can add this 📦 |
Also, instead of spamming users messages for each individual action that occurs (like Scratch), we should collapse messages in the queue Example:
We should also have settings for what types of messages to display (filter by type and subtype fields we have in the schema) |
A filter would be nice. Which 'phase' would be better for filtering things out, though? Backend or frontend? (out of curiousity) |
Probably the server. |
Rule #1 of web programming is that you never trust the client. If we let the client do filtering, haxx0rs would submit unfiltered content |
@MegaApuTurkUltra I thought @rumanti meant the client doing something like this? const res = await ajax.get('/messages')
const filter = { type: 'comment' }
let msgs = res.filter(msg => msg.type === filter.type) // here!
// do something to parse the mesages into htmk
document.querySelector('#messages').innerHTML = msgs
...but they don't submit anything, right? |
Oh, I was confused because we were talking about bad word filtering in this thread 😜 We should do it on the server to avoid sending unnecessary data to the client though |
But if we can do it on the client, it'd basically be instant - and it can be in a single page rather than forcing the page to go to/ajax.get |
Just like scratch.
No idea how we should implement this: @MegaApuTurkUltra ideas?
I feel like simply pushing to db.User.find(...).messages won't be robust enough
The text was updated successfully, but these errors were encountered: