diff options
author | Alex Auvolat <alex@adnab.me> | 2018-10-15 17:30:34 +0200 |
---|---|---|
committer | Alex Auvolat <alex@adnab.me> | 2018-10-15 17:30:34 +0200 |
commit | 9ab6bdd4536a060f981932f09c5c8f722de25a81 (patch) | |
tree | 3c1c2230734d7b412c8725fa1e45f186cb2b6d69 /shard/lib/app/identity.ex | |
parent | 07841bd2ec86cb667aea633de5dcb068751e64d3 (diff) | |
download | shard-9ab6bdd4536a060f981932f09c5c8f722de25a81.tar.gz shard-9ab6bdd4536a060f981932f09c5c8f722de25a81.zip |
don't do useless stuff
Diffstat (limited to 'shard/lib/app/identity.ex')
-rw-r--r-- | shard/lib/app/identity.ex | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/shard/lib/app/identity.ex b/shard/lib/app/identity.ex index b034107..65e7031 100644 --- a/shard/lib/app/identity.ex +++ b/shard/lib/app/identity.ex @@ -79,9 +79,15 @@ defmodule SApp.Identity do end def handle_cast(:send_deps, state) do - default_deps = [ - %SApp.Directory.Manifest{owner: state.pk, public: false, name: "friends"} - ] + default_deps = + if Shard.Keys.have_sk?(state.pk) do + [ + %SApp.Directory.Manifest{owner: state.pk, public: false, name: "friends"} + ] + else + [] + end + GenServer.cast(Shard.Manager, {:dep_list, state.id, default_deps}) {:noreply, state} end |