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

CASEMAPPING Support #668

Merged
merged 11 commits into from
Dec 29, 2024
Merged

CASEMAPPING Support #668

merged 11 commits into from
Dec 29, 2024

Conversation

andymandias
Copy link
Collaborator

@andymandias andymandias commented Dec 6, 2024

Uses the CASEMAPPING RPL_ISUPPORT parameter to normalize targets (user/channel) names, then uses normalized targets for routing. Still undergoing testing and open to be refactored.

Known issue(s):

  • First version of target name seen (sent by the server/bouncer) is used in the sidebar. If that is one that has been pre-normalized, then the normalized version of the target will appear in the sidebar. E.g. if a message has been sent by Guest59 then it may appear in the sidebar as guest59.

@andymandias andymandias linked an issue Dec 7, 2024 that may be closed by this pull request
@andymandias andymandias marked this pull request as ready for review December 17, 2024 23:19
@andymandias
Copy link
Collaborator Author

andymandias commented Dec 17, 2024

For now, using incoming messages to resolve the case of the nickname of a user (used in the sidebar). In testing it performs better than a more complicated /WHOIS//WHOWAS scheme for nearly all cases, and it is much simpler to implement.

CASEMAPPING been working well in my testing, so I think it's ready for review when time permits.

@englut
Copy link
Contributor

englut commented Dec 19, 2024

@andymandias I took the liberty of fixing some merge conflicts (I've been merging your branch to help test!) caused by my merges.

I'm sure you can resolve the conflicts yourself, but in case you want a relatively quick patch:
I've pushed up my fixes (edit: rebased, and not needed anymore!).

@andymandias
Copy link
Collaborator Author

@andymandias I took the liberty of fixing some merge conflicts (I've been merging your branch to help test!) caused by my merges.

I'm sure you can resolve the conflicts yourself, but in case you want a relatively quick patch: I've pushed up my fixes.

Thanks for the reference! Appreciate all the testing you've been doing, it's been invaluable! 🙏

Copy link
Member

@tarkah tarkah left a comment

Choose a reason for hiding this comment

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

LGTM! It's a big diff but that mostly comes down to newtyping channel / query / target strings.

It's nice that change enables us to layer in case mapping so easily. Thanks for tackling this!

match self {
Self::Channel(_, channel) => Some(channel),
Self::Server(_) | Self::Query(_, _) => None,
}
}

pub fn target(&self) -> Option<String> {
pub fn target(&self) -> Option<target::Target> {
Copy link
Member

Choose a reason for hiding this comment

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

Nit: redundant, just import Target directly
Same with elsewhere in the PR

@andymandias andymandias merged commit 87371d2 into main Dec 29, 2024
1 check passed
@andymandias andymandias deleted the feat/casemapping branch December 29, 2024 18:42
@andymandias andymandias mentioned this pull request Jan 4, 2025
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.

Channel name is case sensitive
4 participants