logo

pleroma-fe

My custom branche(s) on git.pleroma.social/pleroma/pleroma-fe git clone https://anongit.hacktivis.me/git/pleroma-fe.git/

status_parser.js (362B)


  1. import { filter } from 'lodash'
  2. export const muteWordHits = (status, muteWords) => {
  3. const statusText = status.text.toLowerCase()
  4. const statusSummary = status.summary.toLowerCase()
  5. const hits = filter(muteWords, (muteWord) => {
  6. return statusText.includes(muteWord.toLowerCase()) || statusSummary.includes(muteWord.toLowerCase())
  7. })
  8. return hits
  9. }