message: Avoid applying CW detection to "title" of notifications
diff: @@ -2,8 +2,20 @@ import './contentWarnings.css';
  import {onChirpAdded} from '../services/chirpHandler';
  import {makeBTDModule, makeBtdUuidSelector} from '../types/btdCommonTypes';
  +import {TwitterActionEnum} from '../types/tweetdeckTypes';
  import {extractContentWarnings} from './contentWarningsHelpers';
  +const contentWarningsIgnoreList = [
  + TwitterActionEnum.FAVORITE,
  + TwitterActionEnum.FAVORITED_MEDIA,
  + TwitterActionEnum.FAVORITED_MENTION,
  + TwitterActionEnum.FAVORITED_RETWEET,
  + TwitterActionEnum.RETWEETED_MEDIA,
  + TwitterActionEnum.RETWEETED_MENTION,
  + TwitterActionEnum.RETWEETED_RETWEET,
  + TwitterActionEnum.RETWEET,
  +];
  +
  export const contentWarnings = makeBTDModule(({TD, settings}) => {
  if (!settings.detectContentWarnings) {
  return;
  @@ -20,7 +32,25 @@ export const contentWarnings = makeBTDModule(({TD, settings}) => {
  return;
  }
  - const matches = extractContentWarnings(payload.chirp.text);
  + // if (
  + // payload.chirpExtra.action &&
  + // contentWarningsIgnoreList.includes(payload.chirpExtra.action)
  + // ) {
  + // return;
  + // }
  +
  + const isNotificationAboutTweet =
  + payload.chirpExtra.action && contentWarningsIgnoreList.includes(payload.chirpExtra.action);
  + const textToMatchAgainst =
  + isNotificationAboutTweet && payload.chirp.targetTweet
  + ? payload.chirp.targetTweet.text
  + : payload.chirp.text;
  + const htmlTextToMatchAgainst =
  + isNotificationAboutTweet && payload.chirp.targetTweet
  + ? payload.chirp.targetTweet.htmlText
  + : payload.chirp.htmlText;
  +
  + const matches = extractContentWarnings(textToMatchAgainst);
  if (!matches) {
  return;
  @@ -49,7 +79,7 @@ export const contentWarnings = makeBTDModule(({TD, settings}) => {
  const tweetText = document.createElement('p');
  tweetText.classList.add('tweet-text', 'js-tweet-text', 'with-linebreaks');
  - tweetText.innerHTML = payload.chirp.htmlText
  + tweetText.innerHTML = htmlTextToMatchAgainst
  .replace(TD.util.escape(warningBlock), '')
  .replace(/^\n/, '');
  details.appendChild(tweetText);
  