Skip to content
This repository has been archived by the owner on Sep 11, 2024. It is now read-only.

Implement user power-level changes in timeline #794

Merged
merged 2 commits into from
Apr 12, 2017

Conversation

lukebarnard1
Copy link
Contributor

@lukebarnard1 lukebarnard1 commented Apr 6, 2017

Fixes element-hq/element-web#266

  • It gets the value for "Default" from the content of the power event
  • Multiple users' power levels being set ends up being "Bob changed the power level of @alice:matrix.org from 50 to 49, @ken:matrix.org from 34 to 43, ..."

2017-04-06-171657_668x239_scrot

50: 'Moderator',
100: 'Admin',
};

Copy link
Member

Choose a reason for hiding this comment

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

It feels like the sort of thing that should be in one place: we should probably reuse the logic from/in https://github.com/matrix-org/matrix-react-sdk/blob/master/src/components/views/elements/PowerSelector.js

} else {
return level;
}
}
Copy link
Member

Choose a reason for hiding this comment

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

This should probably be common between here and PowerSelector too.

So that the mapping between a numerical power level and a "role" are done in one place. PowerSelector.js has been modified to use the same mapping.
@lukebarnard1
Copy link
Contributor Author

Merging after next release

@dbkr dbkr merged commit 726cb43 into develop Apr 12, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants