Save attachments in account-specific folders

This commit is contained in:
Quentin Hibon 2021-09-05 00:00:18 +02:00
parent 5a2e37a6e2
commit 3bd50dbaa2

View file

@ -172,7 +172,9 @@ public class Manager implements Closeable {
executor, executor,
sessionLock); sessionLock);
final var avatarStore = new AvatarStore(pathConfig.getAvatarsPath()); final var avatarStore = new AvatarStore(pathConfig.getAvatarsPath());
final var attachmentStore = new AttachmentStore(pathConfig.getAttachmentsPath()); final var attachmentStore = new AttachmentStore(new File(pathConfig.getAttachmentsPath(),
account.getUsername()));
final var stickerPackStore = new StickerPackStore(pathConfig.getStickerPacksPath()); final var stickerPackStore = new StickerPackStore(pathConfig.getStickerPacksPath());
this.attachmentHelper = new AttachmentHelper(dependencies, attachmentStore); this.attachmentHelper = new AttachmentHelper(dependencies, attachmentStore);