userId property

UserId get userId

Returns UserId part of this ChatId if isLocal.

Implementation

UserId get userId =>
    isLocal
        ? UserId(val.replaceFirst('d_', ''))
        : throw Exception('ChatId is not local');