UNPKG

matrix-react-sdk

Version:
50 lines (49 loc) 1.44 kB
import React from "react"; import { MatrixEvent } from "matrix-js-sdk/src/matrix"; declare module "matrix-js-sdk/src/types" { interface TimelineEvents { [ABUSE_EVENT_TYPE]: AbuseEventContent; } } interface IProps { mxEvent: MatrixEvent; onFinished(report?: boolean): void; } interface IState { reason: string; busy: boolean; err?: string; nature?: ExtendedNature; ignoreUserToo: boolean; } export declare const ABUSE_EVENT_TYPE = "org.matrix.msc3215.abuse.report"; interface AbuseEventContent { event_id: string; room_id: string; moderated_by_id: string; nature?: ExtendedNature; reporter: string; comment: string; } declare enum Nature { Disagreement = "org.matrix.msc3215.abuse.nature.disagreement", Toxic = "org.matrix.msc3215.abuse.nature.toxic", Illegal = "org.matrix.msc3215.abuse.nature.illegal", Spam = "org.matrix.msc3215.abuse.nature.spam", Other = "org.matrix.msc3215.abuse.nature.other" } declare enum NonStandardValue { Admin = "non-standard.abuse.nature.admin" } type ExtendedNature = Nature | NonStandardValue; export default class ReportEventDialog extends React.Component<IProps, IState> { private moderation?; constructor(props: IProps); private onIgnoreUserTooChanged; private onReasonChange; private onNatureChosen; private onCancel; private onSubmit; render(): React.ReactNode; } export {};