How to use the matrix-js-sdk.EventStatus.NOT_SENT function in matrix-js-sdk

To help you get started, we’ve selected a few matrix-js-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 FabricLabs / fabric / src / components / views / context_menus / MessageContextMenu.js View on Github external
const eventStatus = mxEvent.status;
        let resendButton;
        let redactButton;
        let cancelButton;
        let forwardButton;
        let pinButton;
        let viewClearSourceButton;
        let unhidePreviewButton;
        let externalURLButton;
        let quoteButton;
        let collapseReplyThread;

        // status is SENT before remote-echo, null after
        const isSent = !eventStatus || eventStatus === EventStatus.SENT;

        if (eventStatus === EventStatus.NOT_SENT) {
            resendButton = (
                <div>
                    { _t('Resend') }
                </div>
            );
        }

        if (isSent &amp;&amp; this.state.canRedact) {
            redactButton = (
                <div>
                    { _t('Remove') }
                </div>
            );
        }

        if (eventStatus === EventStatus.QUEUED || eventStatus === EventStatus.NOT_SENT) {
github FabricLabs / fabric / src / components / views / rooms / EventTile.js View on Github external
// event is encrypted, display padlock corresponding to whether or not it is verified
        if (ev.isEncrypted()) {
            if (this.state.verified) {
                return; // no icon for verified
            } else {
                return ();
            }
        }

        if (this.props.matrixClient.isRoomEncrypted(ev.getRoomId())) {
            // else if room is encrypted
            // and event is being encrypted or is not_sent (Unknown Devices/Network Error)
            if (ev.status === EventStatus.ENCRYPTING) {
                return;
            }
            if (ev.status === EventStatus.NOT_SENT) {
                return;
            }
            // if the event is not encrypted, but it's an e2e room, show the open padlock
            return ;
        }

        // no padlock needed
        return null;
    },
github FabricLabs / fabric / src / components / views / context_menus / MessageContextMenu.js View on Github external
resendButton = (
                <div>
                    { _t('Resend') }
                </div>
            );
        }

        if (isSent &amp;&amp; this.state.canRedact) {
            redactButton = (
                <div>
                    { _t('Remove') }
                </div>
            );
        }

        if (eventStatus === EventStatus.QUEUED || eventStatus === EventStatus.NOT_SENT) {
            cancelButton = (
                <div>
                    { _t('Cancel Sending') }
                </div>
            );
        }

        if (isSent &amp;&amp; mxEvent.getType() === 'm.room.message') {
            const content = mxEvent.getContent();
            if (content.msgtype &amp;&amp; content.msgtype !== 'm.bad.encrypted' &amp;&amp; content.hasOwnProperty('body')) {
                forwardButton = (
                    <div>
                        { _t('Forward Message') }
                    </div>
                );
github FabricLabs / fabric / src / Resend.js View on Github external
room.getPendingEvents().filter(function(ev) {
            return ev.status === EventStatus.NOT_SENT;
        }).forEach(function(event) {
            module.exports.resend(event);
github FabricLabs / fabric / src / Resend.js View on Github external
room.getPendingEvents().filter(function(ev) {
            return ev.status === EventStatus.NOT_SENT;
        }).forEach(function(event) {
            module.exports.removeFromQueue(event);