feat(market): host and publish the cover photo with each offer

Wire the Blossom MediaTransport into publishing: shareable lots carry
their varietyId, publishLots uploads the lot's cover photo and puts the
returned URL on the offer (best-effort — a hosting failure still publishes
the offer, just without a photo). Add a configurable media server (Comunes
default, empty to opt out) to settings and the market advanced config.
This commit is contained in:
vjrj 2026-07-10 21:12:36 +02:00
parent 5bc1715637
commit fa53295439
17 changed files with 280 additions and 22 deletions

View file

@ -27,6 +27,15 @@ void main() {
expect(await settings.relayUrls(), isEmpty);
});
test('media server defaults, is configurable, and can be turned off',
() async {
expect(await settings.mediaServerUrl(), SocialSettings.defaultMediaServer);
await settings.setMediaServerUrl(' https://blossom.example ');
expect(await settings.mediaServerUrl(), 'https://blossom.example');
await settings.setMediaServerUrl(''); // explicit empty = no photo hosting
expect(await settings.mediaServerUrl(), '');
});
test('stores and normalises the area geohash (trim + lowercase)', () async {
await settings.setAreaGeohash(' SP3E9 ');
expect(await settings.areaGeohash(), 'sp3e9');