Merge branch 'develop' into swn
This commit is contained in:
commit
18d6a663f8
11 changed files with 46 additions and 7 deletions
|
@ -12,10 +12,13 @@
|
|||
## 12.x.x (unreleased)
|
||||
|
||||
### Improvements
|
||||
- リモートユーザーのDeleteアクティビティに対応
|
||||
- ActivityPub: リモートユーザーのDeleteアクティビティに対応
|
||||
- ActivityPub: add resolver check for blocked instance
|
||||
- UIの改善
|
||||
|
||||
### Bugfixes
|
||||
- アカウントデータのエクスポート/インポート処理ができない問題を修正
|
||||
- アンテナの既読が付かない問題を修正
|
||||
- popupで設定ページを表示すると、アカウントの削除ページにアクセスすることができない問題を修正
|
||||
|
||||
## 12.90.1 (2021/09/05)
|
||||
|
|
|
@ -104,6 +104,12 @@ Related projects
|
|||
- [misskey.js](https://github.com/misskey-dev/misskey.js) - Misskey SDK for JavaScript
|
||||
- [mfm.js](https://github.com/misskey-dev/mfm.js) - MFM parser
|
||||
|
||||
Sponsors
|
||||
----------------------------------------------------------------
|
||||
<div align="center">
|
||||
<a class="rss3" title="RSS3" href="https://rss3.io/" target="_blank" style="display: inline-block;"><img src="https://rss3.io/assets/images/Logo.svg" alt="RSS3" style="display: inline-block; height: 60px;"></a>
|
||||
</div>
|
||||
|
||||
:heart: Backers
|
||||
----------------------------------------------------------------
|
||||
<!-- PATREON_START -->
|
||||
|
|
|
@ -51,6 +51,18 @@ export default defineComponent({
|
|||
icon: this.src === 'local' ? 'fas fa-comments' : this.src === 'social' ? 'fas fa-share-alt' : this.src === 'global' ? 'fas fa-globe' : 'fas fa-home',
|
||||
bg: 'var(--bg)',
|
||||
actions: [{
|
||||
icon: 'fas fa-list-ul',
|
||||
text: this.$ts.lists,
|
||||
handler: this.chooseList
|
||||
}, {
|
||||
icon: 'fas fa-satellite',
|
||||
text: this.$ts.antennas,
|
||||
handler: this.chooseAntenna
|
||||
}, {
|
||||
icon: 'fas fa-satellite-dish',
|
||||
text: this.$ts.channel,
|
||||
handler: this.chooseChannel
|
||||
}, {
|
||||
icon: 'fas fa-calendar-alt',
|
||||
text: this.$ts.jumpToSpecifiedDate,
|
||||
handler: this.timetravel
|
||||
|
|
|
@ -4,7 +4,7 @@ import * as fs from 'fs';
|
|||
|
||||
import { queueLogger } from '../../logger';
|
||||
import addFile from '@/services/drive/add-file';
|
||||
import dateFormat from 'dateformat';
|
||||
import * as dateFormat from 'dateformat';
|
||||
import { getFullApAccount } from '@/misc/convert-host';
|
||||
import { Users, Blockings } from '@/models/index';
|
||||
import { MoreThan } from 'typeorm';
|
||||
|
|
|
@ -4,7 +4,7 @@ import * as fs from 'fs';
|
|||
|
||||
import { queueLogger } from '../../logger';
|
||||
import addFile from '@/services/drive/add-file';
|
||||
import dateFormat from 'dateformat';
|
||||
import * as dateFormat from 'dateformat';
|
||||
import { getFullApAccount } from '@/misc/convert-host';
|
||||
import { Users, Followings } from '@/models/index';
|
||||
import { MoreThan } from 'typeorm';
|
||||
|
|
|
@ -4,7 +4,7 @@ import * as fs from 'fs';
|
|||
|
||||
import { queueLogger } from '../../logger';
|
||||
import addFile from '@/services/drive/add-file';
|
||||
import dateFormat from 'dateformat';
|
||||
import * as dateFormat from 'dateformat';
|
||||
import { getFullApAccount } from '@/misc/convert-host';
|
||||
import { Users, Mutings } from '@/models/index';
|
||||
import { MoreThan } from 'typeorm';
|
||||
|
|
|
@ -4,7 +4,7 @@ import * as fs from 'fs';
|
|||
|
||||
import { queueLogger } from '../../logger';
|
||||
import addFile from '@/services/drive/add-file';
|
||||
import dateFormat from 'dateformat';
|
||||
import * as dateFormat from 'dateformat';
|
||||
import { Users, Notes, Polls } from '@/models/index';
|
||||
import { MoreThan } from 'typeorm';
|
||||
import { Note } from '@/models/entities/note';
|
||||
|
|
|
@ -4,7 +4,7 @@ import * as fs from 'fs';
|
|||
|
||||
import { queueLogger } from '../../logger';
|
||||
import addFile from '@/services/drive/add-file';
|
||||
import dateFormat from 'dateformat';
|
||||
import * as dateFormat from 'dateformat';
|
||||
import { getFullApAccount } from '@/misc/convert-host';
|
||||
import { Users, UserLists, UserListJoinings } from '@/models/index';
|
||||
import { In } from 'typeorm';
|
||||
|
|
|
@ -4,6 +4,8 @@ import { ILocalUser } from '@/models/entities/user';
|
|||
import { getInstanceActor } from '@/services/instance-actor';
|
||||
import { signedGet } from './request';
|
||||
import { IObject, isCollectionOrOrderedCollection, ICollection, IOrderedCollection } from './type';
|
||||
import { fetchMeta } from '@/misc/fetch-meta';
|
||||
import { extractDbHost } from '@/misc/convert-host';
|
||||
|
||||
export default class Resolver {
|
||||
private history: Set<string>;
|
||||
|
@ -44,6 +46,12 @@ export default class Resolver {
|
|||
|
||||
this.history.add(value);
|
||||
|
||||
const meta = await fetchMeta();
|
||||
const host = extractDbHost(value);
|
||||
if (meta.blockedHosts.includes(host)) {
|
||||
throw new Error('Instance is blocked');
|
||||
}
|
||||
|
||||
if (config.signToActivityPubGet && !this.user) {
|
||||
this.user = await getInstanceActor();
|
||||
}
|
||||
|
|
|
@ -40,7 +40,12 @@ export default async (endpoint: string, user: User | null | undefined, token: Ac
|
|||
}
|
||||
|
||||
if (ep.meta.requireCredential && user!.isSuspended) {
|
||||
throw new ApiError(accessDenied, { reason: 'Your account has been suspended.' });
|
||||
throw new ApiError({
|
||||
message: 'Your account has been suspended.',
|
||||
code: 'YOUR_ACCOUNT_SUSPENDED',
|
||||
id: 'a8c724b3-6e9c-4b46-b1a8-bc3ed6258370',
|
||||
httpStatusCode: 403
|
||||
});
|
||||
}
|
||||
|
||||
if (ep.meta.requireAdmin && !user!.isAdmin) {
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
import $ from 'cafy';
|
||||
import { ID } from '@/misc/cafy-id';
|
||||
import define from '../../define';
|
||||
import readNote from '@/services/note/read';
|
||||
import { Antennas, Notes, AntennaNotes } from '@/models/index';
|
||||
import { makePaginationQuery } from '../../common/make-pagination-query';
|
||||
import { generateVisibilityQuery } from '../../common/generate-visibility-query';
|
||||
|
@ -84,5 +85,9 @@ export default define(meta, async (ps, user) => {
|
|||
.take(ps.limit!)
|
||||
.getMany();
|
||||
|
||||
if (notes.length > 0) {
|
||||
readNote(user.id, notes);
|
||||
}
|
||||
|
||||
return await Notes.packMany(notes, user);
|
||||
});
|
||||
|
|
Loading…
Reference in a new issue