How to use the matrix-react-sdk/lib/dispatcher.dispatch function in matrix-react-sdk

To help you get started, we’ve selected a few matrix-react-sdk examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github vector-im / riot-web / src / components / structures / RoomDirectory.js View on Github external
avatarUrl: room.avatar_url,
                // XXX: This logic is duplicated from the JS SDK which
                // would normally decide what the name is.
                name: room.name || room_alias || _t('Unnamed room'),
            };
        }
        // It's not really possible to join Matrix rooms by ID because the HS has no way to know
        // which servers to start querying. However, there's no other way to join rooms in
        // this list without aliases at present, so if roomAlias isn't set here we have no
        // choice but to supply the ID.
        if (room_alias) {
            payload.room_alias = room_alias;
        } else {
            payload.room_id = room.room_id;
        }
        dis.dispatch(payload);
    },
github vector-im / riot-web / src / components / views / globals / PasswordNagBar.js View on Github external
onFinished: (passwordChanged) => {
                if (!passwordChanged) {
                    return;
                }
                // Notify SessionStore that the user's password was changed
                dis.dispatch({
                    action: 'password_changed',
                });
            },
        });
github vector-im / riot-web / src / components / views / context_menus / TagTileContextMenu.js View on Github external
_onRemoveClick() {
        dis.dispatch(TagOrderActions.removeTag(
            // XXX: Context menus don't have a MatrixClient context
            MatrixClientPeg.get(),
            this.props.tag,
        ));
        this.props.onFinished();
    }
github vector-im / riot-web / src / skins / vector / views / molecules / RoomHeader.js View on Github external
onFullscreenClick: function() {
        dis.dispatch({action: 'video_fullscreen', fullscreen: true}, true);
    },
github vector-im / riot-web / src / components / structures / BottomLeftMenu.js View on Github external
onDirectoryClick: function() {
        dis.dispatch({ action: 'view_room_directory' });
    },
github vector-im / riot-web / src / vector / platform / VectorBasePlatform.js View on Github external
startUpdateCheck() {
        this.showUpdateCheck = true;
        dis.dispatch({
            action: 'check_updates',
            value: { status: updateCheckStatusEnum.CHECKING },
        });
    }
github vector-im / riot-web / src / components / structures / LeftPanel.js View on Github external
onHideClick: function() {
        dis.dispatch({
            action: 'hide_left_panel',
        });
    },
github vector-im / riot-web / src / vector / platform / VectorBasePlatform.js View on Github external
stopUpdateCheck() {
        this.showUpdateCheck = false;
        dis.dispatch({
            action: 'check_updates',
            value: false,
        });
    }
github vector-im / riot-web / src / vector / platform / ElectronPlatform.js View on Github external
notification.onclick = function() {
            dis.dispatch({
                action: 'view_room',
                room_id: room.roomId
            });
            global.focus();
        };
github vector-im / riot-web / src / vector / platform / ElectronPlatform.js View on Github external
function onUpdateDownloaded(ev, releaseNotes, ver, date, updateURL) {
    dis.dispatch({
        action: 'new_version',
        currentVersion: electron.remote.app.getVersion(),
        newVersion: ver,
        releaseNotes: releaseNotes,
    });
}