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
.p12file 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.
- The user’s certificate: generated by mesibo, or a
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
.pubor.pemfile.
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.
| Setting | Default | For messages at or above the level |
|---|---|---|
showIconLevel | 1 | An eye icon by the time |
hidePreviewLevel | 1 | The chat list, replies and quotes show Sensitive message instead of the content |
blockKeepLevel | 1 | A disappearing message cannot be kept. Keep is dimmed; a tap shows blockedKeepMessage |
tapToViewLevel | 2 | The message is covered until tapped. Pictures are blurred; text is replaced by Sensitive message · Tap to view |
blockForwardLevel | 2 | Forward is dimmed; a tap shows blockedForwardMessage |
coverAgainLevel | 3 | A message the user uncovered is covered again the next time the chat opens. Below this level, it stays uncovered while the app runs |
blockCopyLevel | 3 | Copy is dimmed; a tap shows blockedCopyMessage |
blockScreenshotLevel | 3 | Android: 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:
| Setting | Default | Description |
|---|---|---|
coverSent | false | The user’s own sent messages are also covered at tapToViewLevel. Also set in the Customize screen |
title, tapToViewTitle | Sensitive message, Tap to view | The texts of the cover and of the previews |
blockedKeepMessage, blockedForwardMessage, blockedCopyMessage | This message can’t be kept, …forwarded, …copied | Shown on a tap on a dimmed action |
imageResource (Android), image (iOS) | built in | The 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.