Add Contact and Channelsettings to explicitly enable Picture preview.

This commit is contained in:
ericz committed 2026-08-10 22:21:10 +02:00
1 parent b137dd8fe1
commit d920449cbb
31 files changed
+421 -56

No files matched your search

+9 -1
View File
@@ -58,7 +58,15 @@ void main() {
expect(await MessageImageHelper.parse('hello world'), isNull);
});
test('returns null for non-image ipfs gateway url', () async {
test('detects supported image URLs without resolving them', () {
expect(
MessageImageHelper.hasPotentialImageUrl('https://pyx.li/?i=RzmdkTsE'),
isTrue,
);
expect(MessageImageHelper.hasPotentialImageUrl('hello world'), isFalse);
});
test('returns null for non-image ipfs gateway URL', () async {
final attachment = await MessageImageHelper.parseVerified(
'https://lime-famous-rat-748.mypinata.cloud/ipfs/bafybeih3jqv36rsxqx7yw3k3ixhganrevrk7xmcxgkr2zuzjegxdytb3nq',
);