Skip to content

feat: Donation request device message (#6913) #6914

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

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

iequidoo
Copy link
Collaborator

@iequidoo iequidoo commented Jun 13, 2025

No tests yet, have done a quick check in Desktop.
Close #6913

EDIT: Initial/recheck period is 30 days now. The device message is added only once.

@iequidoo iequidoo force-pushed the iequidoo/donation-request branch from 29f4d6f to 0f69230 Compare June 13, 2025 00:21
@iequidoo iequidoo requested a review from r10s June 13, 2025 00:36
@iequidoo iequidoo marked this pull request as draft June 13, 2025 20:08
@iequidoo iequidoo marked this pull request as draft June 13, 2025 20:08
@iequidoo iequidoo marked this pull request as draft June 13, 2025 20:08
@iequidoo iequidoo force-pushed the iequidoo/donation-request branch from 0f69230 to 4c6888d Compare June 13, 2025 20:24
@iequidoo iequidoo marked this pull request as ready for review June 13, 2025 20:28
Copy link
Contributor

@r10s r10s left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks a lot for pushing that forward!

i find review a bit hard because of non-telling names, what about using sth. as
days_until_first_donation_request, days_until_next_donation_request and LastDonationRequestTimestamp (instead of period_check, period_msg, DonationRequestTs)?

also, not sure if it is needed to check on every sending of a message - even though the expensive check seems to be called only if clock is later than LastDonationRequestTimestamp. but maybe that's fine, no blocker.

for the expensive sql command: the mentioned corner case in the issue is about shared-usage or classic-usage, if ppl are doing that they seem to be into delta chat as well, as we do not download history. if would keep it simple here and look at all messages

also, i would add the message only if there are more messages, eg. 100, 10 messages is not really real usage.

finally, the stock string is missing in the deltachat.h

@iequidoo iequidoo force-pushed the iequidoo/donation-request branch from 4c6888d to 56d79ef Compare June 15, 2025 19:50
@iequidoo
Copy link
Collaborator Author

iequidoo commented Jun 15, 2025

days_until_first_donation_request, days_until_next_donation_request and LastDonationRequestTimestamp (instead of period_check, period_msg, DonationRequestTs)?

Renamed to secs_between_checks (it's only a consequence that the first request appears after this time), secs_between_requests, DonationRequestNextCheck (we don't always add Timestamp, e.g. see LastHousekeeping).

also, not sure if it is needed to check on every sending of a message

We have the config cache, so looking at Config::DonationRequestNextCheck even on every sending is fine.

for the expensive sql command: the mentioned corner case in the issue is about shared-usage or classic-usage, if ppl are doing that they seem to be into delta chat as well, as we do not download history. if would keep it simple here and look at all messages

Removed the check for whether a message is encrypted. Now it should be fast because we have msgs_index7 ON msgs (state, hidden, chat_id). Anyway i'm going to add a new OutRcvd message state in #5813 (it's needed to fix the remaining message sorting issues that e.g. i have with Gmail) that will fix corner cases, i.e. we can only count locally sent messages.

also, i would add the message only if there are more messages, eg. 100, 10 messages is not really real usage.

Made it 50. 100 looks too much for me personally, maybe on average people chat more, idk.

finally, the stock string is missing in the deltachat.h

Fixed.

@iequidoo iequidoo requested a review from r10s June 15, 2025 20:09
@r10s
Copy link
Contributor

r10s commented Jun 24, 2025

after some internal discussions with @adbenitez and others:

  • for now, we do not want the message to re-appear every some time, we can add that at some point, but initially it is not wanted - the "device chat" bubbles up anyways after some time. better to consider a completely new message that is re-added then
  • instead, the 14 days should be at least 4 weeks, and the number of messages that should be there should be more, say, 100.
    if the 100 is not reached after 30 days, but only after 50 days, that is fine, the message will appear then (@iequidoo it is like that, right?)
  • the wording "X cost time and time cost money" should be shortened to "X cost money" - ppl do not read much, so no need to be too nerdy and pretentious here. ppl also do not say "bread does not cost money. making a bread cost time, and time may cost money" ...
  • "seems you're using Delta Chat" was indeed a bad suggestion from my side, what @adbenitez suggested in the issue is better, "❤️ Seems you're enjoying Delta Chat!"
    the final wording is anyway in android, but it seems good to have a not-so-bad-fallback

iequidoo added 4 commits June 24, 2025 20:18
If there are at least {10,30,70...} outgoing delivered encrypted messages, add a donation request
device messaage, but not more than once every two weeks.
- Get rid of `Config::DonationRequestMsgCnt` and geometric progression, limit requests to one per 60
  days instead.
- Don't filter out trashed messages, if a message is sent, the app is used.
@iequidoo iequidoo force-pushed the iequidoo/donation-request branch from 56d79ef to cc2d59c Compare June 25, 2025 00:02
@iequidoo
Copy link
Collaborator Author

  • for now, we do not want the message to re-appear every some time, we can add that at some point, but initially it is not wanted - the "device chat" bubbles up anyways after some time. better to consider a completely new message that is re-added then

Done (DonationRequestNextCheck is set to i64::MAX after adding the device message).

if the 100 is not reached after 30 days, but only after 50 days, that is fine, the message will appear then (@iequidoo it is like that, right?)

After 60 days then, it checks every 30 days now (instead of 14).

  • the wording "X cost time and time cost money" should be shortened to "X cost money" - ppl do not read much, so no need to be too nerdy and pretentious here. ppl also do not say "bread does not cost money. making a bread cost time, and time may cost money" ...

Changed to "development costs money", but for me "development takes/requires money" sounds better. "costs money" is like wanting to charge the reader at market price. But it's just my personal perception.

  • "seems you're using Delta Chat" was indeed a bad suggestion from my side, what @adbenitez suggested in the issue is better, "❤️ Seems you're enjoying Delta Chat!"

Done.

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

Successfully merging this pull request may close these issues.

add a device message to ask for donations
2 participants