feat: contacts import ocs#61277
Conversation
Signed-off-by: SebastianKrupinski <krupinskis05@gmail.com>
9e175b9 to
7553769
Compare
|
|
||
| use JsonSerializable; | ||
|
|
||
| interface ImportEvent extends JsonSerializable { |
There was a problem hiding this comment.
What value does this interface add of it has no methods?
There was a problem hiding this comment.
This is a common type for ImportCountEvent and ImportObjectEvent, its used to stream events all the way to the UI while processing.
There was a problem hiding this comment.
Got it. For simplicity, could you just use JsonSerializable in the few areas you use ImportEvent right now?
There was a problem hiding this comment.
Hmm, I think I would prefer the current way to make it more clear what's being expected from a readability standpoint 🤔
There was a problem hiding this comment.
This PR has to be backported. Can we keep it simple?
There was a problem hiding this comment.
You can add the YAGNI abstraction to master. But for the backportable bit let's skip it
There was a problem hiding this comment.
This PR has to be backported. Can we keep it simple?
Ahh, yeah, I didn't had that in mind. So, I'll agree with you 😄
| } | ||
| return match ($options->getFormat()) { | ||
| 'vcf' => $this->importProcess($source, $addressBook, $options, $this->importText(...)), | ||
| 'jcf' => $this->importProcess($source, $addressBook, $options, $this->importJson(...)), |
There was a problem hiding this comment.
Json and Xml aren't implemented (I've tested that, instant crash). So, maybe makes sense to remove for now?
|
There are still some issues 🤔 The Call to undefined method OCA\\ContactsInteraction\\AddressBook::getResourceId()Memory exhaustedAnd the following warning is being thrown sometimes at the end of the import: Header already modified |
Summary
Checklist
3. to review, feature component)stable32)AI (if applicable)