aboutsummaryrefslogtreecommitdiff
path: root/shard
diff options
context:
space:
mode:
Diffstat (limited to 'shard')
-rw-r--r--shard/lib/app/chat.ex6
-rw-r--r--shard/lib/app/directory.ex6
-rw-r--r--shard/lib/app/identity.ex4
3 files changed, 12 insertions, 4 deletions
diff --git a/shard/lib/app/chat.ex b/shard/lib/app/chat.ex
index 4c7fc00..2a3872b 100644
--- a/shard/lib/app/chat.ex
+++ b/shard/lib/app/chat.ex
@@ -67,6 +67,10 @@ defmodule SApp.Chat do
# MAIN LOGIC
# ==========
+ defmodule State do
+ defstruct [:id, :netgroup, :manifest, :page_store, :mst, :subs, :read]
+ end
+
@doc """
Start a process that connects to a given channel
"""
@@ -104,7 +108,7 @@ defmodule SApp.Chat do
root: root}
SNet.Group.init_lookup(netgroup, self())
{:ok,
- %{id: id,
+ %State{id: id,
netgroup: netgroup,
manifest: manifest,
page_store: page_store,
diff --git a/shard/lib/app/directory.ex b/shard/lib/app/directory.ex
index 55413c4..a15de21 100644
--- a/shard/lib/app/directory.ex
+++ b/shard/lib/app/directory.ex
@@ -22,6 +22,10 @@ defmodule SApp.Directory do
end
end
+ defmodule State do
+ defstruct [:owner, :public, :name, :manifest, :id, :netgroup, :files, :revfiles]
+ end
+
def start_link(manifest) do
GenServer.start_link(__MODULE__, manifest)
end
@@ -44,7 +48,7 @@ defmodule SApp.Directory do
revfiles = for {n, m} <- SData.SignRev.get(files), into: %{}, do: {m, n}
- {:ok, %{
+ {:ok, %State{
owner: owner, public: public, name: name,
manifest: manifest, id: id, netgroup: netgroup,
files: files, revfiles: revfiles}}
diff --git a/shard/lib/app/identity.ex b/shard/lib/app/identity.ex
index 65e7031..468906f 100644
--- a/shard/lib/app/identity.ex
+++ b/shard/lib/app/identity.ex
@@ -31,7 +31,7 @@ defmodule SApp.Identity do
end
defmodule State do
- defstruct [:info, :rev, :signed]
+ defstruct [:pk, :id, :state, :netgroup]
end
def start_link(manifest) do
@@ -55,7 +55,7 @@ defmodule SApp.Identity do
if Shard.Keys.have_sk? pk do
GenServer.cast(self(), :update_peer_info)
end
- {:ok, %{pk: pk, id: id, state: state, netgroup: netgroup}}
+ {:ok, %State{pk: pk, id: id, state: state, netgroup: netgroup}}
end
def handle_call(:manifest, _from, state) do