5
0
Fork 0
mirror of https://0xacab.org/sutty/sutty synced 2025-02-23 04:31:49 +00:00

Merge branch 'rails' into production.panel.sutty.nl

This commit is contained in:
f 2025-01-24 13:44:27 -03:00
commit 516203f09a
No known key found for this signature in database
3 changed files with 28 additions and 0 deletions

View file

@ -517,6 +517,9 @@ en:
storage network may continue retaining copies of the data storage network may continue retaining copies of the data
indefinitely. indefinitely.
Also, your site will be featured on the [Distributed
Press directory](https://explore.distributed.press/).
[Learn more](https://sutty.nl/en/learn-more-about-publish-to-dweb-functionality/) [Learn more](https://sutty.nl/en/learn-more-about-publish-to-dweb-functionality/)
deploy_social_distributed_press: deploy_social_distributed_press:
title: 'Publish on the Fediverse' title: 'Publish on the Fediverse'

View file

@ -521,6 +521,9 @@ es:
nodos en la red de almacenamiento distribuida puedan retener nodos en la red de almacenamiento distribuida puedan retener
copias de tu contenido indefinidamente. copias de tu contenido indefinidamente.
Además, tu sitio aparecerá en el [directorio de Distributed
Press](https://explore.distributed.press/)
[Saber más](https://sutty.nl/saber-mas-sobre-publicar-a-la-web-distribuida/) [Saber más](https://sutty.nl/saber-mas-sobre-publicar-a-la-web-distribuida/)
deploy_social_distributed_press: deploy_social_distributed_press:
title: 'Publicar al Fediverso' title: 'Publicar al Fediverso'

View file

@ -0,0 +1,22 @@
# frozen_string_literal: true
# Los sitios alojados en Distributed Press son públicos por defecto y no
# tienen HTTP, porque lo hace Sutty
class DistributedSitesArePublic < ActiveRecord::Migration[6.1]
def up
require 'distributed_press/v1/schemas/update_site'
DeployDistributedPress.all.reject do |deploy|
deploy.values.dig(*%w[remote_info distributed_press public]).present?
end.map do |deploy|
update_site = DistributedPress::V1::Schemas::UpdateSite.new.call(id: deploy.hostname, public: true, protocols: { http: false, hyper: true, ipfs: true })
deploy.send(:site_client).update(update_site)
updated_site = deploy.send(:site_client).show(update_site)
deploy.remote_info[:distributed_press] = updated_site.to_h
deploy.save
end
end
def down; end
end