Expand description
per-emote blocks: hide one exact emote, never a name.
a block is keyed by the emote’s identity (see blockid): the provider’s own
id for 7tv/bttv/kick/ffz/twitch urls, else sha256 of the normalised url — the
same key the extension, desktop and chatterino file, so a block made in any
client hides the emote in every other. a block an older build filed as
btoa(url) is still honoured. two emotes sharing a name (7tv W, bttv W)
are two keys; blocking never touches a name.
the set is process-global: layout and completion consult it without every caller threading it through. the face loads it from config at start and persists after every change.
Structs§
- Blocks
- the blocked emotes: key → the name it was blocked under (“” when learned from the account and never seen here yet), in the order they were blocked.
Constants§
- CAP
- blocks kept — a runaway sync can’t grow the set without bound.
- KEY_MAX
- the server’s block-hash column is varchar(255): longer keys can’t be stored or synced, so they are refused rather than truncated into a key that matches nothing and can never be unblocked.
Functions§
- block
- block this exact emote. false when already blocked or unkeyable.
- describe
- what a key points at, for display: the url’s last two path parts.
- held
- the keys held for this exact emote.
- is_
blocked - is this exact emote hidden right now.
- key
- the key a new block of this emote is filed under. None when it has no url.
- keys_
named - list
- load
- replace the whole set (startup, from config).
- merge_
keys - fold in the account’s blocks (keys only): anything new is added, nothing local is dropped. returns how many were new.
- unblock_
key - unblock by key; the name it was filed under.