Different notifications for different domains

We have a Nextcloud 19.0.2 instance accessible from two domains with this config:

trusted_domains' =>
array (
    0 => 'cloud.example.de',
    1 => 'cloud.anotherexample.de',
  'overwrite.cli.url' => 'https://cloud.example.de',

When a user is getting a notification it always contain URLs with cloud.example.de. This is leading to problems if the users are using cloud.anotherexample.de for logging in and working, because the will be confused after clicking on the “wrong” URL.

Can this be solved without splitting the cloud to two installations?

Check-out the following thread which describes how a domain specific theming has been applied. I think you can try to use the same mechanism for your installation: