diff options
author | Alex Auvolat <alex@adnab.me> | 2018-10-11 15:11:52 +0200 |
---|---|---|
committer | Alex Auvolat <alex@adnab.me> | 2018-10-11 15:11:52 +0200 |
commit | 1646bc57eae9880fd408d23ca692364dc6fd6442 (patch) | |
tree | 0f65d47498f33772152b20ee082d34e218f16df4 /shard/lib/app/chat.ex | |
parent | eb8c949551ffb8b3600357d7ff2bebe750af96e5 (diff) | |
download | shard-1646bc57eae9880fd408d23ca692364dc6fd6442.tar.gz shard-1646bc57eae9880fd408d23ca692364dc6fd6442.zip |
Move somme functionnality to SNet.Manager
Diffstat (limited to 'shard/lib/app/chat.ex')
-rw-r--r-- | shard/lib/app/chat.ex | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/shard/lib/app/chat.ex b/shard/lib/app/chat.ex index 051dfef..53767ef 100644 --- a/shard/lib/app/chat.ex +++ b/shard/lib/app/chat.ex @@ -118,7 +118,7 @@ defmodule SApp.Chat do end end - notif = {:append, prev_root, msgitem, mst.root} + notif = {state.id, nil, {:append, prev_root, msgitem, mst.root}} SNet.Group.broadcast(state.group, notif) {:noreply, state} @@ -130,7 +130,7 @@ defmodule SApp.Chat do """ def handle_cast({:interested, conn_pid, auth}, state) do if SNet.Group.in_group?(state.group, conn_pid, auth) do - Shard.Manager.send_pid(conn_pid, {state.id, nil, {:root, state.mst.root}}) + SNet.Manager.send_pid(conn_pid, {state.id, nil, {:root, state.mst.root}}) end {:noreply, state} end @@ -157,7 +157,7 @@ defmodule SApp.Chat do else state = case msg do {:get_manifest} -> - Shard.Manager.send_pid(conn_pid, {state.id, nil, {:manifest, state.manifest}}) + SNet.Manager.send_pid(conn_pid, {state.id, nil, {:manifest, state.manifest}}) state {:append, prev_root, msgitem, new_root} -> # Append message: one single mesage has arrived |