Hylozoic / hylo-evo

Hylo UI
Apache License 2.0
36 stars 10 forks source link

Prompted to re-answer join questions once my request to join a group approved #1663

Closed KrishaTerranIO closed 3 months ago

KrishaTerranIO commented 3 months ago

Another thing, I requested access to join BioFi. I answered the join questions and requested access. Once my request was approved, I'm taken to the Explore page and immediately I'm prompted to re-answer the join questions. It won't let me hop in until I do so.

This is happening on my Macbook Air, on Chrome ![Uploading Screenshot 2024-07-29 at 12.18.49 PM.png…]()

KrishaTerranIO commented 3 months ago

Update: once I refresh, I'm taken back to the screen to re-agree to group agreements and I'm let into the group

thomasgwatson commented 3 months ago

Bug replicated, at least until the second set of join questions popping up. The third time around for agreements I will have to confirm later.

The joinQuestionsAnsweredAt value is null instead of being a date-time stamp

The value comes from const { agreementsAcceptedAt, joinQuestionsAnsweredAt } = currentMembership?.settings || {}

Which comes from currentMembership = useSelector(state => getMyGroupMembership(state, props))

If you receive a notification (over web sockets), sharing that you've been accepted into a group, you have somewhere to click on getting access for that group. Looking in the console, at the redux debugging information, FETCH_CURRENT_USER does happen, and it had a membership for the group! But it appears that the membership doesn't have the joinQuestionsAnsweredAt value. But it is requested and present in the graphql query.

So, my current theory is that the 'joinQuestionsAnswerAt' isn't updated if someone answers them as part of their request to join and that this is a node issue....

Off to validate that

thomasgwatson commented 3 months ago

Nah, node is fine.

It is that its missing a up to date membership. Once we have everything running off graphQL subscriptions these sorts of bugs will all go away :D

thomasgwatson commented 3 months ago

OK... back to comment on this just before I go to bed. Now I'm just getting a variation of this bug where I have been approved but there is no way for me to trigger receiving the membership object in the browser without just hitting refresh.

thomasgwatson commented 3 months ago

@tibetsprague, thoughts on what makes sense here...

Once we have graphql subscriptions, this will be straightforward. until then its...

Leaning towards the second, since I am not so familiar with the socket setup

tibetsprague commented 3 months ago

no user socket right now, I started working on that at some point. There used to be one. yes we definitely need some kind of re-request of membership for sure, why not just when you go to the group?