canSendDefaultMessages property

bool get canSendDefaultMessages

The default level required to send message events. Can be overridden by the events key.

Implementation

bool get canSendDefaultMessages =>
    (getState(EventTypes.RoomPowerLevels)
                ?.content
                .tryGet<int>('events_default') ??
            0) <=
        ownPowerLevel &&
    (!encrypted || client.encryptionEnabled);