mirror of
https://github.com/fenwick67/mastofeed
synced 2025-01-11 00:34:11 +01:00
fix default reply and boost options
This commit is contained in:
parent
0072386666
commit
71edc0a4e5
4
index.js
4
index.js
@ -46,6 +46,8 @@ app.get('/api/feed',function(req,res){
|
|||||||
opts.header = true;
|
opts.header = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
opts.boosts = true;
|
||||||
if (req.query.boosts){
|
if (req.query.boosts){
|
||||||
if (req.query.boosts.toLowerCase() == 'no' || req.query.boosts.toLowerCase() == 'false'){
|
if (req.query.boosts.toLowerCase() == 'no' || req.query.boosts.toLowerCase() == 'false'){
|
||||||
opts.boosts = false;
|
opts.boosts = false;
|
||||||
@ -53,6 +55,8 @@ app.get('/api/feed',function(req,res){
|
|||||||
opts.boosts = true;
|
opts.boosts = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
opts.replies = true;
|
||||||
if (req.query.replies){
|
if (req.query.replies){
|
||||||
if (req.query.replies.toLowerCase() == 'no' || req.query.replies.toLowerCase() == 'false'){
|
if (req.query.replies.toLowerCase() == 'no' || req.query.replies.toLowerCase() == 'false'){
|
||||||
opts.replies = false;
|
opts.replies = false;
|
||||||
|
@ -173,6 +173,14 @@ function buildUp(jsonObj,opts){
|
|||||||
item.isReply = true;
|
item.isReply = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(item.categories){
|
||||||
|
item.hasCw = item.categories.indexOf('nsfw') > -1;
|
||||||
|
|
||||||
|
if(item.hasCw){
|
||||||
|
item.cw = item.summary;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
});
|
});
|
||||||
|
Loading…
Reference in New Issue
Block a user