From 6cbbb528d6a22e6e3de1d85451a496c26ca16518 Mon Sep 17 00:00:00 2001 From: JubbeArt Date: Wed, 8 Aug 2018 12:05:50 +0200 Subject: [PATCH] Made the deletion/removal detection more robust in case Reddit would change it again --- package.json | 2 +- src/utils.js | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/package.json b/package.json index ef223fc..a9e23de 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "removeddit", - "version": "1.1.1", + "version": "1.1.2", "description": "View removed comments from reddit", "main": "src/index.js", "repository": { diff --git a/src/utils.js b/src/utils.js index 3464810..b95287e 100644 --- a/src/utils.js +++ b/src/utils.js @@ -21,11 +21,11 @@ export const chunk = (arr, size) => { export const toBase36 = number => parseInt(number, 10).toString(36) export const toBase10 = numberString => parseInt(numberString, 36) -// Reddits way of indicating that something is deleted -export const isDeleted = textBody => textBody === '\\[deleted\\]' +// Reddits way of indicating that something is deleted (the '\\' is for Reddit and the other is for pushshift) +export const isDeleted = textBody => textBody === '\\[deleted\\]' || textBody === '[deleted]' // Reddits way of indicating that something is deleted -export const isRemoved = textBody => textBody === '\\[removed\\]' +export const isRemoved = textBody => textBody === '\\[removed\\]' || textBody === '[removed]' // Default thumbnails for reddit threads export const redditThumbnails = ['self', 'default', 'image', 'nsfw']