@spiderrobotpig here's a real quick way to find a distinct list of instances you need to whitelist based on all the sites people are following:

1. sudo into the mastodon user
2. as the mastodon user, run "psql mastodon_production"
2. run this query:

select distinct followed.domain from accounts local
join follows
on local.id
join accounts followed
on follows.target_account_id = followed.id
where local.domain is null

@spiderrobotpig uh ok follows dont seem to be pulling properly????? that's kinda frigging weird

@spiderrobotpig you wouldn't mess anything up. also it was pebkac, i was on kobold.space so my list was much smaller lmao

here's the query:

select distinct followed.domain from accounts local
join follows
on local.id = follows.account_id
join accounts followed
on follows.target_account_id = followed.id
where local.domain is null

@spiderrobotpig this will get you a distinct list of follows from local users. this won't be everyone who follows you though, which i can give you a query for that if you like

@vahnj
Nah, what you said sounds good?

If I need more, I'll figure that out haha

@spiderrobotpig it doesn't change anything, it gets you a list of sites that you can use to whitelist

@spiderrobotpig copy paste all the lines and add a semicolon at the end. use up and down arrow keys to naviagte the list

@vahnj Okay that worked.

So, could you give me the whitelist command again, because I can't get back into occult.camp in a web browser because there's something going on with the DM thing probably and I can't fix it right now

@spiderrobotpig DomainWhitelistService.call('domain.name', <status>)

where status is:

:enable
or
:silence

I'm gonna guess you just want :enable

@vahnj Actually one last thing.

Rails console, is that the RAILS_ENV=production thing or something else?

@vahnj RAILS_ENV=product bundle exec rails c DomainWhitelistService.call('scalie.club', :enable>)

@spiderrobotpig ok so the only thing you want to do is this:

RAILS_ENV=product bundle exec rails c

once that loads, *then* you run that DomainWhitelistService command

Follow

@vahnj /home/mastodon/live/vendor/bundle/ruby/2.5.0/gems/activerecord-5.1.4/lib/active_record/connection_adapters/connection_specification.rb:246:in `resolve_symbol_connection': 'product' database is not configured. Available: ["default", "development", "test", "production"] (ActiveRecord::AdapterNotSpecified)

I'M SORRY EVERYTHING IS BREAKING

@spiderrobotpig perhaps my only redeeming quality is i am patient with people who don't get angry about things not working haha

@vahnj

That's a good thing.

Also it's still breaking >^<

Traceback (most recent call last):
1: from (irb):1
NameError (uninitialized constant DomainWhitelistService)

@spiderrobotpig agh! me again

do WhitelistDomainService, instead of the one there

@vahnj Okay, I think that worked? It just printed the number 4, but no errors, so that's prolly good

@spiderrobotpig i think im gonna hop of my lappy now the compiling step is *still* going for me and i'm ready for a break. cheers~

Sign in to participate in the conversation
Awoo Space

Awoo.space is a Mastodon instance where members can rely on a team of moderators to help resolve conflict, and limits federation with other instances using a specific access list to minimize abuse.

While mature content is allowed here, we strongly believe in being able to choose to engage with content on your own terms, so please make sure to put mature and potentially sensitive content behind the CW feature with enough description that people know what it's about.

Before signing up, please read our community guidelines. While it's a very broad swath of topics it covers, please do your best! We believe that as long as you're putting forth genuine effort to limit harm you might cause – even if you haven't read the document – you'll be okay!