Skip to content

Function: maskSpoilers() ​

ts
function maskSpoilers(text, mask?): string;

Defined in: messagePreview.ts:13

Plain-text previews (notifications, toasts) with each spoiler replaced, so they never show what the sender chose to hide.

Parameters ​

ParameterTypeDefault value
textstringundefined
mask?string"[spoiler]"

Returns ​

string

Released under the GNU Affero General Public License v3.0.