Messaging UI - Encryption and Sensitive Messages

This page describes the end-to-end encryption screens and the settings for sensitive messages.

End-to-end encryption screens

showEndToEndEncryptionInfo opens one of two screens. Their texts are in the encryption group.

The user’s own screen. It opens when no contact is given, or with showEndToEndEncryptionInfoForSelf on Android. It has:

  • A switch to turn end-to-end encryption on or off. mesibo saves the choice and applies it at start; the app does not call e2ee().enable.
  • A description of end-to-end encryption, and the user’s security code.
  • Under Man-in-the-middle protection (optional):
    • The user’s certificate: generated by mesibo, or a .p12 file imported by the user. A restart is recommended after an import.
    • Export of the user’s public certificate, to share it outside the app.
    • A password for all chats.

A contact’s screen. It opens from the profile of a user. It has:

  • The state of encryption with that user: active, identity changed, not active, failed, identity failed, or suspicious.
  • The security code, for the two users to compare.
  • Reset encryption.
  • Under Man-in-the-middle protection:
    • A password for this chat. Both users enter the same password.
    • The contact’s certificate, a .pub or .pem file.

Passwords are never shown. The screens show whether a password is set, and offer Remove.

Sensitive messages

A message has a sensitivity: a number set by the sender, with setSensitivity or in the message options. The message options have three levels: 1 Private, 2 Sensitive and 3 Confidential.

Each ...Level setting of the sensitivity group is a threshold. It applies to messages whose sensitivity is equal to or higher than the threshold. 0 turns it off.

SettingDefaultFor messages at or above the level
showIconLevel1An eye icon by the time
hidePreviewLevel1The chat list, replies and quotes show Sensitive message instead of the content
blockKeepLevel1A disappearing message cannot be kept. Keep is dimmed; a tap shows blockedKeepMessage
tapToViewLevel2The message is covered until tapped. Pictures are blurred; text is replaced by Sensitive message · Tap to view
blockForwardLevel2Forward is dimmed; a tap shows blockedForwardMessage
coverAgainLevel3A message the user uncovered is covered again the next time the chat opens. Below this level, it stays uncovered while the app runs
blockCopyLevel3Copy is dimmed; a tap shows blockedCopyMessage
blockScreenshotLevel3Android: screenshots and screen recording are blocked while the chat is open. iOS: the chat is covered while the screen is recorded or shared, and in the app switcher. iOS does not let apps block screenshots

Other settings of the group:

SettingDefaultDescription
coverSentfalseThe user’s own sent messages are also covered at tapToViewLevel. Also set in the Customize screen
title, tapToViewTitleSensitive message, Tap to viewThe texts of the cover and of the previews
blockedKeepMessage, blockedForwardMessage, blockedCopyMessageThis message can’t be kept, …forwarded, …copiedShown on a tap on a dimmed action
imageResource (Android), image (iOS)built inThe app’s own eye icon

When the app changes the levels, it also changes messageOptions.sensitivities to match.

The following covers messages from level 1, and never blocks screenshots:

// in MesiboUI_onConfig(config, dark)
config.sensitivity.tapToViewLevel = 1;
config.sensitivity.blockScreenshotLevel = 0;
// in MesiboUI_onConfig(config, dark)
config.sensitivity.tapToViewLevel = 1
config.sensitivity.blockScreenshotLevel = 0
// in MesiboUI_onConfig(config:dark:)
config.sensitivity.tapToViewLevel = 1
config.sensitivity.blockScreenshotLevel = 0
// in MesiboUI_onConfig:dark:
config.sensitivity.tapToViewLevel = 1;
config.sensitivity.blockScreenshotLevel = 0;
{"sensitivity": {"tapToViewLevel": 1, "blockScreenshotLevel": 0}}

Notifications are built by the app. The app checks the sensitivity of a message there too, and leaves out the text when needed.