zulip / zulip-terminal

Official Zulip terminal client.
Apache License 2.0
631 stars 243 forks source link

Create `users_list` by taking current local time from server insted of user's pc. #527

Open amanagr opened 4 years ago

amanagr commented 4 years ago

If the time on user's pc in not correct, then the users_list will have inconsistent behaviour in terms of showing active/idle/offline users. We can use current local time from server to correct this issue.

Relevant code - https://github.com/zulip/zulip-terminal/blob/master/zulipterminal/model.py#L501

Ar9av commented 4 years ago

@zulipbot claim

zulipbot commented 4 years ago

Welcome to Zulip, @Ar9av! We just sent you an invite to collaborate on this repository at https://github.com/zulip/zulip-terminal/invitations. Please accept this invite in order to claim this issue and begin a fun, rewarding experience contributing to Zulip!

Here's some tips to get you off to a good start:

As you work on this issue, you'll also want to refer to the Zulip code contribution guide, as well as the rest of the developer documentation on that site.

See you on the other side (that is, the pull request side)!

Ar9av commented 4 years ago

Do you want me to use an api like http://worldtimeapi.org/ to fetch the current timestamp and use it in place of time.time ?

amanagr commented 4 years ago

I think our website doesn't depend upon pc's local time to indicate active/offline users. You can look into that if it's not too much of a trouble. @neiljp might have other insights.

zulipbot commented 4 years ago

Hello @Ar9av, you have been unassigned from this issue because you have not updated this issue or any referenced pull requests for over 14 days.

You can reclaim this issue or claim any other issue by commenting @zulipbot claim on that issue.

Thanks for your contributions, and hope to see you again soon!

kumarnithin164 commented 3 years ago

@zulipbot claim

zulipbot commented 3 years ago

Welcome to Zulip, @kumarnithin164! We just sent you an invite to collaborate on this repository at https://github.com/zulip/zulip-terminal/invitations. Please accept this invite in order to claim this issue and begin a fun, rewarding experience contributing to Zulip!

Here's some tips to get you off to a good start:

As you work on this issue, you'll also want to refer to the Zulip code contribution guide, as well as the rest of the developer documentation on that site.

See you on the other side (that is, the pull request side)!

kumarnithin164 commented 3 years ago

Should I retrieve time based on the server_url? Or the current location of the user?

zulipbot commented 3 years ago

Hello @kumarnithin164, you have been unassigned from this issue because you have not updated this issue or any referenced pull requests for over 14 days.

You can reclaim this issue or claim any other issue by commenting @zulipbot claim on that issue.

Thanks for your contributions, and hope to see you again soon!

kumarnithin164 commented 3 years ago

@zulipbot abandon

sumagnadas commented 3 years ago

I want to work on this issue.

I think our website doesn't depend upon pc's local time to indicate active/offline users. You can look into that if it's not too much of a trouble. @neiljp might have other insights.

Where can i see this in use in zulip-terminal or in atleast in zulip?

The line @amanagr is referring to is https://github.com/zulip/zulip-terminal/blob/fdd0137c83f5242968e41ec8e745d18fb46d60c0/zulipterminal/model.py#L554. i just wanted to point this out for someone else who would want to work on this after me.

Ezio-Sarthak commented 3 years ago

I am actually having such error on my pc, glad to find an issue for the same! Would love to work on the issue! :)

neiljp commented 3 years ago

The server time will soon be exposed in the initial data, which will enable resolution of this issue.

zulipbot commented 1 year ago

@neiljp You have been unassigned from this issue because you have not made any updates for over 14 days. Please feel free to reclaim the issue if you decide to pick up again. Thanks!