Skip to content

Commit

Permalink
Move mailserver logic to status-go
Browse files Browse the repository at this point in the history
  • Loading branch information
cammellos committed Mar 19, 2022
1 parent c69b640 commit 5b2996b
Show file tree
Hide file tree
Showing 13 changed files with 143 additions and 411 deletions.
19 changes: 12 additions & 7 deletions doc/STARTING_GUIDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,6 @@ make shell TARGET=android
```
This step will take a while the first time as it will download all dependencies.

To build the app, your can simply run on of the following:
```
make release-android
make release-ios
```
For more `make` targets run `make help`.

# Development

There are three steps necessary to start development, in this case for Android:
Expand All @@ -28,6 +21,18 @@ There are three steps necessary to start development, in this case for Android:
The first two will continue watching for changes and keep re-building the app. They need to be ready first.
The last one will exit once the app is up and ready.

You need to have your emulator or real devices running and visible to adb, before you run `make run-android`.

# Build release

To build the app, your can simply run on of the following:
```
make release-android
make release-ios
```

For more `make` targets run `make help`.

# Updating Dependencies

* `make nix-update-pods` - iOS CocoaPods dependencies (updates `ios/Podfile` and `ios/Podfile.loc`)
Expand Down
3 changes: 1 addition & 2 deletions src/status_im/chat/models/message.cljs
Original file line number Diff line number Diff line change
Expand Up @@ -169,8 +169,7 @@
(fx/defn update-message-status
[{:keys [db] :as cofx} chat-id message-id status]
(fx/merge cofx
(update-db-message-status chat-id message-id status)
(data-store.messages/update-outgoing-status message-id status)))
(update-db-message-status chat-id message-id status)))

(fx/defn resend-message
[{:keys [db] :as cofx} chat-id message-id]
Expand Down
9 changes: 0 additions & 9 deletions src/status_im/data_store/messages.cljs
Original file line number Diff line number Diff line change
Expand Up @@ -49,12 +49,6 @@
:outgoing (boolean (:outgoingStatus message)))
(dissoc :ensName :chatId :text :rtl :responseTo :image :sticker :lineCount :parsedText :links)))

(defn update-outgoing-status-rpc [message-id status]
{::json-rpc/call [{:method (json-rpc/call-ext-method "updateMessageOutgoingStatus")
:params [message-id status]
:on-success #(log/debug "updated message outgoing stauts" message-id status)
:on-failure #(log/error "failed to update message outgoing status" message-id status %)}]})

(defn messages-by-chat-id-rpc [chat-id
cursor
limit
Expand Down Expand Up @@ -101,8 +95,5 @@
(fx/defn mark-messages-seen [cofx chat-id ids on-success]
(mark-seen-rpc chat-id ids on-success))

(fx/defn update-outgoing-status [cofx message-id status]
(update-outgoing-status-rpc message-id status))

(fx/defn delete-messages-by-chat-id [cofx chat-id]
(delete-messages-by-chat-id-rpc chat-id))
6 changes: 4 additions & 2 deletions src/status_im/ethereum/json_rpc.cljs
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,8 @@
"waku_getSymKey" {}
"waku_markTrustedPeer" {}
"wakuext_post" {}
"wakuext_requestAllHistoricMessages" {}
"wakuext_requestAllHistoricMessagesWithRetries" {}
"wakuext_toggleUseMailservers" {}
"wakuext_editMessage" {}
"wakuext_deleteMessageAndSend" {}
"wakuext_fillGaps" {}
Expand Down Expand Up @@ -93,7 +94,6 @@
"wakuext_markAllRead" {}
"wakuext_markAllReadInCommunity" {}
"wakuext_confirmMessagesProcessedByID" {}
"wakuext_updateMessageOutgoingStatus" {}
"wakuext_chatMessages" {}
"wakuext_saveChat" {}
"wakuext_muteChat" {}
Expand All @@ -108,13 +108,15 @@
"wakuext_addContact" {}
"wakuext_updateMailservers" {}
"wakuext_sendEmojiReaction" {}
"wakuext_disconnectActiveMailserver" {}
"wakuext_sendEmojiReactionRetraction" {}
"wakuext_emojiReactionsByChatID" {}
"wakuext_getLinkPreviewWhitelist" {}
"wakuext_getLinkPreviewData" {}
"wakuext_requestCommunityInfoFromMailserver" {}
"wakuext_deactivateChat" {}
"wakuext_sendPinMessage" {}
"wakuext_setPinnedMailservers" {}
"wakuext_chatPinnedMessages" {}
;;TODO not used anywhere?
"wakuext_deleteChat" {}
Expand Down

0 comments on commit 5b2996b

Please sign in to comment.