summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorHubert Chathi <hubert@uhoreg.ca>2020-06-15 23:19:24 -0400
committerHubert Chathi <hubert@uhoreg.ca>2020-06-15 23:19:24 -0400
commit53769f8e57df8cfe3df118fa052ca9a128bc9599 (patch)
treee98aa829191dd57d6a1cef29fae0320e8c3b26a5 /lib
parentMerge branch 'get_room_state' into 'master' (diff)
fix calls to send
Diffstat (limited to 'lib')
-rw-r--r--lib/polyjuice/client/sync.ex18
1 files changed, 9 insertions, 9 deletions
diff --git a/lib/polyjuice/client/sync.ex b/lib/polyjuice/client/sync.ex
index 77e66b6..3f82b7d 100644
--- a/lib/polyjuice/client/sync.ex
+++ b/lib/polyjuice/client/sync.ex
@@ -122,7 +122,7 @@ defmodule Polyjuice.Client.Sync do
) do
{:ok, conn_ref} ->
Logger.info("Connected to sync")
- state.send({:connected})
+ state.send.({:connected})
if state.set_filter do
set_filter(%{state | conn_ref: conn_ref, backoff: nil})
@@ -203,7 +203,7 @@ defmodule Polyjuice.Client.Sync do
backoff = calc_backoff(state.backoff)
Logger.error("Set filter error: closed; retrying in #{backoff} seconds.")
connect(%{state | backoff: backoff, conn_ref: nil})
- state.send({:disconnected})
+ state.send.({:disconnected})
# FIXME: what other error codes do we need to handle?
{:error, err} ->
@@ -240,7 +240,7 @@ defmodule Polyjuice.Client.Sync do
Polyjuice.Client.Storage.set_sync_token(state.storage, next_batch)
if not state.initial_done do
- state.send({:initial_sync_completed})
+ state.send.({:initial_sync_completed})
end
do_sync(%{state | since: next_batch, backoff: nil, initial_done: true})
@@ -267,7 +267,7 @@ defmodule Polyjuice.Client.Sync do
backoff = calc_backoff(state.backoff)
Logger.error("Sync error: closed; retrying in #{backoff} seconds.")
connect(%{state | backoff: backoff, conn_ref: nil})
- state.send({:disconnected})
+ state.send.({:disconnected})
# FIXME: what other error codes do we need to handle?
{:error, err} ->
@@ -293,7 +293,7 @@ defmodule Polyjuice.Client.Sync do
|> Map.get("leave", [])
|> Enum.each(fn {k, v} ->
process_room(k, v, state)
- state.send({:left, k})
+ state.send.({:left, k})
end)
end
@@ -302,7 +302,7 @@ defmodule Polyjuice.Client.Sync do
if Map.get(timeline, "limited", false) do
with {:ok, prev_batch} <- Map.get(timeline, "prev_batch") do
- state.send({:limited, roomname, prev_batch})
+ state.send.({:limited, roomname, prev_batch})
end
end
@@ -323,7 +323,7 @@ defmodule Polyjuice.Client.Sync do
roomname,
state
) do
- state.send({:state, roomname, event})
+ state.send.({:state, roomname, event})
state
end
@@ -333,7 +333,7 @@ defmodule Polyjuice.Client.Sync do
roomname,
state
) do
- state.send({:message, roomname, event})
+ state.send.({:message, roomname, event})
state
end
@@ -370,7 +370,7 @@ defmodule Polyjuice.Client.Sync do
|> Map.get("sender")
if inviter do
- state.send({:invite, roomname, inviter, invite_state})
+ state.send.({:invite, roomname, inviter, invite_state})
end
state