pangeachat / client

Learn a language while texting your friends
https://krille-chan.github.io/fluffychat/
GNU Affero General Public License v3.0
1 stars 2 forks source link

Getting My Analytics for another account #330

Closed Kelrap closed 1 month ago

Kelrap commented 1 month ago

Bug Description

A student's error analytics are showing in the teachers' and a fellow student's My Analytics pages. It also shows in the Class Analytics page for completely different classes/exchanges. Selecting a specific chat does not make the error categories disappear.

Screenshot 2024-06-13 at 11 16 59 AM Screenshot 2024-06-13 at 11 54 39 AM

Steps to Reproduce

  1. On staging, two teacher accounts created a class each, and an exchange shared by both classes
  2. On staging, two students joined one of the classes each, and sent messages in their respective class and the shared exchange
  3. On staging, the students and teachers loaded their My Analytics and Class Analytics
  4. In the analytics-rooms-data branch, the students and teachers loaded their My Analytics and Class Analytics
  5. One of the teachers checked My Analytics/Error Analytics, and saw a student's errors
  6. After that, when other accounts checked My Analytics or Class Analytics, they also saw the student's errors.

I cannot test replication steps further without archiving the affected chats/spaces.

The error may have been affected by having multiple tabs of an account open at once, having the main branch version open at the same time as the analytics branch version, or chats being improperly archived (the first teacher to see the student's errors had archived irrelevant chats in the staging version, but was still able to see those chats in the branch version. They checked My Analytics then, and saw the incorrect Error Analytics).

Expected Behavior

Only relevant errors should show in Error Analytics

App Version

analytics-rooms-data branch

Additional Platform Information

iPhone

Additional Context

The student with contagious errors is @kelrap:staging.pangea.chat. The other student is @ anotheraccount:staging.pangea.chat, and the teachers are @teeeeeesting:staging.pangea.chat and @6knpzjy9bmch:staging.pangea.chat