Skip to content

Commit

Permalink
TODO note
Browse files Browse the repository at this point in the history
  • Loading branch information
David Robertson committed Jul 17, 2023
1 parent 432397a commit 10bc834
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions sync3/handler/connstate_live.go
Original file line number Diff line number Diff line change
Expand Up @@ -297,6 +297,13 @@ func (s *connStateLive) processGlobalUpdates(ctx context.Context, builder *Rooms

metadata := rup.GlobalRoomMetadata().CopyHeroes()
metadata.RemoveHero(s.userID)
// TODO: if we change a room from being a DM to not being a DM, we should call
// SetRoom and recalculate avatars. To do that we'd need to
// - listen to m.direct global account data events
// - compute the symmetric difference between old and new
// - call SetRooms for each room in the difference.
// I'm assuming this happens so rarely that we can ignore this for now. PRs
// welcome if you a strong opinion to the contrary.
delta = s.lists.SetRoom(sync3.RoomConnMetadata{
RoomMetadata: *metadata,
UserRoomData: *rup.UserRoomMetadata(),
Expand Down

0 comments on commit 10bc834

Please sign in to comment.