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

Nextcloud address book #1227

Open
wants to merge 17 commits into
base: master
Choose a base branch
from

Conversation

akhil1508
Copy link

@akhil1508 akhil1508 commented Aug 3, 2023

@akhil1508
Copy link
Author

akhil1508 commented Aug 3, 2023

@the-djmaze Perhaps we can have an option for admins like "Integrate nextcloud contacts fully"

  • If that option is ticked, we disable snappymail PDO contacts and suggestions
  • Along with that we disable the option in the right side menu

The UX will then be very similar to the attachments integration for nextcloud, where you can browse files in your cloud and attach them. Your contacts will be saved into your cloud and you can browse your contacts from your cloud app.

@cm-schl
Copy link

cm-schl commented Aug 4, 2023

Hi,
I'm very happy to see that you've intention to work on this as this would make SnappyMail a lot better when working together with Nextcloud 🙂.
I would be happy to help testing this - when you're at a good point just let me know.

@akhil1508
Copy link
Author

@the-djmaze What do you think about this change?

  • Suggestions come from the plugin for contact suggestions and are handled separately in the main-fabrica hook anyway so no changes there
  • Since IncFrec is the only function used to insert new contacts when an email is sent, I add logic only here to add/update into the cloud address book
  • I choose a uri 'webmail' by default; maybe in the future we can implement as an option for users the choice of address book to save too
  • To disable the contacts UI in snappymail, I add a new parameter called contactsExternal for frontend to understand if external provider or not and method called IsExternal for the address book to announce whether it is internal/external

@cm-schl

@akhil1508 akhil1508 changed the title Draft: Nextcloud address book Nextcloud address book Aug 31, 2023
@cm-schl
Copy link

cm-schl commented Aug 31, 2023

Hi,
sorry I tried to test you changes, but I don't get it to work on my test instance of Nextcloud. A question: what is the best way to get the changes to a working Nextcloud installation with SnappyMail installed? To patch the files manually seams wrong - there is surly a better way 🙂.

  • Disabling the default contacts UI seams ok to me, but somehow the administrator has to be informed about this in the Adminpanel -> Contacts. Otherwise we would create a situation where an Admin sets the flag to activate the contacts UI there and then the Nextcloud plugin overwrites this setting.

  • There should surly exist a option to let the user / admin choose where the contacts get saved. For example a company could use Thunderbird on their computers with for example the addon Cardbook. There you can choose an address book where new contacts should be saved. Therefore also SnappyMail in such a situation would have to use the same address book for this...

@the-djmaze
Copy link
Owner

I will come back later to this. 😉

@stepcellwolf
Copy link

I would love to have this as well. Any solution yet? Let me know if del is needed, testing, dev, anything.

@akhil1508
Copy link
Author

akhil1508 commented Sep 27, 2023

@stepcellwolf I do get back to you, got a bit busy in between.

I mostly need some dev to deal with the points raised by @cm-schl in #1227 (comment)

  • Mainly, let the admin know that this one overrides the main contacts UI and
  • Let the user choose the addressbook from the list of addressbooks in cloud

and ofc some testing..

@the-djmaze
Copy link
Owner

A good example of multiple address books is the people around you.
You ask a friend/colleague/etc. for someone his contact details, and they transfer the data to you and you put it in an address book.

Your phone only has "contacts" and you categorize them by any tag needed (family, friends, coworker, client, etc.)
The need for multiple address books is there, and there's not. Because some people are family & coworker or friend & client.

The biggest issue is GDPR where client data should not leave the building and yet, it is on your phone 😛

To support multiple address books, SnappyMail needs some big changes.
Currently i don't see the benefit vs all coding hours to get something nice.

Maybe someone already has a very bright idea?

@akhil1508
Copy link
Author

akhil1508 commented Oct 3, 2023

To support multiple address books, SnappyMail needs some big changes.
Currently i don't see the benefit vs all coding hours to get something nice.

@the-djmaze We can continue with a single address book but allow nextcloud admins to choose which one to activate(the SnappyMail one or full integration with nextcloud), wdyt?

I have already deployed a patched version if this PR to servers with a good amount of usage and this address book does over-ride the pdo address book of SnappyMail correctly.

@cm-schl
Copy link

cm-schl commented Oct 3, 2023

@the-djmaze We can continue with a single address book but allow nextcloud admins to choose which one to activate(the SnappyMail one or full integration with nextcloud), wdyt?

I too don't see it necessary to support multiple address books 👍.
Having the possibility to choose the destination of "collected addresses" would perfectly integrate into Nextcloud because there is also a automatically generated address book called "last contacted". As said for company use the option to choose the destination would be crucial when having different mail clients following the same logic (saving the new addresses into a specific address book).

Talking from a company perspective I would have to add something: for single users a simple dialog to choose the destination for new contacts would be enough. For an administrator it would be nice to have the possibility to preset this destination address book for all users.
Example: in Thunderbird you can preset this by MCD by a string like "https://<SERVER>/remote.php/dav/addressbooks/users/" + getenv("USERNAME") + "/<ADDRESS_BOOK_NAME>/".
It may be to much at the moment, but i definitely see a use case for larger installs 🙂. Maybe some provider would like to add SnappyMail to its Nextcloud for all users. Then a definition for a default destination would prevent to mess up the "normal" address book of the users with collected addresses...

Signed-off-by: Akhil <akhil@e.email>
@the-djmaze
Copy link
Owner

the-djmaze commented Feb 8, 2024

I just had an epiphany:

Address books like mailbox view.

Left side: all address books (hidden when only 1)
Middle: list of contacts inside the selected book
Right/bottom side: the selected contact (with edit mode active unless read-only)

Options:

  • Create contact in current address book
  • Delete contact from current address book
  • Drag/drop (copy) (multiple) contacts from address book to other (writable) address book
  • Select which address book is the default/main one

URI scope paths:

  • /#/contacts
  • /#/contacts/{address-book-name-uid}
  • /#/contacts/{address-book-name-uid}/{contact-name-uid}

(As /#/mailbox for mail and /#/settings for the settings)

Would that make this PR awesome?

@randolf
Copy link

randolf commented Feb 8, 2024

To support multiple address books, SnappyMail needs some big changes. Currently i don't see the benefit vs all coding hours to get something nice.

If so, then hopefully CardDAV will also be supported so that users of CardDAV servers (e.g., Radicale) can add automatic configuration options into the domain-specific configuration files (like we already do with SMTP and IMAP4 servers).

@the-djmaze
Copy link
Owner

the-djmaze commented Feb 9, 2024

@randolf it already (partially) supports that as seen with the Kolab plugin.
Kolab stores the vcards inside IMAP, see #385

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.

None yet

6 participants