Conversation
| * @memberof dc_context_t | ||
| * @param context The context object as returned from dc_context_new(). | ||
| * @param chat_id The ID of the chat for which to find similar chats. | ||
| * @return The list of similar chats. |
There was a problem hiding this comment.
Would be nice to have a short explanation of the algo / similarity metric here
There was a problem hiding this comment.
the get_similar_chat_ids function itself has some info, even if brief.
There was a problem hiding this comment.
The algorithm is not part of the API and may be completely changed in the future, API users should not assume anything about it.
There was a problem hiding this comment.
Maybe just mention here that the similarity is how much chats intersect in terms of their members? W/o any details about 42 days and so on. Personally i avoid to use things that i don't understand at all about how they work
|
|
||
| // Select up to five similar active chats. | ||
| let mut res = Vec::new(); | ||
| let now = time(); |
There was a problem hiding this comment.
I'd use our chat timestamp instead of the current time, otherwise this functionality isn't useful for old chats
There was a problem hiding this comment.
i think it was on purpose to use "now" as reference -- we don't keep track when membership changed so we can not get "similar chats" as seen from some historic point in time anyway.
There was a problem hiding this comment.
This is still useful for old chats: the functions returns active chats similar to the old chats.
There was a problem hiding this comment.
But if there are no such active chats, it will return nothing. It may be strange for a user that yesterday it found smth, but today doesn't. If we want active chats to have precedence over old ones, we can add that to the comparison function used for sorting
There was a problem hiding this comment.
Moreover, i'd say that looking for some old chats is what sometimes needed. New ones are at the top of the chatlist, but old ones are usually not so easy to find by hand
hpk42
left a comment
There was a problem hiding this comment.
thanks for adding this experimental function -- looking forward to using it once again.
The API should have an "experimental" marker for UI developers but otherwise lgtm.
db35db9 to
545283a
Compare
545283a to
efe01a5
Compare
efe01a5 to
b40843b
Compare
b40843b to
e6904bc
Compare
This is an experimental lightweight chat grouping function, not exactly a replacement for "communities" or "spaces".