Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[WIP] Split ContactsCollection mailet #1308

Draft
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

HoussemNasri
Copy link
Member

Closes #1257

TODO

  • Add more integration tests
  • In James-project: fix com.fasterxml.jackson.databind.exc.InvalidDefinitionException: Cannot construct instance of org.apache.james.transport.mailets.ContactExtractor$ExtractedContacts
  • Write documentation for the mailet
  • Delete ContactsCollection leftovers (code, doc, tests, etc...)

Comment on lines +120 to +121
NO_REGISTRATION_KEYS)
).collectList()
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
NO_REGISTRATION_KEYS)
).collectList()
NO_REGISTRATION_KEYS))
.collectList()

.map(AttributeValue::value)
.map(Throwing.function(this::parseUserContacts))
.flatMap(Throwing.function(this::dispatchContactsAddedEvent))
.onErrorMap(e -> new MailetException("Failed to index contacts", new Exception(e)))
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We are not on a critical feature, so we should WARN on error and avoid propagating the exception

@@ -0,0 +1,128 @@
package com.linagora.tmail.mailets;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shall we remove the old class?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Split ContactsCollection
2 participants