diff options
author | Hubert Chathi <hubert@uhoreg.ca> | 2019-10-07 19:55:07 -0400 |
---|---|---|
committer | Hubert Chathi <hubert@uhoreg.ca> | 2019-10-07 19:55:07 -0400 |
commit | a48bd23b9582a9e401e01bd4e14c3fea1f30ef62 (patch) | |
tree | 64b6b6a7baf066de5cdb05e7c2bdc0c91a73d26c /lib/polyjuice/client | |
parent | mix format (diff) |
make the storage part of the client struct
Diffstat (limited to 'lib/polyjuice/client')
-rw-r--r-- | lib/polyjuice/client/sync.ex | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/polyjuice/client/sync.ex b/lib/polyjuice/client/sync.ex index 6d49f2b..b97ea02 100644 --- a/lib/polyjuice/client/sync.ex +++ b/lib/polyjuice/client/sync.ex @@ -22,9 +22,9 @@ defmodule Polyjuice.Client.Sync do Start a sync task. """ @spec start_link([...]) :: {:ok, pid} - def start_link([client, listener, storage | opts]) + def start_link([client, listener | opts]) when is_pid(listener) and is_list(opts) do - Task.start_link(__MODULE__, :sync, [client, listener, storage, opts]) + Task.start_link(__MODULE__, :sync, [client, listener, opts]) end @enforce_keys [:listener, :access_token, :homeserver_url, :uri, :user_id, :storage] @@ -51,10 +51,10 @@ defmodule Polyjuice.Client.Sync do %Polyjuice.Client{ access_token: access_token, base_url: homeserver_url, - user_id: user_id + user_id: user_id, + storage: storage }, listener, - storage, opts ) do # Figure out how to handle the filter (if any): can we pass it in straight |