FriendsOfFlarum / byobu

Well integrated, advanced private discussions for your Flarum forum.
https://discuss.flarum.org/d/4762-flagrow-by-bu-well-integrated-advanced-private-discussions
MIT License
54 stars 33 forks source link

Discussion page breaks if a recipient is not in the store #161

Closed matteocontrini closed 3 years ago

matteocontrini commented 3 years ago

Bug Report

Current Behavior

When loading a private discussion page, the rendering of user labels fails if one of the users is not in the store. When loading the page "from scratch", this always happens if the user is not in the current set of recipients.

Steps to Reproduce

  1. Create a new private discussion
  2. Add a new user to the discussion
  3. Remove the user
  4. Refresh the page
  5. See that everything breaks when reaching the recipients label in the event post

immagine

Expected Behavior

The page should not break.

Environment

Possible solution(s)

I suppose the complete list of users should be returned by the API as related entities when loading the discussion.

matteocontrini commented 3 years ago

I've seen the PR above and while it should prevent the page from breaking, I don't think it actually completely solves the issue here.

The PR mentions deleted users but in the reproduction steps above there's no deleted user, just (existing) users that are not in the private discussion.