From a48bd23b9582a9e401e01bd4e14c3fea1f30ef62 Mon Sep 17 00:00:00 2001 From: Hubert Chathi Date: Mon, 7 Oct 2019 19:55:07 -0400 Subject: make the storage part of the client struct --- lib/polyjuice/client/sync.ex | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'lib/polyjuice/client') 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 -- cgit v1.2.3