feat(chat): disallow links in messages

Local-first chat between people whose web of trust is still forming is a
natural phishing/scam vector, so messages may not contain URLs. A
conservative `containsUrl` rule (explicit scheme, www., or a common-TLD
domain — but not "3.5kg" or "12.30") gates it: the composer warns and
keeps the text for editing, and MessagesCubit.send drops any URL as a
backstop. Incoming text was already non-tappable (plain selectable text).
This commit is contained in:
vjrj 2026-07-11 07:14:58 +02:00
parent d481e62ff7
commit a461106dbf
14 changed files with 107 additions and 34 deletions

View file

@ -4,9 +4,9 @@
/// To regenerate, run: `dart run slang`
///
/// Locales: 4
/// Strings: 1860 (465 per locale)
/// Strings: 1864 (466 per locale)
///
/// Built on 2026-07-11 at 04:45 UTC
/// Built on 2026-07-11 at 05:13 UTC
// coverage:ignore-file
// ignore_for_file: type=lint, unused_import