[Fixes: #13416] resize image in status-go as well, alert user if fails
869942c0...ed67cc2a
Signed-off-by: Andrea Maria Piana <andrea.maria.piana@gmail.com>
This commit is contained in:
parent
ef8a7f3fd8
commit
785386987b
|
@ -49,7 +49,7 @@
|
||||||
{::json-rpc/call [{:method "wakuext_chat"
|
{::json-rpc/call [{:method "wakuext_chat"
|
||||||
:params [chat-id]
|
:params [chat-id]
|
||||||
:on-success #(re-frame/dispatch [:chats-list/load-chat-success %])
|
:on-success #(re-frame/dispatch [:chats-list/load-chat-success %])
|
||||||
:on-failure #(log/error "failed to fetch chats" 0 -1 %)}]})
|
:on-error #(log/error "failed to fetch chats" 0 -1 %)}]})
|
||||||
|
|
||||||
(fx/defn handle-failed-loading-messages
|
(fx/defn handle-failed-loading-messages
|
||||||
{:events [::failed-loading-messages]}
|
{:events [::failed-loading-messages]}
|
||||||
|
|
|
@ -189,7 +189,8 @@
|
||||||
:js-response true
|
:js-response true
|
||||||
:on-success
|
:on-success
|
||||||
#(re-frame/dispatch [:transport/message-sent %])
|
#(re-frame/dispatch [:transport/message-sent %])
|
||||||
:on-failure #(log/error "failed to send a message" %)}]})
|
:on-error
|
||||||
|
#(log/error "failed to send a message" %)}]})
|
||||||
|
|
||||||
(fx/defn invite-users
|
(fx/defn invite-users
|
||||||
{:events [::invite-people-confirmation-pressed]}
|
{:events [::invite-people-confirmation-pressed]}
|
||||||
|
|
|
@ -107,4 +107,4 @@
|
||||||
:params []
|
:params []
|
||||||
:js-response true
|
:js-response true
|
||||||
:on-success #(on-success ^js %)
|
:on-success #(on-success ^js %)
|
||||||
:on-failure #(log/error "failed to fetch chats" 0 -1 %)}]})
|
:on-error #(log/error "failed to fetch chats" 0 -1 %)}]})
|
||||||
|
|
|
@ -23,7 +23,7 @@
|
||||||
{::json-rpc/call [{:method "wakuext_contacts"
|
{::json-rpc/call [{:method "wakuext_contacts"
|
||||||
:params []
|
:params []
|
||||||
:on-success #(on-success (map <-rpc %))
|
:on-success #(on-success (map <-rpc %))
|
||||||
:on-failure #(log/error "failed to fetch contacts" %)}]})
|
:on-error #(log/error "failed to fetch contacts" %)}]})
|
||||||
|
|
||||||
(fx/defn add
|
(fx/defn add
|
||||||
[_ public-key nickname ens-name on-success]
|
[_ public-key nickname ens-name on-success]
|
||||||
|
@ -34,7 +34,7 @@
|
||||||
(log/info "saved contact" public-key "successfuly")
|
(log/info "saved contact" public-key "successfuly")
|
||||||
(when on-success
|
(when on-success
|
||||||
(on-success %)))
|
(on-success %)))
|
||||||
:on-failure #(log/error "failed to add contact" public-key %)}]})
|
:on-error #(log/error "failed to add contact" public-key %)}]})
|
||||||
|
|
||||||
(fx/defn set-nickname
|
(fx/defn set-nickname
|
||||||
[_ public-key nickname on-success]
|
[_ public-key nickname on-success]
|
||||||
|
@ -45,18 +45,18 @@
|
||||||
(log/debug "set contact nickname" public-key "successfuly" nickname)
|
(log/debug "set contact nickname" public-key "successfuly" nickname)
|
||||||
(when on-success
|
(when on-success
|
||||||
(on-success %)))
|
(on-success %)))
|
||||||
:on-failure #(log/error "failed to set contact nickname " public-key nickname %)}]})
|
:on-error #(log/error "failed to set contact nickname " public-key nickname %)}]})
|
||||||
|
|
||||||
(fx/defn block [_ contact-id on-success]
|
(fx/defn block [_ contact-id on-success]
|
||||||
{::json-rpc/call [{:method "wakuext_blockContact"
|
{::json-rpc/call [{:method "wakuext_blockContact"
|
||||||
:params [contact-id]
|
:params [contact-id]
|
||||||
:js-response true
|
:js-response true
|
||||||
:on-success on-success
|
:on-success on-success
|
||||||
:on-failure #(log/error "failed to block contact" % contact-id)}]})
|
:on-error #(log/error "failed to block contact" % contact-id)}]})
|
||||||
|
|
||||||
(fx/defn unblock [_ contact-id on-success]
|
(fx/defn unblock [_ contact-id on-success]
|
||||||
{::json-rpc/call [{:method "wakuext_unblockContact"
|
{::json-rpc/call [{:method "wakuext_unblockContact"
|
||||||
:params [contact-id]
|
:params [contact-id]
|
||||||
:on-success on-success
|
:on-success on-success
|
||||||
:js-response true
|
:js-response true
|
||||||
:on-failure #(log/error "failed to unblock contact" % contact-id)}]})
|
:on-error #(log/error "failed to unblock contact" % contact-id)}]})
|
||||||
|
|
|
@ -54,12 +54,12 @@
|
||||||
cursor
|
cursor
|
||||||
limit
|
limit
|
||||||
on-success
|
on-success
|
||||||
on-failure]
|
on-error]
|
||||||
{::json-rpc/call [{:method "wakuext_chatMessages"
|
{::json-rpc/call [{:method "wakuext_chatMessages"
|
||||||
:params [chat-id cursor limit]
|
:params [chat-id cursor limit]
|
||||||
:on-success (fn [result]
|
:on-success (fn [result]
|
||||||
(on-success (update result :messages #(map <-rpc %))))
|
(on-success (update result :messages #(map <-rpc %))))
|
||||||
:on-failure on-failure}]})
|
:on-error on-error}]})
|
||||||
|
|
||||||
(defn mark-seen-rpc [chat-id ids on-success]
|
(defn mark-seen-rpc [chat-id ids on-success]
|
||||||
{::json-rpc/call [{:method "wakuext_markMessagesSeen"
|
{::json-rpc/call [{:method "wakuext_markMessagesSeen"
|
||||||
|
@ -67,25 +67,25 @@
|
||||||
:on-success #(do
|
:on-success #(do
|
||||||
(log/debug "successfully marked as seen" %)
|
(log/debug "successfully marked as seen" %)
|
||||||
(when on-success (on-success chat-id ids %)))
|
(when on-success (on-success chat-id ids %)))
|
||||||
:on-failure #(log/error "failed to get messages" %)}]})
|
:on-error #(log/error "failed to get messages" %)}]})
|
||||||
|
|
||||||
(defn delete-message-rpc [id]
|
(defn delete-message-rpc [id]
|
||||||
{::json-rpc/call [{:method "wakuext_deleteMessage"
|
{::json-rpc/call [{:method "wakuext_deleteMessage"
|
||||||
:params [id]
|
:params [id]
|
||||||
:on-success #(log/debug "successfully deleted message" id)
|
:on-success #(log/debug "successfully deleted message" id)
|
||||||
:on-failure #(log/error "failed to delete message" % id)}]})
|
:on-error #(log/error "failed to delete message" % id)}]})
|
||||||
|
|
||||||
(defn delete-messages-from-rpc [author]
|
(defn delete-messages-from-rpc [author]
|
||||||
{::json-rpc/call [{:method "wakuext_deleteMessagesFrom"
|
{::json-rpc/call [{:method "wakuext_deleteMessagesFrom"
|
||||||
:params [author]
|
:params [author]
|
||||||
:on-success #(log/debug "successfully deleted messages from" author)
|
:on-success #(log/debug "successfully deleted messages from" author)
|
||||||
:on-failure #(log/error "failed to delete messages from" % author)}]})
|
:on-error #(log/error "failed to delete messages from" % author)}]})
|
||||||
|
|
||||||
(defn delete-messages-by-chat-id-rpc [chat-id]
|
(defn delete-messages-by-chat-id-rpc [chat-id]
|
||||||
{::json-rpc/call [{:method "wakuext_deleteMessagesByChatID"
|
{::json-rpc/call [{:method "wakuext_deleteMessagesByChatID"
|
||||||
:params [chat-id]
|
:params [chat-id]
|
||||||
:on-success #(log/debug "successfully deleted messages by chat-id" chat-id)
|
:on-success #(log/debug "successfully deleted messages by chat-id" chat-id)
|
||||||
:on-failure #(log/error "failed to delete messages by chat-id" % chat-id)}]})
|
:on-error #(log/error "failed to delete messages by chat-id" % chat-id)}]})
|
||||||
|
|
||||||
(fx/defn delete-message [cofx id]
|
(fx/defn delete-message [cofx id]
|
||||||
(delete-message-rpc id))
|
(delete-message-rpc id))
|
||||||
|
|
|
@ -16,16 +16,16 @@
|
||||||
cursor
|
cursor
|
||||||
limit
|
limit
|
||||||
on-success
|
on-success
|
||||||
on-failure]
|
on-error]
|
||||||
{::json-rpc/call [{:method "wakuext_chatPinnedMessages"
|
{::json-rpc/call [{:method "wakuext_chatPinnedMessages"
|
||||||
:params [chat-id cursor limit]
|
:params [chat-id cursor limit]
|
||||||
:on-success (fn [result]
|
:on-success (fn [result]
|
||||||
(let [result (clojure.set/rename-keys result {:pinnedMessages :pinned-messages})]
|
(let [result (clojure.set/rename-keys result {:pinnedMessages :pinned-messages})]
|
||||||
(on-success (update result :pinned-messages #(map <-rpc %)))))
|
(on-success (update result :pinned-messages #(map <-rpc %)))))
|
||||||
:on-failure on-failure}]})
|
:on-error on-error}]})
|
||||||
|
|
||||||
(fx/defn send-pin-message [cofx pin-message]
|
(fx/defn send-pin-message [cofx pin-message]
|
||||||
{::json-rpc/call [{:method "wakuext_sendPinMessage"
|
{::json-rpc/call [{:method "wakuext_sendPinMessage"
|
||||||
:params [(messages/->rpc pin-message)]
|
:params [(messages/->rpc pin-message)]
|
||||||
:on-success #(log/debug "successfully pinned message" pin-message)
|
:on-success #(log/debug "successfully pinned message" pin-message)
|
||||||
:on-failure #(log/error "failed to pin message" % pin-message)}]})
|
:on-error #(log/error "failed to pin message" % pin-message)}]})
|
||||||
|
|
|
@ -23,9 +23,9 @@
|
||||||
cursor
|
cursor
|
||||||
limit
|
limit
|
||||||
on-success
|
on-success
|
||||||
on-failure]
|
on-error]
|
||||||
{::json-rpc/call [{:method "wakuext_emojiReactionsByChatID"
|
{::json-rpc/call [{:method "wakuext_emojiReactionsByChatID"
|
||||||
:params [chat-id cursor limit]
|
:params [chat-id cursor limit]
|
||||||
:on-success (fn [result]
|
:on-success (fn [result]
|
||||||
(on-success (map <-rpc result)))
|
(on-success (map <-rpc result)))
|
||||||
:on-failure on-failure}]})
|
:on-error on-error}]})
|
||||||
|
|
|
@ -20,5 +20,5 @@
|
||||||
:on-success #(re-frame/dispatch
|
:on-success #(re-frame/dispatch
|
||||||
[:visibility-status-updates/visibility-status-updates-loaded
|
[:visibility-status-updates/visibility-status-updates-loaded
|
||||||
(:statusUpdates ^js %)])
|
(:statusUpdates ^js %)])
|
||||||
:on-failure #(log/error
|
:on-error #(log/error
|
||||||
"failed to fetch visibility-status-updates" %)}]})
|
"failed to fetch visibility-status-updates" %)}]})
|
||||||
|
|
|
@ -9,29 +9,29 @@
|
||||||
[taoensso.timbre :as log]
|
[taoensso.timbre :as log]
|
||||||
[status-im.multiaccounts.update.core :as multiaccounts.update]))
|
[status-im.multiaccounts.update.core :as multiaccounts.update]))
|
||||||
|
|
||||||
(defn enable-installation-rpc [installation-id on-success on-failure]
|
(defn enable-installation-rpc [installation-id on-success on-error]
|
||||||
(json-rpc/call {:method "wakuext_enableInstallation"
|
(json-rpc/call {:method "wakuext_enableInstallation"
|
||||||
:params [installation-id]
|
:params [installation-id]
|
||||||
:on-success on-success
|
:on-success on-success
|
||||||
:on-failure on-failure}))
|
:on-error on-error}))
|
||||||
|
|
||||||
(defn disable-installation-rpc [installation-id on-success on-failure]
|
(defn disable-installation-rpc [installation-id on-success on-error]
|
||||||
(json-rpc/call {:method "wakuext_disableInstallation"
|
(json-rpc/call {:method "wakuext_disableInstallation"
|
||||||
:params [installation-id]
|
:params [installation-id]
|
||||||
:on-success on-success
|
:on-success on-success
|
||||||
:on-failure on-failure}))
|
:on-error on-error}))
|
||||||
|
|
||||||
(defn set-installation-metadata-rpc [installation-id metadata on-success on-failure]
|
(defn set-installation-metadata-rpc [installation-id metadata on-success on-error]
|
||||||
(json-rpc/call {:method "wakuext_setInstallationMetadata"
|
(json-rpc/call {:method "wakuext_setInstallationMetadata"
|
||||||
:params [installation-id metadata]
|
:params [installation-id metadata]
|
||||||
:on-success on-success
|
:on-success on-success
|
||||||
:on-failure on-failure}))
|
:on-error on-error}))
|
||||||
|
|
||||||
(defn get-our-installations-rpc [on-success on-failure]
|
(defn get-our-installations-rpc [on-success on-error]
|
||||||
(json-rpc/call {:method "wakuext_getOurInstallations"
|
(json-rpc/call {:method "wakuext_getOurInstallations"
|
||||||
:params []
|
:params []
|
||||||
:on-success on-success
|
:on-success on-success
|
||||||
:on-failure on-failure}))
|
:on-error on-error}))
|
||||||
|
|
||||||
(defn compare-installation
|
(defn compare-installation
|
||||||
"Sort installations, first by our installation-id, then on whether is
|
"Sort installations, first by our installation-id, then on whether is
|
||||||
|
|
|
@ -159,7 +159,7 @@
|
||||||
:gasLimit (money/to-fixed (money/bignumber gas)))
|
:gasLimit (money/to-fixed (money/bignumber gas)))
|
||||||
clj->js)]
|
clj->js)]
|
||||||
:on-success #(log/info "pending transfer is saved")
|
:on-success #(log/info "pending transfer is saved")
|
||||||
:on-failure #(log/info "pending transfer was not saved" %)}]}))
|
:on-error #(log/info "pending transfer was not saved" %)}]}))
|
||||||
|
|
||||||
(defn get-method-type [data]
|
(defn get-method-type [data]
|
||||||
(cond
|
(cond
|
||||||
|
|
|
@ -40,7 +40,7 @@
|
||||||
[_]
|
[_]
|
||||||
{::json-rpc/call [{:method "wakuext_startMessenger"
|
{::json-rpc/call [{:method "wakuext_startMessenger"
|
||||||
:on-success #(re-frame/dispatch [::messenger-started %])
|
:on-success #(re-frame/dispatch [::messenger-started %])
|
||||||
:on-failure #(log/error "failed to start messenger")}]})
|
:on-error #(log/error "failed to start messenger")}]})
|
||||||
|
|
||||||
(fx/defn messenger-started
|
(fx/defn messenger-started
|
||||||
{:events [::messenger-started]}
|
{:events [::messenger-started]}
|
||||||
|
|
|
@ -31,18 +31,20 @@
|
||||||
:params [(mapv build-message messages)]
|
:params [(mapv build-message messages)]
|
||||||
:js-response true
|
:js-response true
|
||||||
:on-success #(re-frame/dispatch [:transport/message-sent %])
|
:on-success #(re-frame/dispatch [:transport/message-sent %])
|
||||||
:on-failure #(log/error "failed to send a message" %)}]})
|
:on-error #(do
|
||||||
|
(log/warn "failed to send a message" %)
|
||||||
|
(js/alert (str "failed to send a message: " %)))}]})
|
||||||
|
|
||||||
(fx/defn send-reaction [_ {:keys [message-id chat-id emoji-id]}]
|
(fx/defn send-reaction [_ {:keys [message-id chat-id emoji-id]}]
|
||||||
{::json-rpc/call [{:method "wakuext_sendEmojiReaction"
|
{::json-rpc/call [{:method "wakuext_sendEmojiReaction"
|
||||||
:params [chat-id message-id emoji-id]
|
:params [chat-id message-id emoji-id]
|
||||||
:js-response true
|
:js-response true
|
||||||
:on-success #(re-frame/dispatch [:sanitize-messages-and-process-response %])
|
:on-success #(re-frame/dispatch [:sanitize-messages-and-process-response %])
|
||||||
:on-failure #(log/error "failed to send a reaction" %)}]})
|
:on-error #(log/error "failed to send a reaction" %)}]})
|
||||||
|
|
||||||
(fx/defn send-retract-reaction [_ {:keys [emoji-reaction-id]}]
|
(fx/defn send-retract-reaction [_ {:keys [emoji-reaction-id]}]
|
||||||
{::json-rpc/call [{:method "wakuext_sendEmojiReactionRetraction"
|
{::json-rpc/call [{:method "wakuext_sendEmojiReactionRetraction"
|
||||||
:params [emoji-reaction-id]
|
:params [emoji-reaction-id]
|
||||||
:js-response true
|
:js-response true
|
||||||
:on-success #(re-frame/dispatch [:sanitize-messages-and-process-response %])
|
:on-success #(re-frame/dispatch [:sanitize-messages-and-process-response %])
|
||||||
:on-failure #(log/error "failed to send a reaction retraction" %)}]})
|
:on-error #(log/error "failed to send a reaction retraction" %)}]})
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
"_comment": "Instead use: scripts/update-status-go.sh <rev>",
|
"_comment": "Instead use: scripts/update-status-go.sh <rev>",
|
||||||
"owner": "status-im",
|
"owner": "status-im",
|
||||||
"repo": "status-go",
|
"repo": "status-go",
|
||||||
"version": "v0.100.1",
|
"version": "v0.100.2",
|
||||||
"commit-sha1": "869942c05e04fa6e5d5105d3f5642f6a5ff28fcb",
|
"commit-sha1": "ed67cc2a6cffc8312c784f6a77170a80be96fa54",
|
||||||
"src-sha256": "0krig4rggbd6aryczig4r70fcn8fmfki52s931zyn3nqmjr386xh"
|
"src-sha256": "0crafxj747ddsjkkwdrdnijj22vknyzwrgakbn83fszxb1babj0z"
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue