Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

adapt to new saved-messages api #4596

Open
r10s opened this issue Feb 3, 2025 · 2 comments
Open

adapt to new saved-messages api #4596

r10s opened this issue Feb 3, 2025 · 2 comments
Labels
enhancement New feature or request

Comments

@r10s
Copy link
Member

r10s commented Feb 3, 2025

since PR deltachat/deltachat-core-rust#5606 we have a new saved-messages-api, allowing to save messages similar as known from whatsapp or telegram. see that PR for reasonings and discussions.

to benefit from the new saved-messages-api on desktop, the following steps are needed:

  • make dc_save_msgs(), dc_msg_get_original_msg_id() and dc_msg_get_saved_msg_id() available in jsonrpc

  • in self-chat, for incoming messages, show group avatar, sender name and correct left/right side bubbles and colors, see eg. deltachat/deltachat-android@75e9984 for how to change the condition.
    already now, the state is not that bad: messages from others saved eg. on android are shown on desktop on the left side using the correct color already today, only avatar and sender name is missing

  • when forwarding a message to "Saved Messages" that was not already saved use dc_save_msgs() 1 2

  • for every message shown in a chat, check if it was saved 3. if so, show a little bookmark icon beside the date (screenshot). as the bookmark should also be shown in saved messages, you will draw it if original_msg_id() OR saved_msg_id() is true.

  • add a button to go to original beside each saved message in the self-chat (screenshot)

to get the idea, it makes sense to use iOS or Android 1.54

as the new core is already shipped, there is not a huge urgency to target this issue, no messages saved on iOS/android will be lost or so. but of course, it is a very nice to have adaption, and comparable simple for UI.

Footnotes

  1. when a message was already saved, and is forwarded again to "Saved Messages". keep using dc_forward_msgs() - this is to have an option in rare cases when multi-device do not have the message to save. this is also how telegram works

  2. in a subsequent PR, we can consider to add a "save/unsave" option directly to the context menu or so, like on iOS

  3. at least for the first iteration, we do not want to show saved info messages and thelike in the "Saved Messages" chat; this turned out to be confusing and might also require adaptions on systems other than android (remember: saved messages are synced), cmp. https://github.com/deltachat/deltachat-ios/issues/2567

@r10s r10s added the enhancement New feature or request label Feb 3, 2025
@r10s
Copy link
Member Author

r10s commented Feb 7, 2025

closing this for a few days until android is done, a few things are still under discussion

@r10s r10s closed this as not planned Won't fix, can't repro, duplicate, stale Feb 7, 2025
@r10s r10s reopened this Feb 11, 2025
@r10s
Copy link
Member Author

r10s commented Feb 11, 2025

reopend and adapted. recent changes:

  • the icons should be a "bookmark icon", screenshot and reasoning
  • saving should be possible also by "Forward to saved" as before, to close this issue, this is sufficient. a shortcut, as eg. a "save" context menu entry or so can come in another PR

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant