Publish all social events to community relay

This commit is contained in:
franzap
2026-04-02 21:06:57 -03:00
parent 4d1b6b2656
commit 6f627d20e2
7 changed files with 13 additions and 11 deletions
+1 -1
View File
@@ -662,7 +662,7 @@ class _AppDetailContent extends HookConsumerWidget {
await ref.storage.save({signedStack});
ref.storage.publish({
signedStack,
}, source: RemoteSource(relays: 'social'));
}, relays: {'social', 'AppCatalog'});
if (context.mounted) {
context.showInfo(
+1 -1
View File
@@ -511,7 +511,7 @@ class _MigrationBanner extends HookConsumerWidget {
await ref.storage.save({signedStack});
ref.storage.publish({
signedStack,
}, source: RemoteSource(relays: {'social', 'AppCatalog'}));
}, relays: {'social', 'AppCatalog'});
progressCount.value++;
}
+1 -1
View File
@@ -274,7 +274,7 @@ class SocialActionsRow extends HookConsumerWidget {
await ref.storage.save({signedStack});
ref.storage.publish({
signedStack,
}, source: RemoteSource(relays: 'social'));
}, relays: {'social', 'AppCatalog'});
if (context.mounted) {
context.showInfo(
+3 -3
View File
@@ -167,7 +167,7 @@ class SaveAppDialog extends HookConsumerWidget {
await ref.storage.save({signedStack});
ref.storage.publish({
signedStack,
}, source: RemoteSource(relays: 'social'));
}, relays: {'social', 'AppCatalog'});
if (context.mounted) {
Navigator.pop(context);
@@ -652,7 +652,7 @@ class _AddToStackDialogSignedIn extends HookConsumerWidget {
await ref.storage.save({signedStack});
await ref.storage.publish({
signedStack,
}, source: RemoteSource(relays: {'social', 'AppCatalog'}));
}, relays: {'social', 'AppCatalog'});
}
}
@@ -684,7 +684,7 @@ class _AddToStackDialogSignedIn extends HookConsumerWidget {
await ref.storage.save({signedStack});
await ref.storage.publish({
signedStack,
}, source: RemoteSource(relays: {'social', 'AppCatalog'}));
}, relays: {'social', 'AppCatalog'});
}
}
+3 -3
View File
@@ -677,7 +677,7 @@ class _CommentComposer extends HookConsumerWidget {
final signedComment = await comment.signWith(signer);
await signedComment.save();
await signedComment.publish(source: RemoteSource(relays: 'social'));
await signedComment.publish(relays: {'social', 'AppCatalog'});
if (context.mounted) {
Navigator.pop(context);
@@ -890,7 +890,7 @@ class _ReplyComposer extends HookConsumerWidget {
final signedReply = await reply.signWith(signer);
await signedReply.save();
await signedReply.publish(source: RemoteSource(relays: 'social'));
await signedReply.publish(relays: {'social', 'AppCatalog'});
if (context.mounted) {
Navigator.pop(context);
@@ -1020,7 +1020,7 @@ class _StackCommentComposer extends HookConsumerWidget {
final signedComment = await comment.signWith(signer);
await signedComment.save();
await signedComment.publish(source: RemoteSource(relays: 'social'));
await signedComment.publish(relays: {'social', 'AppCatalog'});
if (context.mounted) {
Navigator.pop(context);
@@ -385,7 +385,7 @@ Future<Model<dynamic>?> _runDVMRequest(
await ref.read(storageNotifierProvider.notifier).publish(
{request},
source: source,
relays: relays,
);
return await completer.future.timeout(timeout);
+3 -1
View File
@@ -445,6 +445,8 @@ class ZapAmountDialog extends HookConsumerWidget {
final socialRelays = await storageNotifier
.resolveRelays('social');
final appCatalogRelays = await storageNotifier
.resolveRelays('AppCatalog');
final zapRequest = PartialZapRequest();
zapRequest.amount = amount * 1000; // msats
@@ -452,7 +454,7 @@ class ZapAmountDialog extends HookConsumerWidget {
zapRequest.linkProfileByPubkey(author.pubkey);
zapRequest.linkModel(app);
zapRequest.linkModelById(latestMetadata.id);
zapRequest.relays = socialRelays;
zapRequest.relays = {...socialRelays, ...appCatalogRelays};
final signedZapRequest = await zapRequest.signWith(
signer,