v-9x / nullmb

anonymous message board featuring session-unique usernames
0 stars 0 forks source link

Can't post messages containing only emojis #1

Closed danny-andrews closed 1 year ago

danny-andrews commented 1 year ago

I tried to make a post with the message "🐸🐸🐸" and nothing rendered to the screen. It looks like it returns a 500 in that case. It seems to work when there are characters interspersed with emojis, but fails when the message contains only emojis.

v-9x commented 1 year ago

Thank you for reaching out, @danny-andrews. We can't have that kind of problem around here. I'll look into this!

danny-andrews commented 1 year ago

I saw your post on LinkedIn and started goofing around with it again. Dug into it a little and it looks like the badwords library freaks out if there are no alphanumeric characters. Do with this ticket what you will and have a good week. πŸ˜„πŸ˜Ž

v-9x commented 1 year ago

I see. Looks like I will have to find an alternative solution. Will report back when it's fixed. Thanks again for looking into this, @danny-andrews.

v-9x commented 1 year ago

Replaced bad-words with bad-words-next. This allows for emoji-only input as well as the same word filtering capabilities. Interestingly enough, this required me to update Render's node version due to an import statement requiring node version 17 or higher, so it has been set to LTS. The site now functions as it should.