zulip-terminal icon indicating copy to clipboard operation
zulip-terminal copied to clipboard

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

Open amanagr opened this issue 4 years ago • 14 comments

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

amanagr avatar Mar 07 '20 02:03 amanagr

@zulipbot claim

Ar9av avatar Mar 08 '20 09:03 Ar9av

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)!

zulipbot avatar Mar 08 '20 09:03 zulipbot

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 ?

Ar9av avatar Mar 08 '20 14:03 Ar9av

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.

amanagr avatar Mar 09 '20 05:03 amanagr

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!

zulipbot avatar Mar 19 '20 10:03 zulipbot

@zulipbot claim

kumarnithin164 avatar Sep 24 '20 07:09 kumarnithin164

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)!

zulipbot avatar Sep 24 '20 07:09 zulipbot

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

kumarnithin164 avatar Sep 25 '20 05:09 kumarnithin164

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!

zulipbot avatar Oct 05 '20 08:10 zulipbot

@zulipbot abandon

kumarnithin164 avatar Oct 07 '20 08:10 kumarnithin164

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.

sumagnadas avatar Oct 12 '20 11:10 sumagnadas

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

Ezio-Sarthak avatar Dec 21 '20 15:12 Ezio-Sarthak

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

neiljp avatar May 20 '21 18:05 neiljp

@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!

zulipbot avatar Apr 21 '23 02:04 zulipbot