Browse Source

allow incoming KaleidoscopeEvent to specify create date

Allow the specification of the KaleidoscopeEvent creation date/time.
This allows Sites and Venue to emit their recent history to a Core when
connecting to populate the Core with their content upon arrival.
pull/2/head
Rob Colbert 2 years ago
parent
commit
1112715e04
  1. 8
      app/services/hive.js

8
app/services/hive.js

@ -206,8 +206,16 @@ class HiveService extends SiteService {
throw new SiteError(406, 'Missing source emitter href');
}
/*
* Create the KaleidoscopeEvent document
*/
const event = new KaleidoscopeEvent();
if (eventDefinition.created) {
event.created = new Date(eventDefinition.created);
} else {
event.created = NOW;
}
if (eventDefinition.recipientType && eventDefinition.recipient) {
event.recipientType = eventDefinition.recipientType;

Loading…
Cancel
Save