mirror of
https://github.com/element-hq/element-web
synced 2024-11-28 12:28:50 +03: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
4 changed files with 6 additions and 6 deletions
|
@ -57,7 +57,7 @@ var commands = {
|
||||||
}
|
}
|
||||||
return success(
|
return success(
|
||||||
MatrixClientPeg.get().setRoomAccountData(
|
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);
|
var theAlias = MatrixTools.getCanonicalAliasForRoom(room);
|
||||||
if (theAlias) presentedId = theAlias;
|
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 = {};
|
var color_scheme = {};
|
||||||
if (color_scheme_event) {
|
if (color_scheme_event) {
|
||||||
color_scheme = color_scheme_event.getContent();
|
color_scheme = color_scheme_event.getContent();
|
||||||
|
|
|
@ -244,7 +244,7 @@ module.exports = React.createClass({
|
||||||
var room = MatrixClientPeg.get().getRoom(this.props.roomId);
|
var room = MatrixClientPeg.get().getRoom(this.props.roomId);
|
||||||
if (!room) return;
|
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 = {};
|
var color_scheme = {};
|
||||||
if (color_scheme_event) {
|
if (color_scheme_event) {
|
||||||
color_scheme = color_scheme_event.getContent();
|
color_scheme = color_scheme_event.getContent();
|
||||||
|
@ -255,7 +255,7 @@ module.exports = React.createClass({
|
||||||
|
|
||||||
onRoomAccountData: function(room, event) {
|
onRoomAccountData: function(room, event) {
|
||||||
if (room.roomId == this.props.roomId) {
|
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();
|
var color_scheme = event.getContent();
|
||||||
// XXX: we should validate the event
|
// XXX: we should validate the event
|
||||||
Tinter.tint(color_scheme.primary_color, color_scheme.secondary_color);
|
Tinter.tint(color_scheme.primary_color, color_scheme.secondary_color);
|
||||||
|
@ -810,7 +810,7 @@ module.exports = React.createClass({
|
||||||
if (new_color_scheme) {
|
if (new_color_scheme) {
|
||||||
deferreds.push(
|
deferreds.push(
|
||||||
MatrixClientPeg.get().setRoomAccountData(
|
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() {
|
getInitialState: function() {
|
||||||
// work out the initial color index
|
// work out the initial color index
|
||||||
var room_color_index = undefined;
|
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) {
|
if (color_scheme_event) {
|
||||||
var color_scheme = color_scheme_event.getContent();
|
var color_scheme = color_scheme_event.getContent();
|
||||||
if (color_scheme.primary_color) color_scheme.primary_color = color_scheme.primary_color.toLowerCase();
|
if (color_scheme.primary_color) color_scheme.primary_color = color_scheme.primary_color.toLowerCase();
|
||||||
|
|
Loading…
Reference in a new issue