mirror of
https://github.com/vector-im/element-web.git
synced 2025-09-14 10:11:11 +02:00
More code de-duping
This commit is contained in:
parent
c780cd05a8
commit
0ee8d18f5a
@ -163,14 +163,7 @@ module.exports = React.createClass({
|
||||
},
|
||||
|
||||
_getApps: function() {
|
||||
const appsStateEvents = this.props.room.currentState.getStateEvents('im.vector.modular.widgets');
|
||||
if (!appsStateEvents) {
|
||||
return [];
|
||||
}
|
||||
|
||||
return appsStateEvents.filter((ev) => {
|
||||
return ev.getContent().type && ev.getContent().url;
|
||||
}).map((ev) => {
|
||||
return WidgetUtils.getRoomWidgets(this.props.room).map((ev) => {
|
||||
return this._initAppConfig(ev.getStateKey(), ev.getContent(), ev.sender);
|
||||
});
|
||||
},
|
||||
|
Loading…
x
Reference in New Issue
Block a user