Hi Stefan,
sorry for taking some more time for analyses! It's not really bug, if you do not to call the backend via rest, but use the client's userService instead.
Peter wrote this:
"Hi, please look at our example of Favorite Action in Client
Main difference is that we use userService... that way our components subscribe to all changes on this.userService.favorites$
constructor( private userService: UserService) {
}
run(selection: DmsObject[]) { selection.forEach(item => { const
{id, typeName, title}
= item; if (!item.isFavorite) { this.userService .createFavorite(id, typeName, title || id) .subscribe(() =>
{ this.eventService.trigger(EnaioEvent.DMS_OBJECT_FAVORITE_ON, id) }
, Utils.throw(null, this.translate.instant('eo.state.settings.presence.error.title'), this.translate.instant('eo.state.settings.presence.error.description') )); // todo: add proper error messages here } else { this.userService .removeFavoritesForTarget(id) .subscribe(() =>
{ this.eventService.trigger(EnaioEvent.DMS_OBJECT_FAVORITE_OFF, id) }
, Utils.throw(null, this.translate.instant('eo.state.settings.presence.error.title'), this.translate.instant('eo.state.settings.presence.error.description') )); // todo: add proper error messages here } }); } "
If you do need some more explanations we may take an appointment then.
Kind Regards,
Martin