From 049f402c6a2d8735e2364b08f9f52af28709d191 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicol=C3=B2=20Balzarotti?= Date: Tue, 18 Sep 2018 08:42:25 +0200 Subject: [PATCH] update rooms on repl() --- src/repl.jl | 7 ++++++- src/sync.jl | 1 - 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/src/repl.jl b/src/repl.jl index 4ee9663..8d07e5f 100644 --- a/src/repl.jl +++ b/src/repl.jl @@ -774,12 +774,17 @@ end """Initialize the REPL mode, read config files and start the TUI client """ function repl() - global user + global user, rooms_last_batch userinfo = load_secret_or_login(load_config_file()) repl_init(Base.active_repl) user = MatrixUser(userinfo...) + MatrixChat.updateroomlist(user) syncstatus = MatrixSync(user) + + rooms_last_batch = Dict() + updateroomlastbatch(sync!(syncstatus)) + user end diff --git a/src/sync.jl b/src/sync.jl index 7a78d22..914b5ee 100644 --- a/src/sync.jl +++ b/src/sync.jl @@ -52,7 +52,6 @@ function remove_hook!(event::Symbol) false end -rooms_last_batch = Dict() function updateroomlastbatch(fullsync::Dict{String,Any}) global rooms_last_batch map(x ->