re: code
before_create is a callback on ActiveRecords---https://api.rubyonrails.org/classes/ActiveRecord/Callbacks.html
code
oh ok, in app/models/status.rb
:
'''
before_create :set_locality
'''
and then in there
'''
def set_locality
if account.domain.nil? && !attribute_changed?(:local_only)
self.local_only = marked_local_only?
end
end
'''
and a couple paragraphs above that:
'''
def marked_local_only?
# match both with and without U+FE0F (the emoji variation selector)
/#{local_only_emoji}\ufe0f?\z/.match?(content)
end
def local_only_emoji
'👁'
end
'''
also new switch games are cheaper as physical copies from amazon than as downloads from the nintendo store or whatever they call it
@xenon i spoused one of those,, wow,
it’s pronounced “ashling”. canonically a black housecat or any of the grass cat pokémon, but currently experiencing daily TFs. Commewnist. she/it
GlitchCat syscatmin and meowstodev; @ me about techincal problems with the instance, or fur feature requests. i got a job due to some extent to my work on this instance
i have very strong opinions about the sonic furanchise. pokémon has me in a chokehold when it comes to merchandise
available via email and matrix with the same username and domain. DM/message/email for other protocols
workplace policy is to clarify that all of my opinions expressed here are my own, and not those of my employer
“all this shit is still incomprehensible but im glad u accomplished something” ―@wallhackio
“i feel mildly relieved that the obscure and esoteric code that i use to build the site will always be definitely outclassed by the obscure and esoteric code that you use to serve it” ―@Lady