Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
notifications-bot
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Package registry
Model registry
Operate
Terraform modules
Analyze
Contributor analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
archives
notifications-bot
Merge requests
!36
Update notifications bot to allow multiple identities & devices
Code
Review changes
Check out branch
Download
Patches
Plain diff
Merged
Update notifications bot to allow multiple identities & devices
NationalTreasure/NotificationUpgrade
into
project/HavenBeta
Overview
7
Commits
17
Pipelines
0
Changes
33
Merged
Jonah Husson
requested to merge
NationalTreasure/NotificationUpgrade
into
project/HavenBeta
2 years ago
Overview
7
Commits
17
Pipelines
0
Changes
33
Expand
0
0
Merge request reports
Compare
project/HavenBeta
version 12
a405238f
2 years ago
version 11
e143f33d
2 years ago
version 10
7203302f
2 years ago
version 9
336d8dca
2 years ago
version 8
3b67ac3e
2 years ago
version 7
635e38f5
2 years ago
version 6
385c7102
2 years ago
version 5
f57694d2
2 years ago
version 4
aace2ba2
2 years ago
version 3
7fadd15d
2 years ago
version 2
7fee50de
2 years ago
version 1
1698ccb6
2 years ago
project/HavenBeta (base)
and
latest version
latest version
a405238f
17 commits,
2 years ago
version 12
a405238f
17 commits,
2 years ago
version 11
e143f33d
11 commits,
2 years ago
version 10
7203302f
10 commits,
2 years ago
version 9
336d8dca
9 commits,
2 years ago
version 8
3b67ac3e
8 commits,
2 years ago
version 7
635e38f5
7 commits,
2 years ago
version 6
385c7102
6 commits,
2 years ago
version 5
f57694d2
5 commits,
2 years ago
version 4
aace2ba2
4 commits,
2 years ago
version 3
7fadd15d
3 commits,
2 years ago
version 2
7fee50de
2 commits,
2 years ago
version 1
1698ccb6
1 commit,
2 years ago
33 files
+
3984
−
1655
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
Files
33
Search (e.g. *.vue) (Ctrl+P)
cmd/root.go
+
30
−
1
Options
@@ -16,6 +16,7 @@ import (
"github.com/spf13/viper"
"gitlab.com/elixxir/comms/mixmessages"
"gitlab.com/elixxir/notifications-bot/notifications"
"gitlab.com/elixxir/notifications-bot/notifications/providers"
"gitlab.com/elixxir/notifications-bot/storage"
"gitlab.com/xx_network/comms/connect"
"gitlab.com/xx_network/primitives/id"
@@ -66,10 +67,28 @@ var rootCmd = &cobra.Command{
jww
.
FATAL
.
Panicf
(
"Unable to expand credentials path: %+v"
,
err
)
}
havenFbCreds
,
err
:=
utils
.
ExpandPath
(
viper
.
GetString
(
"havenFirebaseCredentialsPath"
))
if
err
!=
nil
{
jww
.
FATAL
.
Panicf
(
"Unable to expand haven credentials path: %+v"
,
err
)
}
apnsKeyPath
,
err
:=
utils
.
ExpandPath
(
viper
.
GetString
(
"apnsKeyPath"
))
if
err
!=
nil
{
jww
.
FATAL
.
Panicf
(
"Unable to expand apns key path: %+v"
,
err
)
}
havenApnsKeyPath
,
err
:=
utils
.
ExpandPath
(
viper
.
GetString
(
"havenApnsKeyPath"
))
if
err
!=
nil
{
jww
.
FATAL
.
Panicf
(
"Unable to expand apns key path: %+v"
,
err
)
}
httpsCertPath
,
err
:=
utils
.
ExpandPath
(
viper
.
GetString
(
"httpsCert"
))
if
err
!=
nil
{
jww
.
FATAL
.
Panicf
(
"Unable to expand https key path: %+v"
,
err
)
}
httpsKeyPath
,
err
:=
utils
.
ExpandPath
(
viper
.
GetString
(
"httpsKey"
))
if
err
!=
nil
{
jww
.
FATAL
.
Panicf
(
"Unable to expand https cert path: %+v"
,
err
)
}
viper
.
SetDefault
(
"notificationRate"
,
30
)
viper
.
SetDefault
(
"notificationsPerBatch"
,
20
)
// This is set to approx. 90% of the stated limit (4096)
@@ -83,13 +102,23 @@ var rootCmd = &cobra.Command{
NotificationRate
:
viper
.
GetInt
(
"notificationRate"
),
NotificationsPerBatch
:
viper
.
GetInt
(
"notificationsPerBatch"
),
MaxNotificationPayload
:
viper
.
GetInt
(
"maxNotificationPayload"
),
APNS
:
notification
s
.
APNSParams
{
APNS
:
provider
s
.
APNSParams
{
KeyPath
:
apnsKeyPath
,
KeyID
:
viper
.
GetString
(
"apnsKeyID"
),
Issuer
:
viper
.
GetString
(
"apnsIssuer"
),
BundleID
:
viper
.
GetString
(
"apnsBundleID"
),
Dev
:
viper
.
GetBool
(
"apnsDev"
),
},
HavenAPNS
:
providers
.
APNSParams
{
KeyPath
:
havenApnsKeyPath
,
KeyID
:
"havenApnsKeyID"
,
Issuer
:
"havenApnsIssuer"
,
BundleID
:
"havenApnsBundleID"
,
Dev
:
viper
.
GetBool
(
"havenApnsDev"
),
},
HavenFBCreds
:
havenFbCreds
,
HttpsCertPath
:
httpsCertPath
,
HttpsKeyPath
:
httpsKeyPath
,
}
rawAddr
:=
viper
.
GetString
(
"dbAddress"
)
Loading