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 6a6a81e8a2
commit 1ab243f29e
14 changed files with 107 additions and 34 deletions

View file

@ -772,6 +772,7 @@ class _Translations$chat$ast extends Translations$chat$en {
@override String get today => 'Güei';
@override String get yesterday => 'Ayeri';
@override String get sendError => 'Nun se pudo unviar — comprueba la conexón';
@override String get noLinks => 'Nun se permiten enllaces nos mensaxes';
}
// Path: trust
@ -1624,6 +1625,7 @@ extension on TranslationsAst {
'chat.today' => 'Güei',
'chat.yesterday' => 'Ayeri',
'chat.sendError' => 'Nun se pudo unviar — comprueba la conexón',
'chat.noLinks' => 'Nun se permiten enllaces nos mensaxes',
'trust.none' => 'Naide los avala entá',
'trust.count' => ({required Object n}) => 'Avalada por ${n}',
'trust.vouch' => 'Conozo a esta persona',