Support new block message for posts too

This commit is contained in:
Cadence Ember 2021-01-19 01:57:19 +13:00
parent 934e6baf06
commit f94de3b0a4
No known key found for this signature in database
GPG Key ID: BC1C2C61CF521B17
1 changed files with 3 additions and 1 deletions

View File

@ -250,7 +250,7 @@ module.exports = [
} }
} }
} catch (error) { } catch (error) {
if (error === constants.symbols.NOT_FOUND || constants.symbols.RATE_LIMITED || error === constants.symbols.QUOTA_REACHED) { if (error === constants.symbols.NOT_FOUND || constants.symbols.RATE_LIMITED || error === constants.symbols.QUOTA_REACHED || error === constants.symbols.INSTAGRAM_BLOCK_TYPE_DECEMBER) {
const statusCode = error === constants.symbols.QUOTA_REACHED ? 429 : 503 const statusCode = error === constants.symbols.QUOTA_REACHED ? 429 : 503
return { return {
statusCode, statusCode,
@ -304,6 +304,8 @@ module.exports = [
withInstancesLink: false, withInstancesLink: false,
settings settings
}) })
} else if (error === constants.symbols.INSTAGRAM_BLOCK_TYPE_DECEMBER) {
return render(502, "pug/blocked_december.pug")
} else if (error === constants.symbols.RATE_LIMITED) { } else if (error === constants.symbols.RATE_LIMITED) {
return render(503, "pug/blocked_graphql.pug") return render(503, "pug/blocked_graphql.pug")
} else if (error === constants.symbols.QUOTA_REACHED) { } else if (error === constants.symbols.QUOTA_REACHED) {