mirror of
https://github.com/vector-im/element-web.git
synced 2024-11-16 21:24:59 +08:00
s/m.room.color_scheme/org.matrix.room.color_scheme/g # to make kegan happier
This commit is contained in:
parent
4f14ead741
commit
3934b42ac8
@ -57,7 +57,7 @@ var commands = {
|
||||
}
|
||||
return success(
|
||||
MatrixClientPeg.get().setRoomAccountData(
|
||||
room_id, "m.room.color_scheme", colorScheme
|
||||
room_id, "org.matrix.room.color_scheme", colorScheme
|
||||
)
|
||||
);
|
||||
}
|
||||
|
@ -360,7 +360,7 @@ module.exports = React.createClass({
|
||||
var theAlias = MatrixTools.getCanonicalAliasForRoom(room);
|
||||
if (theAlias) presentedId = theAlias;
|
||||
|
||||
var color_scheme_event = room.getAccountData("m.room.color_scheme");
|
||||
var color_scheme_event = room.getAccountData("org.matrix.room.color_scheme");
|
||||
var color_scheme = {};
|
||||
if (color_scheme_event) {
|
||||
color_scheme = color_scheme_event.getContent();
|
||||
|
@ -244,7 +244,7 @@ module.exports = React.createClass({
|
||||
var room = MatrixClientPeg.get().getRoom(this.props.roomId);
|
||||
if (!room) return;
|
||||
|
||||
var color_scheme_event = room.getAccountData("m.room.color_scheme");
|
||||
var color_scheme_event = room.getAccountData("org.matrix.room.color_scheme");
|
||||
var color_scheme = {};
|
||||
if (color_scheme_event) {
|
||||
color_scheme = color_scheme_event.getContent();
|
||||
@ -255,7 +255,7 @@ module.exports = React.createClass({
|
||||
|
||||
onRoomAccountData: function(room, event) {
|
||||
if (room.roomId == this.props.roomId) {
|
||||
if (event.getType === "m.room.color_scheme") {
|
||||
if (event.getType === "org.matrix.room.color_scheme") {
|
||||
var color_scheme = event.getContent();
|
||||
// XXX: we should validate the event
|
||||
Tinter.tint(color_scheme.primary_color, color_scheme.secondary_color);
|
||||
@ -810,7 +810,7 @@ module.exports = React.createClass({
|
||||
if (new_color_scheme) {
|
||||
deferreds.push(
|
||||
MatrixClientPeg.get().setRoomAccountData(
|
||||
this.state.room.roomId, "m.room.color_scheme", new_color_scheme
|
||||
this.state.room.roomId, "org.matrix.room.color_scheme", new_color_scheme
|
||||
)
|
||||
);
|
||||
}
|
||||
|
@ -43,7 +43,7 @@ module.exports = React.createClass({
|
||||
getInitialState: function() {
|
||||
// work out the initial color index
|
||||
var room_color_index = undefined;
|
||||
var color_scheme_event = this.props.room.getAccountData("m.room.color_scheme");
|
||||
var color_scheme_event = this.props.room.getAccountData("org.matrix.room.color_scheme");
|
||||
if (color_scheme_event) {
|
||||
var color_scheme = color_scheme_event.getContent();
|
||||
if (color_scheme.primary_color) color_scheme.primary_color = color_scheme.primary_color.toLowerCase();
|
||||
|
Loading…
Reference in New Issue
Block a user