hicommonwealth / commonwealth

A platform for decentralized communities
https://commonwealth.im
GNU General Public License v3.0
67 stars 42 forks source link

Replace User.lastVisted property with derived info #4576

Closed rbennettcw closed 1 year ago

rbennettcw commented 1 year ago

Currently, there is a user.lastVisited field in the DB which looks like this:

{
  "11": "2022-09-21T10:23:53.771Z",
  "ethereum": "2022-02-21T10:18:07.983Z",
  "hummingbot-foundation": "2021-01-21T10:33:37.361Z"
}

Whenever a comment/thread is created, the client makes a request to /writeUserSetting, which updates the User.lastVisted field.

This is possibly redundant since we already save the Address.last_active field via server when comments/threads are created. The addresses provide activity timestamps for each chain a user took action in.

Acceptance Criteria

jnaviask commented 1 year ago

Time box: 2 hours.

rbennettcw commented 1 year ago

This seems to be a small/easy change and I already have a proof of concept working, so I'm converting this ticket from a spike to an enhancement/cleanup.

rbennettcw commented 1 year ago

I actually didn't see any usage of the value on the frontend, so I'm pausing this for now to discuss next steps on: https://github.com/hicommonwealth/commonwealth/issues/4701

rbennettcw commented 1 year ago

Discussion from #4701 resolved. Pushed latest to PR.