aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMax Magorsch <arzano@gentoo.org>2020-06-19 17:45:02 +0200
committerMax Magorsch <arzano@gentoo.org>2020-06-19 17:45:02 +0200
commita9dff0fcb015c0173e253ae7c50cf490509040d2 (patch)
tree8ff9f75e14e403fe5dfa21d4bcc28858b90b8270 /pkg/importer/utils.go
parentAdd all public lists (diff)
downloadarchives-a9dff0fcb015c0173e253ae7c50cf490509040d2.tar.gz
archives-a9dff0fcb015c0173e253ae7c50cf490509040d2.tar.bz2
archives-a9dff0fcb015c0173e253ae7c50cf490509040d2.zip
Only import messages of public lists for now
Signed-off-by: Max Magorsch <arzano@gentoo.org>
Diffstat (limited to 'pkg/importer/utils.go')
-rw-r--r--pkg/importer/utils.go10
1 files changed, 10 insertions, 0 deletions
diff --git a/pkg/importer/utils.go b/pkg/importer/utils.go
index 5672577..c2d38fc 100644
--- a/pkg/importer/utils.go
+++ b/pkg/importer/utils.go
@@ -1,6 +1,7 @@
package importer
import (
+ "archives/pkg/config"
"archives/pkg/database"
"archives/pkg/models"
"fmt"
@@ -123,3 +124,12 @@ func insertMessage(message models.Message) error {
Insert()
return err
}
+
+func isPublicList(path string) bool {
+ for _, publicList := range config.AllPublicMailingLists(){
+ if strings.HasPrefix(path, config.MailDirPath() + "." + publicList + "/") {
+ return true
+ }
+ }
+ return false
+}