Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve calculation of DM names & avatars #721

Merged
merged 5 commits into from
Nov 23, 2022
Merged

Improve calculation of DM names & avatars #721

merged 5 commits into from
Nov 23, 2022

Conversation

AndrewFerr
Copy link
Member

Also:

  • fix DM metadata on startup
  • improve cleanup of DM when Matrix user leaves it
  • improve migration of DM when duplicate DM is created

Also:
  - fix DM metadata on startup
  - improve cleanup of DM when Matrix user leaves it
  - improve migration of DM when duplicate DM is created
@AndrewFerr AndrewFerr added javascript Pull requests that update Javascript code S-Minor Impairs non-critical functionality or suitable workarounds exist T-Defect Bugs, crashes, hangs, vulnerabilities, or other reported problems. labels Nov 21, 2022
@AndrewFerr AndrewFerr requested a review from a team as a code owner November 21, 2022 07:47
@AndrewFerr AndrewFerr self-assigned this Nov 21, 2022
Copy link
Collaborator

@tadzik tadzik left a comment

Choose a reason for hiding this comment

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

Looks good, I found a few nitpicks but nothing major.

I wonder if we need to do this metadata fixing on something else than bridge startup: maybe m.room.member events? Or will this name mismatch never happen organically, and the startup code is just there to fix the rooms that are currently broken, because they were created before this change went in?

src/BridgedRoom.ts Outdated Show resolved Hide resolved
src/Main.ts Show resolved Hide resolved
src/Main.ts Show resolved Hide resolved
src/SlackRTMHandler.ts Outdated Show resolved Hide resolved
@AndrewFerr
Copy link
Member Author

I wonder if we need to do this metadata fixing on something else than bridge startup: maybe m.room.member events? Or will this name mismatch never happen organically, and the startup code is just there to fix the rooms that are currently broken, because they were created before this change went in?

My understanding is that it's the latter.

@AndrewFerr
Copy link
Member Author

Actually, there is more time we should do the fixup: on ghost profile info updates triggered by an inbound message. Otherwise, DM names/avatars can go out-of-sync with the name/avatar of the Slack user it's associated with. (This is the subject of my TODO in RoomCreation.ts.)

Copy link
Collaborator

@tadzik tadzik left a comment

Choose a reason for hiding this comment

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

LGTM now!

@AndrewFerr AndrewFerr merged commit 56fc624 into develop Nov 23, 2022
@AndrewFerr AndrewFerr deleted the af/dm-naming branch November 25, 2022 14:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
javascript Pull requests that update Javascript code S-Minor Impairs non-critical functionality or suitable workarounds exist T-Defect Bugs, crashes, hangs, vulnerabilities, or other reported problems.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants