Hi @danielgrigore Daniel I am not sure if you read these old posts[1].
We implemented incoming event interception via EventAddHandler. We intercept it in beforeAdd. The wveint is successfully intercepted - we can see it in log. But when we try to update the description of event - it does not change. Why? Or is this successfully changed in the server, but just not synced to the client?
public boolean handleCalendarEvent(CollectionItem collection, ContentItem item) {
// Get event
EventStamp eventStamp = StampUtils.getEventStamp(item);
VEvent masterEvent = eventStamp.getMasterEvent();
if (isValidManagementEvent(masterEvent)) {
boolean success = processEvent(masterEvent);
if (success) {
// TODO
item.addStamp(eventStamp);
}
return success;
} else {
return false;
}
}
private boolean processEvent(VEvent event) {
// Based on the event's SUMMARY, process the management command
String summary = event.getSummary().getValue().trim();
switch (summary) {
case COMMAND:
// Process sharing read permissions
LOG.info("Processing event");
java.util.Calendar calendar = java.util.Calendar.getInstance();
SimpleDateFormat format = new SimpleDateFormat("dd-MM-yyyy HH:mm:ss");
try {
event.getProperty(Property.DESCRIPTION).setValue("======= update (" + format.format(calendar.getTime()) + ") =======");
} catch (Exception e) {
LOG.error(e.toString());
return false;
}
break;
Hi @danielgrigore Daniel I am not sure if you read these old posts[1].
We implemented incoming event interception via EventAddHandler. We intercept it in beforeAdd. The wveint is successfully intercepted - we can see it in log. But when we try to update the description of event - it does not change. Why? Or is this successfully changed in the server, but just not synced to the client?
[1] https://github.com/mam-dev/cosmo/issues/84