Do not delete messages if $delete = false.

| Q             | A
| ------------- | ---
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | ---
| Fixed tickets | ---
| License       | MIT
| Doc PR        | ---

Replaces #1077.