working implementation of journal display
Signed-off-by: Stephan Richter <s.richter@srsoftware.de>
This commit is contained in:
@@ -172,8 +172,12 @@ public class MessageSystem extends BaseHandler implements PostBox, EventListener
|
||||
|
||||
@Override
|
||||
public void onEvent(Event<?> event) {
|
||||
var message = new TranslatableMessage(event.initiator(),event.subject(),event.describe(),null);
|
||||
var audience = new HashSet<>(event.audience());
|
||||
var description = event.describe(true);
|
||||
var payload = event.payload();
|
||||
var location = t("You can view/edit this {object} at {base_url}/{path}", OBJECT,t(payload.getClass().getSimpleName()), PATH,payload.path());
|
||||
var body = t("{description}\n\n{location}", DESCRIPTION,description, LOCATION,location);
|
||||
var message = new TranslatableMessage(event.initiator(),event.subject(),body,null);
|
||||
var audience = new HashSet<>(event.audience());
|
||||
audience.remove(event.initiator());
|
||||
send(new Envelope<>(0,message,audience));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user