Skip to content

Conversation

@neilisfragile
Copy link
Contributor

I was recently playing around with the sdk and was unable to instantiate a client due to a malformed state event present in one of the rooms I am a member.

The event was of type m.room.guest_access and contrary to spec had a zero length content field.

I'm unclear how this event was ever created, however it means that I (and presumably others), cannot create clients for any account that that participates in such a room.

This PR logs out the error, but ignores it and carries on.

Copy link
Contributor

@Zil0 Zil0 left a comment

Choose a reason for hiding this comment

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

Thanks! I had run into this before.

Two small changes and then we're good. As a side note, _process_state_event is starting to have too many levels of indentation, but this PR needn't fix this.

# limitations under the License.
import logging
import re

Copy link
Contributor

Choose a reason for hiding this comment

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

Maybe leave this change to the isort PR?

@Zil0
Copy link
Contributor

Zil0 commented Dec 7, 2018

Squash accordingly, fix the newline that got added if you want, and this is good to go!

@neilisfragile neilisfragile merged commit 6c50cdd into master Dec 7, 2018
@neilisfragile neilisfragile deleted the neilj/handle_malformed_state_events branch December 7, 2018 21:09
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.

3 participants