status-mobile
status-mobile copied to clipboard
feat: edit/delete/reply for emoji/sticker/audio
Fixes #13246
Summary
Add missing actions (edit/delete/reply) to certain types of messages (emoji/sticker/audio)
To implement the needed functionalities there are 2 pull requests to this repo status-mobile
and status-go.
-
Editing emoji messages: Firstly, I had to allow the emoji content type to be edited from status-go. Secondly, when editing an emoji message, I had to check whether it is still an emoji message or is now a text message, and send the contentType. Also, in status-go I added a "ContentType" field to the "EditMessage" struct and updated the content type when a message is edited. Regarding UI, I had to make sure a white space is added at the end of an emoji message when edited (similar to text messages) to avoid overlapping with the "edited" text and icon.
-
Deleting emoji messages: added delete option on-long-press.
-
Audio message reply: In status-go, I added an AudioLocalURL field to the QuotedMessage struct. When an audio message is replied to, the AudioLocalURL field will be assigned to the QuotedMessage. In status-mobile, inside the quoted-message method, I check if the quoted message contains audio and if so, will render the audio message.
-
Sticker message reply: Initially, I attempted to do it in a similar way to replying to audio, but it didn't work as the sticker url is created using the sticker hash and not the message ID. Currently, the "responseTo" field includes the messageID only. So, what I did is simply get the sticker url from the message itself using the messageID inside the quoted-message method in status-mobile. I added a
HasSticker
field to the QuotedMessage struct in status-go to know if it is a sticker. Additionally, if the sticker is deleted, a message will be shown to the user stating "This message has been deleted!", which I think can also be implemented for replying to other content types. -
Sticker message delete: added delete option on-long-press.
Sticker reply and delete also work in public chats.
Review Notes
This PR depends on that status-go PR for backend functionality: 87db7d953e8fc748baa1fc56a7adffd8fada3055
Platforms
- Android
- iOS
status: ready
Hey @OmarBasem, and thank you so much for making your first pull request in status-mobile! :heart: Please help us make your experience better by filling out this brief questionnaire https://goo.gl/forms/uWqNcVpVz7OIopXg2
Jenkins Builds
Click to see older builds (45)
:grey_question: | Commit | :hash: | Finished (UTC) | Duration | Platform | Result |
---|---|---|---|---|---|---|
:x: | 9f7c1af6 | #1 | 2022-07-25 07:41:06 | ~11 min | android-e2e |
:page_facing_up:log |
:x: | 9f7c1af6 | #1 | 2022-07-25 07:45:15 | ~15 min | ios |
:page_facing_up:log |
:heavy_multiplication_x: | a33e588a | #2 | 2022-07-30 06:47:23 | ~11 min | android |
:package:apk :calling: |
:heavy_multiplication_x: | a33e588a | #2 | 2022-07-30 06:48:05 | ~12 min | ios |
:package:ipa :calling: |
:heavy_check_mark: | 924a2133 | #3 | 2022-07-30 18:17:05 | ~11 min | android |
:package:apk :calling: |
:heavy_check_mark: | 924a2133 | #3 | 2022-07-30 18:18:15 | ~12 min | ios |
:package:ipa :calling: |
:heavy_check_mark: | 924a2133 | #4 | 2022-08-01 08:11:37 | ~9 min | android-e2e |
:package:apk :calling: |
:x: | 08853b2c | #4 | 2022-08-01 09:41:07 | ~6 min | ios |
:page_facing_up:log |
:heavy_check_mark: | 08853b2c | #5 | 2022-08-01 09:43:47 | ~9 min | android-e2e |
:package:apk :calling: |
:heavy_check_mark: | 08853b2c | #4 | 2022-08-01 09:44:31 | ~10 min | android |
:package:apk :calling: |
:x: | df875c72 | #6 | 2022-08-01 09:53:23 | ~16 sec | android-e2e |
:page_facing_up:log |
:x: | df875c72 | #5 | 2022-08-01 09:53:23 | ~17 sec | android |
:page_facing_up:log |
:x: | df875c72 | #5 | 2022-08-01 09:53:27 | ~21 sec | ios |
:page_facing_up:log |
:x: | 4ac2af05 | #6 | 2022-08-02 14:11:13 | ~17 sec | ios |
:page_facing_up:log |
:x: | 4ac2af05 | #7 | 2022-08-02 14:11:15 | ~19 sec | android-e2e |
:page_facing_up:log |
:x: | 4ac2af05 | #6 | 2022-08-02 14:11:23 | ~27 sec | android |
:page_facing_up:log |
:x: | 8bb996db | #8 | 2022-08-02 15:08:28 | ~15 sec | android-e2e |
:page_facing_up:log |
:x: | 8bb996db | #7 | 2022-08-02 15:08:28 | ~16 sec | android |
:page_facing_up:log |
:x: | 8bb996db | #7 | 2022-08-02 15:08:41 | ~24 sec | ios |
:page_facing_up:log |
:x: | 9ba325b4 | #9 | 2022-08-02 15:20:11 | ~23 sec | android-e2e |
:page_facing_up:log |
:x: | 9ba325b4 | #8 | 2022-08-02 15:20:14 | ~21 sec | ios |
:page_facing_up:log |
:x: | 9ba325b4 | #8 | 2022-08-02 15:20:14 | ~21 sec | android |
:page_facing_up:log |
:x: | 8c5543a0 | #9 | 2022-08-02 15:32:13 | ~15 sec | ios |
:page_facing_up:log |
:x: | 8c5543a0 | #10 | 2022-08-02 15:32:15 | ~17 sec | android-e2e |
:page_facing_up:log |
:x: | 8c5543a0 | #9 | 2022-08-02 15:32:16 | ~17 sec | android |
:page_facing_up:log |
:x: | a3e2394f | #11 | 2022-08-02 15:42:22 | ~14 sec | android-e2e |
:page_facing_up:log |
:x: | a3e2394f | #10 | 2022-08-02 15:42:27 | ~14 sec | ios |
:page_facing_up:log |
:x: | a3e2394f | #10 | 2022-08-02 15:42:27 | ~14 sec | android |
:page_facing_up:log |
:heavy_check_mark: | 1da0fd33 | #12 | 2022-08-02 17:27:52 | ~11 min | android-e2e |
:package:apk :calling: |
:heavy_check_mark: | 1da0fd33 | #11 | 2022-08-02 17:30:18 | ~13 min | ios |
:package:ipa :calling: |
:x: | 484df9e5 | #12 | 2022-08-03 05:48:55 | ~17 sec | android |
:page_facing_up:log |
:x: | 484df9e5 | #13 | 2022-08-03 05:48:55 | ~16 sec | android-e2e |
:page_facing_up:log |
:x: | 484df9e5 | #12 | 2022-08-03 05:48:56 | ~13 sec | ios |
:page_facing_up:log |
:x: | b9d63e2c | #14 | 2022-08-03 05:51:31 | ~13 sec | android-e2e |
:page_facing_up:log |
:x: | b9d63e2c | #13 | 2022-08-03 05:51:33 | ~15 sec | android |
:page_facing_up:log |
:x: | b9d63e2c | #13 | 2022-08-03 05:51:33 | ~15 sec | ios |
:page_facing_up:log |
:heavy_check_mark: | 2745f7d7 | #14 | 2022-08-03 06:40:53 | ~12 min | android |
:package:apk :calling: |
:heavy_check_mark: | 2745f7d7 | #14 | 2022-08-03 06:48:59 | ~20 min | ios |
:package:ipa :calling: |
:heavy_check_mark: | 2745f7d7 | #16 | 2022-08-03 07:29:31 | ~9 min | android-e2e |
:package:apk :calling: |
:x: | 847bf4bc | #17 | 2022-08-04 11:51:18 | ~15 sec | android-e2e |
:page_facing_up:log |
:x: | 847bf4bc | #15 | 2022-08-04 11:51:18 | ~15 sec | android |
:page_facing_up:log |
:x: | 847bf4bc | #15 | 2022-08-04 11:51:22 | ~14 sec | ios |
:page_facing_up:log |
:x: | e39a1cda | #18 | 2022-08-04 12:00:29 | ~15 sec | android-e2e |
:page_facing_up:log |
:x: | e39a1cda | #16 | 2022-08-04 12:00:30 | ~16 sec | android |
:page_facing_up:log |
:x: | e39a1cda | #16 | 2022-08-04 12:00:30 | ~17 sec | ios |
:page_facing_up:log |
:grey_question: | Commit | :hash: | Finished (UTC) | Duration | Platform | Result |
---|---|---|---|---|---|---|
:heavy_check_mark: | cdbf018a | #17 | 2022-08-04 12:32:33 | ~9 min | android |
:package:apk :calling: |
:heavy_check_mark: | cdbf018a | #17 | 2022-08-04 12:33:10 | ~10 min | ios |
:package:ipa :calling: |
:heavy_check_mark: | cdbf018a | #19 | 2022-08-04 12:34:16 | ~11 min | android-e2e |
:package:apk :calling: |
:heavy_check_mark: | 4ccc3982 | #18 | 2022-08-16 11:33:01 | ~8 min | android |
:package:apk :calling: |
:heavy_check_mark: | 4ccc3982 | #20 | 2022-08-16 11:33:30 | ~8 min | android-e2e |
:package:apk :calling: |
:heavy_check_mark: | 4ccc3982 | #18 | 2022-08-16 11:39:03 | ~14 min | ios |
:package:ipa :calling: |
Hi @OmarBasem, Thank you very much for PR.
Looks like linting and tests are failed.
You can run make lint
to see the linting errors and fix them manually or run make lint-fix
.
And you can checkout errors with tests with the help of make test
.
Hi @Parveshdhull, thank you for your comments!
- I fixed the linting errors using
make lint-fix
. - I double-checked running the tests using
make test
and all the tests are passing. - I updated the code to use
cond
in the mentioned snippet. - Moved
repliedMsg
subscription toletsubs
hey @OmarBasem thank you for the PR, its little bit difficult to review PR, could you please revert formatting , thanks
hey @OmarBasem thank you for the PR, its little bit difficult to review PR, could you please revert formatting , thanks
Hey @flexsurfer, sorry for that, my IDE couldn't format clojurescript properly. I have fixed the formatting.
Hey @flexsurfer, I am not sure here why the commit cannot be built? It has already been built previously before reformatting. I did not add or remove any code, but now it is not building. I checked lint and tests - they are all passing.
Hey @flexsurfer, I am not sure here why the commit cannot be built? It has already been built previously before reformatting. I did not add or remove any code, but now it is not building. I checked lint and tests - they are all passing.
Hi, you need to rebase your branch with develop
Hi @Parveshdhull, I just rebased, and it still cannot be built.
Hi @Parveshdhull, I just rebased, and it still cannot be built.
It is not properly rebased yet, error reproduction steps
git clone https://github.com/OmarBasem/status-mobile && cd status-mobile
git remote add status https://github.com/status-im/status-mobile
git fetch status
git rebase status/develop
there are still conflicts in ios/Podfile.lock
Hey @Parveshdhull @flexsurfer, I think the PR is ready to be reviewed?