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

user reactivation: Be sure to preserve last-active-date #14279

Open
showell opened this issue Mar 21, 2020 · 3 comments · May be fixed by #14344
Open

user reactivation: Be sure to preserve last-active-date #14279

showell opened this issue Mar 21, 2020 · 3 comments · May be fixed by #14344

Comments

@showell
Copy link
Contributor

showell commented Mar 21, 2020

When we deactivate and then immediately reactivate a user, something like this may happen (not sure on exact details):

  • during deactivation, we drop the presence info
  • during reactivation, we don't include presence info in the events for reactivating the user
  • we re-draw the list of users in settings before presence info comes back through the normal mechanism

If you work on this, step one is to make sure my diagnosis above is actually correct.

There are two likely fixes here:

  • keep the presence info around for recently deactivated users in the client (this feels janky to me)
  • just add presence info to the event that the server sends on reactivation

This is fairly low priority, since it only affects admin users. It's possible a short term fix here is to just add a little inline help next to "Unknown". Click on a question mark and pop a modal that says "Why don't we know the last active date" and then give a list of possible reasons (we just deactivated/reactivated, they have been gone a long time, etc.)

@showell
Copy link
Contributor Author

showell commented Mar 21, 2020

For the same reasons, probably, the buddy list does not immediately reflect the new user upon reactivation. We should fix that, too.

sahil839 added a commit to sahil839/zulip that referenced this issue Mar 26, 2020
…vents.

This commit changes the reactiavtion code to send last_active_timestamp
with the realm_user/add event and also sends the peer_add events as
user resubscribes to the streams that he was subscribed before deactiavtion.

It also makes sense to restore the custom_profile_field_data on reactivation
of user and required changes for this is also made in this commit.

More robust tests are added and existing tests are verified for reactivation
of user according to the changes made in this commit.

Fixes zulip#14279
sahil839 added a commit to sahil839/zulip that referenced this issue Mar 26, 2020
…vents.

This commit changes the reactiavtion code to send last_active_timestamp
with the realm_user/add event and also sends the peer_add events as
user resubscribes to the streams that he was subscribed before deactiavtion.

It also makes sense to restore the custom_profile_field_data on reactivation
of user and required changes for this is also made in this commit.

More robust tests are added and existing tests are verified for reactivation
of user according to the changes made in this commit.

Fixes zulip#14279
sahil839 added a commit to sahil839/zulip that referenced this issue Mar 26, 2020
…vents.

This commit changes the reactiavtion code to send last_active_timestamp
with the realm_user/add event and also sends the peer_add events as
user resubscribes to the streams that he was subscribed before deactiavtion.

It also makes sense to restore the custom_profile_field_data on reactivation
of user and required changes for this is also made in this commit.

More robust tests are added and existing tests are verified for reactivation
of user according to the changes made in this commit.

Fixes zulip#14279
sahil839 added a commit to sahil839/zulip that referenced this issue Mar 27, 2020
…vents.

This commit changes the reactiavtion code to send last_active_timestamp
with the realm_user/add event and also sends the peer_add events as
user resubscribes to the streams that he was subscribed before deactiavtion.

It also makes sense to restore the custom_profile_field_data on reactivation
of user and required changes for this is also made in this commit.

More robust tests are added and existing tests are verified for reactivation
of user according to the changes made in this commit.

Fixes zulip#14279
sahil839 added a commit to sahil839/zulip that referenced this issue Mar 27, 2020
…vents.

This commit changes the reactiavtion code to send last_active_timestamp
with the realm_user/add event and also sends the peer_add events as
user resubscribes to the streams that he was subscribed before deactiavtion.

It also makes sense to restore the custom_profile_field_data on reactivation
of user and required changes for this is also made in this commit.

More robust tests are added and existing tests are verified for reactivation
of user according to the changes made in this commit.

Fixes zulip#14279
sahil839 added a commit to sahil839/zulip that referenced this issue Mar 27, 2020
…vents.

This commit changes the reactiavtion code to send last_active_timestamp
with the realm_user/add event and also sends the peer_add events as
user resubscribes to the streams that he was subscribed before deactiavtion.

It also makes sense to restore the custom_profile_field_data on reactivation
of user and required changes for this is also made in this commit.

More robust tests are added and existing tests are verified for reactivation
of user according to the changes made in this commit.

Fixes zulip#14279
@zulipbot
Copy link
Member

zulipbot commented Apr 6, 2020

Hello @sahil839, 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!

sahil839 added a commit to sahil839/zulip that referenced this issue Apr 7, 2020
…vents.

This commit changes the reactiavtion code to send last_active_timestamp
with the realm_user/add event and also sends the peer_add events as
user resubscribes to the streams that he was subscribed before deactiavtion.

It also makes sense to restore the custom_profile_field_data on reactivation
of user and required changes for this is also made in this commit.

More robust tests are added and existing tests are verified for reactivation
of user according to the changes made in this commit.

Fixes zulip#14279
sahil839 added a commit to sahil839/zulip that referenced this issue Apr 7, 2020
…vents.

This commit changes the reactiavtion code to send last_active_timestamp
with the realm_user/add event and also sends the peer_add events as
user resubscribes to the streams that he was subscribed before deactiavtion.

It also makes sense to restore the custom_profile_field_data on reactivation
of user and required changes for this is also made in this commit.

More robust tests are added and existing tests are verified for reactivation
of user according to the changes made in this commit.

Fixes zulip#14279
sahil839 added a commit to sahil839/zulip that referenced this issue Apr 16, 2020
…ents.

This commit changes the reactiavtion code to send last_active_timestamp
with the realm_user/add event and also sends the peer_add events as
user resubscribes to the streams that he was subscribed before deactiavtion.

It also makes sense to restore the custom_profile_field_data on reactivation
of user and required changes for this is also made in this commit.

More robust tests are added and existing tests are verified for reactivation
of user according to the changes made in this commit.

Fixes zulip#14279
@zulipbot
Copy link
Member

zulipbot commented Apr 9, 2021

Hello @zulip/server-sidebars members, this issue was labeled with the "area: right-sidebar" label, so you may want to check it out!

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