-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Conversation
d8b6b59
to
857a63a
Compare
Codecov Report
@@ Coverage Diff @@
## develop #4642 +/- ##
===========================================
+ Coverage 75.17% 75.19% +0.01%
===========================================
Files 340 340
Lines 34712 34717 +5
Branches 5677 5679 +2
===========================================
+ Hits 26096 26104 +8
+ Misses 7013 7012 -1
+ Partials 1603 1601 -2 |
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.
yeahh let's not do this. there's a whole different code path for membership events.
I'd suggest using a completely separate loop in clone_existing_room
and calling room_member_handler.update_membership
instead.
The problem with |
there's a |
857a63a
to
9154210
Compare
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.
lgtm otherwise
synapse/handlers/room.py
Outdated
@@ -285,6 +285,7 @@ def clone_existing_room( | |||
(EventTypes.RoomAvatar, ""), | |||
(EventTypes.Encryption, ""), | |||
(EventTypes.ServerACL, ""), | |||
(EventTypes.Member, None), |
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.
I think it would probably be better to do this with a separate call to get_filtered_current_state_ids
.
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.
Hrm, in testing this seems to be a few hundred ms slower if we do another call to the DB.
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.
how big was your room? ;-p
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.
Literally 1 ban and no messages lol
synapse/handlers/room.py
Outdated
# Transfer membership events | ||
for old_event in member_events: | ||
# Only transfer ban events | ||
logger.info("Event type: " + str(old_event.content)) |
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.
this looks like it needs to go away
changelog.d/4642.bugfix
Outdated
@@ -0,0 +1 @@ | |||
Transfer bans on room upgrade. |
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.
I call it a feature rather than a bugfix.
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.
Really? All the other room upgrade stuff I've been doing have been bug fixes.
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.
I'd argue that's incorrect, then. This is a new feature for room upgrades as far as I'm concerned.
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.
Kk, I have no strong feelings one way or the other.
a70afca
to
aa4d172
Compare
aa4d172
to
f8b9ca5
Compare
Test for Synapse PR matrix-org/synapse#4642
Transfer bans on a room upgrade.
Closes #4600
Sytest PR: matrix-org/sytest#563