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

Allow sending messages offline #11889

Closed
cammellos opened this issue Mar 17, 2021 · 5 comments · Fixed by #12812
Closed

Allow sending messages offline #11889

cammellos opened this issue Mar 17, 2021 · 5 comments · Fixed by #12812
Assignees
Labels
feature feature requests
Milestone

Comments

@cammellos
Copy link
Member

cammellos commented Mar 17, 2021

As a user
I want to be able to send messages while I am offline
So that I don't have to wait for the app to be online again to send a message

Description

Currently the input is disabled if the user is offline.
We should allow the user to send messages when offline and make sure that they are sent once it goes back online.

Technical implemnentation

For 1-to-1 & private group chat messages one way to do this is to "pause" datasync when offline, and restart it when the user is online, that should just work.

For public chat/community messages or any other message type that does not use datasync, we should re-use the emoji resending code instead, and resend (or send) once they are online.

@rasom
Copy link
Member

rasom commented Oct 25, 2021

@cammellos @churik
a have a few questions:

  1. 1-1/private groups case: If I just enabled sending messages when offline on client side (without changes on status-go) and after being offline for a short period of time (like 1m or so) the message is successfully sent when connection is restored. But if that offline time is longer (over 5m or something) I see an option to manually resend the message. So question is: is that an expected behaviour? Do we want to make some changes here?
  2. pubchats/communities do we expect the same behaviour for those messages? Or should it be sent automatically regardless of how long the app was offline? Also if app wasn't offline but closed, does it mean we still resend messages automatically or this should be done manually?

@cammellos
Copy link
Member Author

@rasom

I think for 1 we should not show the "resend" option after 5 minutes, we should only show it once it's clear that it won't be send in a timely fashion.
It's a bit hard to say exactly when you should be sending it, as there's a few edge cases, but in theory we should try to only show it as a last resort (say after a day has passed an no retries are going to be sent for a while).

2
Same behavior I'd say, and no difference between going offline or closing the app, so messages should be re-sent if the user closed the app

@churik what do you think?

@churik
Copy link
Member

churik commented Oct 25, 2021

 I'm OK with that.
 But currently, we still have situations the messages are marked as sent, but they actually weren't.
 Easy steps to reproduce (from IOS):
 - turn on Airplane mode
 - send any message while button is visible
 
  When I got back to online, message is marked as sent, so user thinks that everybody sees that, but in fact, it wasn't sent.
  I'm concerned that with visible button in offline mode this issue may get worse.
 

@churik
Copy link
Member

churik commented Oct 25, 2021

So from my POV better not to delete Resend functionality, but make it more robust and also resolve issue like described in the previous comment

@cammellos
Copy link
Member Author

 I'm OK with that.  But currently, we still have situations the messages are marked as sent, but they actually weren't.  Easy steps to reproduce (from IOS):  - turn on Airplane mode  - send any message while button is visible     When I got back to online, message is marked as sent, so user thinks that everybody sees that, but in fact, it wasn't sent.   I'm concerned that with visible button in offline mode this issue may get worse.

That's something we have the fix for, I'll make sure it's prioritized

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

Successfully merging a pull request may close this issue.

5 participants