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

Implement channel rename #85

Merged
merged 2 commits into from
Sep 17, 2023
Merged

Implement channel rename #85

merged 2 commits into from
Sep 17, 2023

Conversation

progval
Copy link
Contributor

@progval progval commented Sep 16, 2023

I triggered the todo!(); because of channel name clashes so I wanted to fix it; and it's easier to test the code when clients can explicitly ask for renames.

For now, chathistory still matches based on channel name, so it's not carried over to the new channel. We need to discuss in ircv3/ircv3-specifications#532 what exactly it should look like to clients.

For now, chathistory still matches based on channel name, so it's not
carried over to the new channel.
@@ -32,6 +32,7 @@ pub enum ChannelAccessFlag {
ReceiveOp = 0x0000_0010,
ReceiveVoice = 0x0000_0020,
ReceiveOpmod = 0x0000_0040,
Rename = 0x0000_0080,
Copy link
Collaborator

Choose a reason for hiding this comment

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

This isn't a receive statusmsg flag, it's a take action flag, so it belongs in the next group with topic/kick

Copy link
Contributor Author

Choose a reason for hiding this comment

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

the next group doesn't have room for another bit

Copy link
Collaborator

Choose a reason for hiding this comment

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

0x0000_1000 to 0x0000_8000 are available and fit in at the end of the next group

@@ -250,7 +250,9 @@ impl SendHistoryItem for update::ChannelInvite {

impl SendHistoryItem for update::ChannelRename {
fn send_to(&self, _conn: impl MessageSink, _from_entry: &HistoryLogEntry) -> HandleResult {
todo!();
// Not part of history, so it is handled entirely in send_realtime.rs.
// See https://github.com/ircv3/ircv3-specifications/issues/532
Copy link
Collaborator

Choose a reason for hiding this comment

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

That issue seems to say it should be part of history, though.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

it's undecided for now so I'm mirroring existing implementations

@@ -34,6 +34,7 @@
"quiet_view", "quiet_add", "quiet_remove_any",
"exempt_view", "exempt_add", "exempt_remove_any",
"invite_self", "invite_other",
"rename",
Copy link
Collaborator

Choose a reason for hiding this comment

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

This belongs better between lines 32-33. It also needs to be reflected in the default services config's default roles.

@spb spb merged commit 8350f87 into Libera-Chat:master Sep 17, 2023
2 checks passed
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