-
Notifications
You must be signed in to change notification settings - Fork 268
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
feat: Add a method to remove the room topic. #4589
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #4589 +/- ##
==========================================
+ Coverage 85.38% 85.40% +0.01%
==========================================
Files 286 286
Lines 32255 32256 +1
==========================================
+ Hits 27542 27547 +5
+ Misses 4713 4709 -4 ☔ View full report in Codecov by Sentry. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, but a smoke test would make this even better.
@@ -2270,6 +2270,19 @@ impl Room { | |||
self.send_state_event(RoomTopicEventContent::new(topic.into())).await | |||
} | |||
|
|||
/// Removes the topic from this room if one is set. | |||
pub async fn remove_room_topic(&self) -> Result<()> { | |||
let event = self |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you add a smoke test to check that this calls the correct requests? The MatrixMockServer
should make this relatively easy.
Let me know if you need some guidance on how the MatrixMockServer
is supposed to be used.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah nice. Just waiting to hear back if we actually want this method now given element-hq/element-meta#2705 (comment). Will come back and add that test if we do 👍
It was decided not to use this (at least for now). |
This PR adds
Room::remove_room_topic
to allow clients to redact the topic instead of setting it to an empty string. See element-hq/element-meta#2705 for more info.Closes #4588.