downgrade method
Implementation
ModerationDecision downgrade() {
final causes = <ModerationCause>[];
for (final cause in this.causes) {
causes.add(cause.when(
blocking: (data) => ModerationCause.blocking(
data: data.copyWith(downgraded: true),
),
blockedBy: (data) => ModerationCause.blockedBy(
data: data.copyWith(downgraded: true),
),
blockOther: (data) => ModerationCause.blockOther(
data: data.copyWith(downgraded: true),
),
label: (data) => ModerationCause.label(
data: data.copyWith(downgraded: true),
),
muted: (data) => ModerationCause.muted(
data: data.copyWith(downgraded: true),
),
muteWord: (data) => ModerationCause.muteWord(
data: data.copyWith(downgraded: true),
),
hidden: (data) => ModerationCause.hidden(
data: data.copyWith(downgraded: true),
),
));
}
return ModerationDecision._(did: did, me: me, causes: causes);
}