Why Nostr? What is Njump?
2024-09-05 14:11:32

feld on Nostr: Just spotted an Elixir trick I haven't seen before def ...

Just spotted an Elixir trick I haven't seen before

def visible_for_user?(%{__struct__: module} = message, user)
when module in [Activity, Object] do


now that's a neat way to match on both struct types
Author Public Key
npub1swcr8w6tyv7apu54cuda5efm96mzfdl4hmg5fkcczyrjd396fpzqtny2dn