Skip to content

Commit

Permalink
https://github.com/bonfire-networks/bonfire-app/issues/847
Browse files Browse the repository at this point in the history
  • Loading branch information
mayel committed Feb 10, 2024
1 parent b8dee3f commit 936aa46
Show file tree
Hide file tree
Showing 6 changed files with 44 additions and 13 deletions.
27 changes: 20 additions & 7 deletions flavours/classic/config/bonfire_data.exs
Original file line number Diff line number Diff line change
Expand Up @@ -265,6 +265,14 @@ common_assocs = %{

# Settings data
settings: quote(do: has_one(:settings, unquote(Settings), foreign_key: :id)),
account:
quote do
has_one(:accounted, unquote(Accounted), foreign_key: :id)

has_one(:account,
through: [:accounted, :account]
)
end,

# FIXME: use the object or edge/activity here?
seen: quote(do: has_one(:seen, unquote(Edge), unquote(mixin_updatable))),
Expand Down Expand Up @@ -452,6 +460,7 @@ edges =
pointer_mixins =
common.([
:activity,
:account,
:actor,
:caretaker,
:character,
Expand Down Expand Up @@ -680,18 +689,22 @@ config :bonfire_data_identity, User,
@follow_ulid "70110WTHE1EADER1EADER1EADE"
# mixins
unquote_splicing(
common.([:actor, :character, :created, :peered, :profile, :settings, :sensitive, :tags])
common.([
:account,
:actor,
:character,
:created,
:peered,
:profile,
:settings,
:sensitive,
:tags
])
)

has_one(:self, unquote(Self), foreign_key: :id)
has_one(:shared_user, unquote(Bonfire.Data.SharedUser), foreign_key: :id)

has_one(:accounted, unquote(Accounted), foreign_key: :id)

has_one(:account,
through: [:accounted, :account]
)

has_one(:instance_admin, unquote(InstanceAdmin),
foreign_key: :user_id,
on_replace: :update
Expand Down
1 change: 1 addition & 0 deletions flavours/classic/config/runtime.exs
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,7 @@ config :bonfire,
default_cache_hours: String.to_integer(System.get_env("BONFIRE_CACHE_HOURS", "3")),
app_name: System.get_env("APP_NAME", "Bonfire"),
ap_base_path: System.get_env("AP_BASE_PATH", "/pub"),
# github_app_client_id: System.get_env("GITHUB_APP_CLIENT_ID", "Iv1.8d612e6e5a2149c9"),
github_token: System.get_env("GITHUB_TOKEN"),
show_debug_errors_in_dev: System.get_env("SHOW_DEBUG_IN_DEV"),
encryption_salt: encryption_salt,
Expand Down
2 changes: 2 additions & 0 deletions flavours/classic/config/test.exs
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,8 @@ else
metadata: [:action, :pid]
end

config :phoenix_test, :endpoint, Bonfire.Web.Endpoint

config :pbkdf2_elixir, :rounds, 1

config :mix_test_interactive,
Expand Down
1 change: 1 addition & 0 deletions mix.exs
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ defmodule Bonfire.Umbrella.MixProject do
# tests
# {:floki, ">= 0.0.0", only: [:dev, :test]},
# {:pages, "~> 0.12", only: :test}, # extends Floki for testing
{:phoenix_test, "~> 0.2.2", only: :test, runtime: false},
{:mock, "~> 0.3", only: :test},
{:mox, "~> 1.0", only: :test},
{:ex_machina, "~> 2.7", only: [:dev, :test]},
Expand Down
Loading

0 comments on commit 936aa46

Please sign in to comment.