Never silently truncate the draft when attaching an IPFS link

Check before uploading that the link (from the gateway and a CIDv1-sized
placeholder) fits with the draft and the reply prefix, and tell the user
when it doesn't instead of cutting their text. The channel limit now
counts the @[name] reply prefix like the send path.
This commit is contained in:
zjs81 committed 2026-10-24 21:57:55 -07:00
1 parent 084a8fb98b
commit 34db64d7af
25 files changed
+315 -103

No files matched your search

+12
View File
@@ -3286,6 +3286,18 @@ abstract class AppLocalizations {
/// **'Configure an IPFS upload provider in App Settings first.'**
String get chat_ipfsUploadNotConfigured;
/// Shown before an IPFS upload when the link would push the draft over the message size limit
///
/// In en, this message translates to:
/// **'Not enough room for the image link. Shorten your message, then try again.'**
String get chat_ipfsLinkNoRoom;
/// Shown after an IPFS upload when the link plus the draft no longer fits the message size limit
///
/// In en, this message translates to:
/// **'Image link added, but the message is now too long. Shorten it before sending.'**
String get chat_ipfsLinkOverLimit;
/// Shown when picking or reading a photo to send fails
///
/// In en, this message translates to: