diff --git a/project.clj b/project.clj index 09c6246364..282e5b8ebd 100644 --- a/project.clj +++ b/project.clj @@ -8,8 +8,9 @@ [reagent "0.5.1" :exclusions [cljsjs/react]] [re-frame "0.7.0"] [prismatic/schema "1.0.4"] - ^{:voom {:repo "git@github.com:status-im/status-lib.git" :branch "master"}} - [status-im/protocol "0.2.1-20160908_061908-geefb360"] + ^{:voom {:repo "git@github.com:status-im/status-lib.git" + :branch "master"}} + [status-im/protocol "0.2.2-20160909_082306-gcfbb92b"] [natal-shell "0.3.0"] [com.andrewmcveigh/cljs-time "0.4.0"] [tailrecursion/cljs-priority-map "1.2.0"] diff --git a/src/status_im/contacts/handlers.cljs b/src/status_im/contacts/handlers.cljs index c992fa00fe..9b20c571a6 100644 --- a/src/status_im/contacts/handlers.cljs +++ b/src/status_im/contacts/handlers.cljs @@ -195,7 +195,8 @@ (u/side-effect! (fn [db [_ from {last-online :at :as payload}]] (let [prev-last-online (get-in db [:contacts from :last-online])] - (if (< prev-last-online last-online) + (when (< prev-last-online last-online) + (api/resend-pending-messages from) (dispatch [:update-contact! {:whisper-identity from :last-online last-online}])))))) diff --git a/src/status_im/models/pending_messages.cljs b/src/status_im/models/pending_messages.cljs index 6333f066eb..2f3d21af22 100644 --- a/src/status_im/models/pending_messages.cljs +++ b/src/status_im/models/pending_messages.cljs @@ -12,7 +12,8 @@ (defn get-pending-messages [] (let [collection (-> (r/get-by-fields :account :pending-message :or [[:status :sending] - [:status :sent]]) + [:status :sent] + [:status :failed]]) (r/sorted :timestamp :desc) (r/collection->map))] (->> collection