Skip to content

Commit

Permalink
feat: add configuration for multiple inbox folders
Browse files Browse the repository at this point in the history
  • Loading branch information
nicopico-dev committed Oct 3, 2024
1 parent 9b85289 commit 54f2f97
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion deploy/application.properties
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ n2rss.email.client.host=${N2RSS_EMAIL_HOST}
n2rss.email.client.port=${N2RSS_EMAIL_PORT:993}
n2rss.email.client.username=${N2RSS_EMAIL_USERNAME}
n2rss.email.client.password=${N2RSS_EMAIL_PASSWORD}
n2rss.email.client.inbox-folder=${N2RSS_EMAIL_INBOX_FOLDER:inbox}
n2rss.email.client.inbox-folders=${N2RSS_EMAIL_INBOX_FOLDERS:inbox}
n2rss.maintenance.secret-key=${N2RSS_SECRET_KEY}
n2rss.feeds.force-https=true
n2rss.feeds.disabled-newsletters=${N2RSS_DISABLED_NEWSLETTERS}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ class N2RssConfiguration {

private const val DEFAULT_PORT = 993
private const val DEFAULT_PROTOCOL = "imaps"
private const val DEFAULT_INBOX_FOLDER = "inbox"
private val DEFAULT_INBOX_FOLDERS = listOf("INBOX", "SPAM")

@ConfigurationProperties(prefix = "n2rss")
data class N2RssProperties
Expand Down Expand Up @@ -86,7 +86,7 @@ constructor(
val password: String,
val port: Int = DEFAULT_PORT,
val protocol: String = DEFAULT_PROTOCOL,
val inboxFolder: String = DEFAULT_INBOX_FOLDER,
val inboxFolders: List<String> = DEFAULT_INBOX_FOLDERS,
)
data class AnalyticsProperties(
val enabled: Boolean = true,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ class EmailConfiguration {
port = config.port,
user = config.username,
password = config.password,
folders = listOf(config.inboxFolder),
folders = config.inboxFolders,
)
}

Expand Down
2 changes: 1 addition & 1 deletion src/main/resources/application.properties
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ n2rss.email.client.host=${N2RSS_EMAIL_HOST}
n2rss.email.client.port=${N2RSS_EMAIL_PORT:993}
n2rss.email.client.username=${N2RSS_EMAIL_USERNAME}
n2rss.email.client.password=${N2RSS_EMAIL_PASSWORD}
n2rss.email.client.inbox-folder=${N2RSS_EMAIL_INBOX_FOLDER:inbox}
n2rss.email.client.inbox-folders=${N2RSS_EMAIL_INBOX_FOLDERS:inbox}

n2rss.maintenance.secret-key=abcd
n2rss.feeds.force-https=false
Expand Down

0 comments on commit 54f2f97

Please sign in to comment.