mirror of
https://github.com/AsamK/signal-cli
synced 2025-09-02 04:20:38 +00:00
added timestamp in avatar filenames to support avatar timeline
This commit is contained in:
parent
15630356e1
commit
11a4918abe
1 changed files with 6 additions and 4 deletions
|
@ -74,17 +74,19 @@ public class AvatarStore {
|
|||
}
|
||||
|
||||
private File getGroupAvatarFile(GroupId groupId) {
|
||||
return new File(avatarsPath, "group-" + groupId.toBase64().replace("/", "_"));
|
||||
final var now = System.currentTimeMillis() / 1000L;
|
||||
return new File(avatarsPath, "group-" + groupId.toBase64().replace("/", "_") + "-" + now);
|
||||
}
|
||||
|
||||
private File getContactAvatarFile(RecipientAddress address) {
|
||||
return new File(avatarsPath, "contact-" + address.getLegacyIdentifier());
|
||||
final var now = System.currentTimeMillis() / 1000L;
|
||||
return new File(avatarsPath, "contact-" + address.getLegacyIdentifier() + "-" + now);
|
||||
}
|
||||
|
||||
private File getProfileAvatarFile(RecipientAddress address) {
|
||||
return new File(avatarsPath, "profile-" + address.getLegacyIdentifier());
|
||||
final var now = System.currentTimeMillis() / 1000L;
|
||||
return new File(avatarsPath, "profile-" + address.getLegacyIdentifier() + "-" + now);
|
||||
}
|
||||
|
||||
private void createAvatarsDir() throws IOException {
|
||||
IOUtils.createPrivateDirectories(avatarsPath);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue