contacts-cache: return most relevant contacts

Return in the contacts in *reverse* rank order, i.e. the most relevant come first.
This is useful since we only want the first maxnum contacts, and those should of
course be the most relevant.

Update mu cfind/server as well.

cfind
This commit is contained in:
Dirk-Jan C. Binnema
2022-05-09 21:17:03 +03:00
parent 80d84bf635
commit 81689f0af3
5 changed files with 53 additions and 49 deletions

View File

@ -296,6 +296,8 @@ config_options_group_cfind()
"whether to only get 'personal' contacts", NULL},
{"after", 0, 0, G_OPTION_ARG_INT, &MU_CONFIG.after,
"only get addresses last seen after T", "<timestamp>"},
{"maxnum", 'n', 0, G_OPTION_ARG_INT, &MU_CONFIG.maxnum,
"maximum number of contacts", "<number>"},
{NULL, 0, 0, G_OPTION_ARG_NONE, NULL, NULL, NULL}};
og = g_option_group_new("cfind", "Options for the 'cfind' command", "", NULL,