Merge branch 'art/dev' into art/bump-13.14.2
Signed-off-by: Mogyuchi <mogyuchi@mogyuchi.jp>
This commit is contained in:
commit
0cb5de2232
37 changed files with 119 additions and 42 deletions
|
|
@ -14,6 +14,7 @@ class GlobalTimelineChannel extends Channel {
|
|||
public static shouldShare = true;
|
||||
public static requireCredential = false;
|
||||
private withReplies: boolean;
|
||||
private withFiles: boolean;
|
||||
|
||||
constructor(
|
||||
private metaService: MetaService,
|
||||
|
|
@ -33,6 +34,7 @@ class GlobalTimelineChannel extends Channel {
|
|||
if (!policies.gtlAvailable) return;
|
||||
|
||||
this.withReplies = params.withReplies as boolean;
|
||||
this.withFiles = params.withFiles as boolean;
|
||||
|
||||
// Subscribe events
|
||||
this.subscriber.on('notesStream', this.onNote);
|
||||
|
|
@ -43,6 +45,9 @@ class GlobalTimelineChannel extends Channel {
|
|||
if (note.visibility !== 'public') return;
|
||||
if (note.channelId != null) return;
|
||||
|
||||
// ファイルを含まない投稿は除外
|
||||
if (this.withFiles && (note.files === undefined || note.files.length === 0)) return;
|
||||
|
||||
// リプライなら再pack
|
||||
if (note.replyId != null) {
|
||||
note.reply = await this.noteEntityService.pack(note.replyId, this.user, {
|
||||
|
|
|
|||
|
|
@ -12,6 +12,7 @@ class HomeTimelineChannel extends Channel {
|
|||
public static shouldShare = true;
|
||||
public static requireCredential = true;
|
||||
private withReplies: boolean;
|
||||
private withFiles: boolean;
|
||||
|
||||
constructor(
|
||||
private noteEntityService: NoteEntityService,
|
||||
|
|
@ -26,6 +27,7 @@ class HomeTimelineChannel extends Channel {
|
|||
@bindThis
|
||||
public async init(params: any) {
|
||||
this.withReplies = params.withReplies as boolean;
|
||||
this.withFiles = params.withFiles as boolean;
|
||||
|
||||
this.subscriber.on('notesStream', this.onNote);
|
||||
}
|
||||
|
|
@ -42,6 +44,9 @@ class HomeTimelineChannel extends Channel {
|
|||
// Ignore notes from instances the user has muted
|
||||
if (isInstanceMuted(note, new Set<string>(this.userProfile!.mutedInstances ?? []))) return;
|
||||
|
||||
// ファイルを含まない投稿は除外
|
||||
if (this.withFiles && (note.files === undefined || note.files.length === 0)) return;
|
||||
|
||||
if (['followers', 'specified'].includes(note.visibility)) {
|
||||
note = await this.noteEntityService.pack(note.id, this.user!, {
|
||||
detail: true,
|
||||
|
|
|
|||
|
|
@ -14,6 +14,7 @@ class HybridTimelineChannel extends Channel {
|
|||
public static shouldShare = true;
|
||||
public static requireCredential = true;
|
||||
private withReplies: boolean;
|
||||
private withFiles: boolean;
|
||||
|
||||
constructor(
|
||||
private metaService: MetaService,
|
||||
|
|
@ -33,6 +34,7 @@ class HybridTimelineChannel extends Channel {
|
|||
if (!policies.ltlAvailable) return;
|
||||
|
||||
this.withReplies = params.withReplies as boolean;
|
||||
this.withFiles = params.withFiles as boolean;
|
||||
|
||||
// Subscribe events
|
||||
this.subscriber.on('notesStream', this.onNote);
|
||||
|
|
@ -51,6 +53,9 @@ class HybridTimelineChannel extends Channel {
|
|||
(note.channelId != null && this.followingChannels.has(note.channelId))
|
||||
)) return;
|
||||
|
||||
// ファイルを含まない投稿は除外
|
||||
if (this.withFiles && (note.files === undefined || note.files.length === 0)) return;
|
||||
|
||||
if (['followers', 'specified'].includes(note.visibility)) {
|
||||
note = await this.noteEntityService.pack(note.id, this.user!, {
|
||||
detail: true,
|
||||
|
|
|
|||
|
|
@ -13,6 +13,7 @@ class LocalTimelineChannel extends Channel {
|
|||
public static shouldShare = true;
|
||||
public static requireCredential = false;
|
||||
private withReplies: boolean;
|
||||
private withFiles: boolean;
|
||||
|
||||
constructor(
|
||||
private metaService: MetaService,
|
||||
|
|
@ -32,6 +33,7 @@ class LocalTimelineChannel extends Channel {
|
|||
if (!policies.ltlAvailable) return;
|
||||
|
||||
this.withReplies = params.withReplies as boolean;
|
||||
this.withFiles = params.withFiles as boolean;
|
||||
|
||||
// Subscribe events
|
||||
this.subscriber.on('notesStream', this.onNote);
|
||||
|
|
@ -43,6 +45,9 @@ class LocalTimelineChannel extends Channel {
|
|||
if (note.visibility !== 'public') return;
|
||||
if (note.channelId != null && !this.followingChannels.has(note.channelId)) return;
|
||||
|
||||
// ファイルを含まない投稿は除外
|
||||
if (this.withFiles && (note.files === undefined || note.files.length === 0)) return;
|
||||
|
||||
// リプライなら再pack
|
||||
if (note.replyId != null) {
|
||||
note.reply = await this.noteEntityService.pack(note.replyId, this.user, {
|
||||
|
|
|
|||
|
|
@ -7,13 +7,13 @@
|
|||
"theme_color": "#86b300",
|
||||
"icons": [
|
||||
{
|
||||
"src": "/static-assets/icons/192.png",
|
||||
"src": "/static-assets/icons/192art.png",
|
||||
"sizes": "192x192",
|
||||
"type": "image/png",
|
||||
"purpose": "maskable"
|
||||
},
|
||||
{
|
||||
"src": "/static-assets/icons/512.png",
|
||||
"src": "/static-assets/icons/512art.png",
|
||||
"sizes": "512x512",
|
||||
"type": "image/png",
|
||||
"purpose": "maskable"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue