@ -66,7 +66,8 @@ router.get('/notes/:note', async (ctx, next) => {
|
||||
|
||||
const note = await Note.findOne({
|
||||
_id: new mongo.ObjectID(ctx.params.note),
|
||||
visibility: { $in: ['public', 'home'] }
|
||||
visibility: { $in: ['public', 'home'] },
|
||||
localOnly: { $ne: true }
|
||||
});
|
||||
|
||||
if (note === null) {
|
||||
@ -83,7 +84,8 @@ router.get('/notes/:note', async (ctx, next) => {
|
||||
router.get('/notes/:note/activity', async ctx => {
|
||||
const note = await Note.findOne({
|
||||
_id: new mongo.ObjectID(ctx.params.note),
|
||||
visibility: { $in: ['public', 'home'] }
|
||||
visibility: { $in: ['public', 'home'] },
|
||||
localOnly: { $ne: true }
|
||||
});
|
||||
|
||||
if (note === null) {
|
||||
|
@ -55,7 +55,8 @@ export default async (ctx: Router.IRouterContext) => {
|
||||
|
||||
const query = {
|
||||
userId: user._id,
|
||||
visibility: { $in: ['public', 'home'] }
|
||||
visibility: { $in: ['public', 'home'] },
|
||||
localOnly: { $ne: true }
|
||||
} as any;
|
||||
|
||||
if (sinceId) {
|
||||
|
@ -74,6 +74,14 @@ export const meta = {
|
||||
}
|
||||
},
|
||||
|
||||
localOnly: {
|
||||
validator: $.bool.optional,
|
||||
default: false,
|
||||
desc: {
|
||||
'ja-JP': 'ローカルのみに投稿か否か。'
|
||||
}
|
||||
},
|
||||
|
||||
geo: {
|
||||
validator: $.obj({
|
||||
coordinates: $.arr().length(2)
|
||||
@ -226,6 +234,7 @@ export default define(meta, (ps, user, app) => new Promise(async (res, rej) => {
|
||||
cw: ps.cw,
|
||||
app,
|
||||
viaMobile: ps.viaMobile,
|
||||
localOnly: ps.localOnly,
|
||||
visibility: ps.visibility,
|
||||
visibleUsers,
|
||||
geo: ps.geo
|
||||
|
Reference in New Issue
Block a user