GNOME Bugzilla – Bug 710244
Improve contacts live search
Last modified: 2018-05-22 16:21:31 UTC
A couple of patches coming up to: • Fix spurious matches against display IDs for oFono personas (which are pseudo-random checksums and so we don’t want to match against them). • Add support for matching against folks’ NameDetails and PhoneDetails interfaces, so personas which don’t have aliases but do have full names can be matched against, and so matching against phone numbers is supported.
Created attachment 257403 [details] [review] live-search: Add tpaw_live_search_match_words_anywhere() method This does word-by-word searches against a haystack string which aren’t just prefix matches (in contrast to tpaw_live_search_match_words()). Matches may be anywhere in the haystack.
Created attachment 257404 [details] [review] libempathy-gtk: Only match Individual display IDs if they contain an ‘@’ Only the display IDs exposed by folks’ Telepathy backend are particularly useful for searching against. Other backends (such as the Ofono backend) unavoidably expose checksums as display IDs, which can cause confusing false positives in search results if matched against.
Created attachment 257405 [details] [review] libempathy-gtk: Add live search matching against full name, nick and phone This adds matching against properties from folks’ NameDetails and PhoneDetails interfaces. Since some folks backends don’t expose aliases for their personas, but do expose full and structured names, this improves match results against personas from such backends (e.g. the oFono backend). This also allows searching against phone numbers, although further work could be done to, for example, automatically handle international prefixes for matching.
I don't like the tpaw_live_search_match_words_anywhere(), it defeats the idea of the live search that match word prefix. I see you use that for matching phone numbers, but I think you should have special code in empathy_individual_match_string() for that case instead of using tpaw_live_search. Phone number matching is actually hard... you need to match things like "+32 (02) 123-45-67#89#", stripping spaces, dash, DTMF codes, etc... The good news is that I wrote that code for Nokia already. See http://cgit.collabora.com/git/user/xclaesse/extended-contacts-search.git/tree/src/ecs-match.c#n322 I uses e_normalize_phone_number() from our nokia branch of EDS that we did not upstream it seems, but code is there: https://vcs.maemo.org/svn/eds/trunk/evolution-data-server/addressbook/libebook-dbus/e-book-util.c
Looking for phone numbers will also fails on facebook/g+ jid because they are made of <numbers>@server.com, so we should have a way to not match them all if we want the phone lookup to be useful.
-- GitLab Migration Automatic Message -- This bug has been migrated to GNOME's GitLab instance and has been closed from further activity. You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.gnome.org/GNOME/empathy/issues/746.