Improve filename building for Group DMs #141
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
If a DM group has no official name contained in the archive data, the filename is constructed from the handles of the most active users in the group. In groups with mostly inactive users (i.e. users who have sent 0 messages to the group in the archived time interval), this did not work correctly before, because inactive users were not counted for the name construction.
If the handles of the more active users could not be found, then the filename would just have been made from the group's id instead of including handles of inactive users.
For more human-readable filenames, IDs are not useful. So now the inactive users' handles are used as a fallback if there are not enough known handles of active users.