Exclude channel notes from featured polls (#13838)
* feat(backend): add `channelId` to `MiPoll` as a Denormalized field * feat(backend): option to exclude polls in channels * chore: exclude channel notes from featured polls * docs(changelog): みつけるのアンケート欄にてチャンネルのアンケートが含まれてしまう問題を修正 * fix: missing license header
This commit is contained in:
parent
4d0db37d2e
commit
f6df94070b
7 changed files with 44 additions and 0 deletions
|
@ -8,6 +8,7 @@ import { noteVisibilities } from '@/types.js';
|
|||
import { id } from './util/id.js';
|
||||
import { MiNote } from './Note.js';
|
||||
import type { MiUser } from './User.js';
|
||||
import type { MiChannel } from "@/models/Channel.js";
|
||||
|
||||
@Entity('poll')
|
||||
export class MiPoll {
|
||||
|
@ -58,6 +59,14 @@ export class MiPoll {
|
|||
comment: '[Denormalized]',
|
||||
})
|
||||
public userHost: string | null;
|
||||
|
||||
@Index()
|
||||
@Column({
|
||||
...id(),
|
||||
nullable: true,
|
||||
comment: '[Denormalized]',
|
||||
})
|
||||
public channelId: MiChannel['id'] | null;
|
||||
//#endregion
|
||||
|
||||
constructor(data: Partial<MiPoll>) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue