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

Add getVersion to Room #689

Merged
merged 1 commit into from
Aug 14, 2018
Merged

Add getVersion to Room #689

merged 1 commit into from
Aug 14, 2018

Conversation

dbkr
Copy link
Member

@dbkr dbkr commented Aug 14, 2018

To get the version number of the room as per matrix-org/matrix-spec-proposals#1425

To get the version number of the room as per matrix-org/matrix-spec-proposals#1425
dbkr added a commit to matrix-org/matrix-react-sdk that referenced this pull request Aug 14, 2018
@dbkr dbkr requested a review from a team August 14, 2018 13:30
const createEvent = this.currentState.getStateEvents("m.room.create", "");
if (!createEvent) return null;
const ver = createEvent.getContent()['room_version'];
if (ver === undefined) return '1';
Copy link
Contributor

Choose a reason for hiding this comment

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

room_version is also a string, and not a number, in the json of a room create event? Odd if it's numeric ...

Copy link
Member Author

Choose a reason for hiding this comment

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

It is indeed defined to be a string (so you can have a version of 'dave-thing-testing' or whatever)

@bwindels bwindels merged commit af1b26a into develop Aug 14, 2018
@t3chguy t3chguy deleted the dbkr/show_room_version branch May 10, 2022 14:19
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