-
Notifications
You must be signed in to change notification settings - Fork 56
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
Improve messaging and checks in NSFW protection #529
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
overall this lgtm - while reviewing it occurred to me we might be able to handle weird future cases as well with some JSON trickery.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
otherwise lgtm, I think.
const msgtype = content['msgtype'] || 'm.text'; | ||
const isMedia = msgtype === 'm.image'; | ||
let content = JSON.stringify(event['content']); | ||
content = content.replace(/"|{|}/g, '') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this could do with a comment for what it's fixing about the input (I'm not sure myself).
No description provided.