mirror of
https://codeberg.org/yeentown/barkey
synced 2024-11-25 22:15:17 +00:00
copy from global-timeline to bubble-timeline
This commit is contained in:
parent
b4624ce035
commit
98c7b95ecc
1 changed files with 5 additions and 4 deletions
|
@ -11,6 +11,7 @@ import { bindThis } from '@/decorators.js';
|
||||||
import { RoleService } from '@/core/RoleService.js';
|
import { RoleService } from '@/core/RoleService.js';
|
||||||
import type { MiMeta } from '@/models/Meta.js';
|
import type { MiMeta } from '@/models/Meta.js';
|
||||||
import { isRenotePacked, isQuotePacked } from '@/misc/is-renote.js';
|
import { isRenotePacked, isQuotePacked } from '@/misc/is-renote.js';
|
||||||
|
import type { JsonObject } from '@/misc/json-value.js';
|
||||||
import Channel, { MiChannelService } from '../channel.js';
|
import Channel, { MiChannelService } from '../channel.js';
|
||||||
|
|
||||||
class BubbleTimelineChannel extends Channel {
|
class BubbleTimelineChannel extends Channel {
|
||||||
|
@ -35,13 +36,13 @@ class BubbleTimelineChannel extends Channel {
|
||||||
}
|
}
|
||||||
|
|
||||||
@bindThis
|
@bindThis
|
||||||
public async init(params: any) {
|
public async init(params: JsonObject) {
|
||||||
const policies = await this.roleService.getUserPolicies(this.user ? this.user.id : null);
|
const policies = await this.roleService.getUserPolicies(this.user ? this.user.id : null);
|
||||||
if (!policies.btlAvailable) return;
|
if (!policies.btlAvailable) return;
|
||||||
|
|
||||||
this.withRenotes = params.withRenotes ?? true;
|
this.withRenotes = !!(params.withRenotes ?? true);
|
||||||
this.withFiles = params.withFiles ?? false;
|
this.withFiles = !!(params.withFiles ?? false);
|
||||||
this.withBots = params.withBots ?? true;
|
this.withBots = !!(params.withBots ?? true);
|
||||||
this.instance = await this.metaService.fetch();
|
this.instance = await this.metaService.fetch();
|
||||||
|
|
||||||
// Subscribe events
|
// Subscribe events
|
||||||
|
|
Loading…
Reference in a new issue