Skip to content

chore: make autoRequestProfileForMissingUsers and getDisplayNameAndAvatarFromPrevContent configurable - #2472

Merged
krille-chan merged 1 commit into
mainfrom
krille/make-displayname-fetching-configurable
Sep 2, 2026
Merged

chore: make autoRequestProfileForMissingUsers and getDisplayNameAndAvatarFromPrevContent configurable#2472
krille-chan merged 1 commit into
mainfrom
krille/make-displayname-fetching-configurable

Conversation

@krille-chan

@krille-chan krille-chan commented Sep 1, 2026

Copy link
Copy Markdown
Contributor

Note

Low Risk
Behavioral toggles default to existing behavior; risk is mainly misconfiguration (fewer profile fetches or missing display names for left users).

Overview
Adds two Client constructor flags so apps can tune how missing room members are resolved without changing call sites everywhere.

autoRequestProfileForMissingUsers (default true) drives whether Room.requestUser falls back to the global profile when member state is empty. requestProfile is now optional; when omitted it uses that client setting.

getDisplayNameAndAvatarFromPrevContent (default true) gates whether User.displayName and User.avatarUrl still read from prevContent for non-joined members (e.g. left or banned). Turning it off stops using stale names/avatars from prior member events while keeping current defaults.

Reviewed by Cursor Bugbot for commit f03a1f6. Bugbot is set up for automated code reviews on this repo. Configure here.

@codecov

codecov Bot commented Sep 1, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 60.45%. Comparing base (21d1285) to head (f03a1f6).

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #2472   +/-   ##
=======================================
  Coverage   60.44%   60.45%           
=======================================
  Files         162      162           
  Lines       20568    20572    +4     
=======================================
+ Hits        12432    12436    +4     
  Misses       8136     8136           
Files with missing lines Coverage Δ
lib/src/client.dart 78.33% <ø> (ø)
lib/src/room.dart 78.32% <100.00%> (+0.03%) ⬆️
lib/src/user.dart 90.65% <100.00%> (+0.17%) ⬆️

Continue to review full report in Codecov by Harness.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 21d1285...f03a1f6. Read the comment docs.

@td-famedly td-famedly left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

oki

@td-famedly

Copy link
Copy Markdown
Member

@cursor review

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ Bugbot reviewed your changes and found no new issues!

Comment @cursor review or bugbot run to trigger another review on this PR

Reviewed by Cursor Bugbot for commit f03a1f6. Configure here.

@krille-chan
krille-chan merged commit bb25788 into main Sep 2, 2026
19 checks passed
@krille-chan
krille-chan deleted the krille/make-displayname-fetching-configurable branch September 2, 2026 05:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants