aboutsummaryrefslogtreecommitdiff
path: root/shard/lib/app/chat.ex
diff options
context:
space:
mode:
Diffstat (limited to 'shard/lib/app/chat.ex')
-rw-r--r--shard/lib/app/chat.ex5
1 files changed, 5 insertions, 0 deletions
diff --git a/shard/lib/app/chat.ex b/shard/lib/app/chat.ex
index 2a3872b..405210b 100644
--- a/shard/lib/app/chat.ex
+++ b/shard/lib/app/chat.ex
@@ -39,6 +39,7 @@ defmodule SApp.Chat do
defimpl Shard.Manifest do
def module(_m), do: SApp.Chat
+ def is_valid?(_m), do: true
end
end
@@ -60,6 +61,10 @@ defmodule SApp.Chat do
defimpl Shard.Manifest do
def module(_m), do: SApp.Chat
+ def is_valid?(m) do
+ Enum.all?(m.pk_list, &(byte_size(&1)==32))
+ and m.pk_list == m.pk_list |> Enum.sort |> Enum.uniq
+ end
end
end