You've already forked matrix-react-sdk
mirror of
https://github.com/matrix-org/matrix-react-sdk.git
synced 2025-11-20 16:22:28 +03:00
Update widget type.
This commit is contained in:
@@ -26,6 +26,8 @@ import SdkConfig from '../../../SdkConfig';
|
|||||||
import ScalarAuthClient from '../../../ScalarAuthClient';
|
import ScalarAuthClient from '../../../ScalarAuthClient';
|
||||||
import dis from '../../../dispatcher';
|
import dis from '../../../dispatcher';
|
||||||
|
|
||||||
|
const widgetType = 'm.stickerpicker';
|
||||||
|
|
||||||
export default class Stickerpicker extends React.Component {
|
export default class Stickerpicker extends React.Component {
|
||||||
constructor(props) {
|
constructor(props) {
|
||||||
super(props);
|
super(props);
|
||||||
@@ -56,7 +58,7 @@ export default class Stickerpicker extends React.Component {
|
|||||||
_removeStickerpickerWidgets() {
|
_removeStickerpickerWidgets() {
|
||||||
console.warn('Removing Stickerpicker widgets');
|
console.warn('Removing Stickerpicker widgets');
|
||||||
if (this.widgetId) {
|
if (this.widgetId) {
|
||||||
this.scalarClient.disableWidgetAssets('stickerpack', this.widgetId).then(() => {
|
this.scalarClient.disableWidgetAssets(widgetType, this.widgetId).then(() => {
|
||||||
console.warn('Assets disabled');
|
console.warn('Assets disabled');
|
||||||
}).catch((err) => {
|
}).catch((err) => {
|
||||||
console.error('Failed to disable assets');
|
console.error('Failed to disable assets');
|
||||||
@@ -224,7 +226,7 @@ export default class Stickerpicker extends React.Component {
|
|||||||
const src = (this.scalarClient !== null && this.scalarClient.hasCredentials()) ?
|
const src = (this.scalarClient !== null && this.scalarClient.hasCredentials()) ?
|
||||||
this.scalarClient.getScalarInterfaceUrlForRoom(
|
this.scalarClient.getScalarInterfaceUrlForRoom(
|
||||||
this.props.room,
|
this.props.room,
|
||||||
'type_stickerpack',
|
'type_' + widgetType,
|
||||||
this.widgetId,
|
this.widgetId,
|
||||||
) :
|
) :
|
||||||
null;
|
null;
|
||||||
|
|||||||
Reference in New Issue
Block a user