-
Notifications
You must be signed in to change notification settings - Fork 76
Conversation
<index> | ||
<name>mail_collected_addr_email_index</name> | ||
<field> | ||
<name>user_id</name> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this should be 'email'
5c86661
to
ee07ac2
Compare
} | ||
|
||
public function exists($userId, $email) { | ||
$sql = 'SELECT * FROM *PREFIX*mail_collected_addresses WHERE `user_id` = ? AND `email` = ?'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- use ILIKE here too
5bdbbd3
to
bc29b32
Compare
Dang it. Some test cases still fail |
42f58d9
to
f05a00f
Compare
This is weird:
It's only reproducible on php5.4 and I have no idea what might cause that exception. @DeepDiver1975 is there any difference between php5.4 and php5.6 in terms of owncloud dependency injection? |
I dropping 5.4 a option for us (i would say yes)? The news app dropped it and 5.4 is EOL. |
f05a00f
to
8638311
Compare
@@ -83,6 +87,7 @@ public function __construct(MailAccount $account) { | |||
$this->crypto = \OC::$server->getCrypto(); | |||
$this->config = \OC::$server->getConfig(); | |||
$this->memcacheFactory = \OC::$server->getMemcacheFactory(); | |||
$this->addressCollector = \OC::$server->query('OCA\Mail\Service\AutoCompletion\AddressCollector'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ChristophWurst this is the reason why this is falling apart.
In previous versions of owncloud you cannot query the server container for services which are located in an app ... let me fix that ...
b2fe19b
to
c6a8e67
Compare
ba1d248
to
2faacd9
Compare
@DeepDiver1975 thanks for fixing @owncloud/mail @ErikPel @jospoortvliet review please ;-) |
Nice @ChristophWurst, awesome on that functionality! :) Do Gmail and others also collect addresses of people you receive emails from? (As well as people in cc there.) And of course as you mention – saving the name would be cool, but for a follow-up PR. |
I know this is for another PR, but I'd love this to be synced with my CardDav as well so that when I write on mobile, the address is there as well. |
If we want to become an "official" app we have to support all platforms supported by core, see https://doc.owncloud.org/server/8.2/developer_manual/app/publishing.html#official |
@ChristophWurst Cool! Checked & Tested @enoch85 Would you open a issue? This PR will be closed. |
Adds all addresses of sent mails (to, cc, bcc) to a db table, so that those addresses can then be used for auto-completion.
This is a very simple implementation, it only saves the bare email address. Adding more information (label, recipient name) can be done in another PR as that might need some advanced update-logic.
We should also think about a way for users to delete one of those entries…
TODO:
implements #879
fixes #1254