feat(typingIndicator): Option to not show indicator for blocked users (#513)

This commit is contained in:
fawn 2023-03-19 08:13:17 +00:00 committed by GitHub
parent 0fb79b763d
commit 17c3496542
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 14 additions and 10 deletions

View file

@ -16,9 +16,7 @@
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
import { PatchReplacement } from "./types";
export type ReplaceFn = (match: string, ...groups: string[]) => string;
import { PatchReplacement, ReplaceFn } from "./types";
export function canonicalizeMatch(match: RegExp | string) {
if (typeof match === "string") return match;

View file

@ -19,13 +19,13 @@
import { Command } from "@api/Commands";
import { Promisable } from "type-fest";
import type { ReplaceFn } from "./patches";
// exists to export default definePlugin({...})
export default function definePlugin<P extends PluginDef>(p: P & Record<string, any>) {
return p;
}
export type ReplaceFn = (match: string, ...groups: string[]) => string;
export interface PatchReplacement {
match: string | RegExp;
replace: string | ReplaceFn;