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
GitLab 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
Expand sidebar
Merged
Update notifications bot to allow multiple identities & devices
NationalTreasure/NotificationUpgrade
into
project/HavenBeta
Overview
7
Commits
17
Pipelines
0
Changes
33
Merged
Update notifications bot to allow multiple identities & devices
Jonah Husson
requested to merge
NationalTreasure/NotificationUpgrade
into
project/HavenBeta
Mar 22, 2023
Overview
7
Commits
17
Pipelines
0
Changes
33
0
0
Merge request reports
Compare
project/HavenBeta
version 12
a405238f
May 23, 2023
version 11
e143f33d
Mar 24, 2023
version 10
7203302f
Mar 24, 2023
version 9
336d8dca
Mar 24, 2023
version 8
3b67ac3e
Mar 24, 2023
version 7
635e38f5
Mar 24, 2023
version 6
385c7102
Mar 24, 2023
version 5
f57694d2
Mar 22, 2023
version 4
aace2ba2
Mar 22, 2023
version 3
7fadd15d
Mar 22, 2023
version 2
7fee50de
Mar 22, 2023
version 1
1698ccb6
Mar 22, 2023
project/HavenBeta (base)
and
latest version
latest version
a405238f
17 commits,
May 23, 2023
version 12
a405238f
17 commits,
May 23, 2023
version 11
e143f33d
11 commits,
Mar 24, 2023
version 10
7203302f
10 commits,
Mar 24, 2023
version 9
336d8dca
9 commits,
Mar 24, 2023
version 8
3b67ac3e
8 commits,
Mar 24, 2023
version 7
635e38f5
7 commits,
Mar 24, 2023
version 6
385c7102
6 commits,
Mar 24, 2023
version 5
f57694d2
5 commits,
Mar 22, 2023
version 4
aace2ba2
4 commits,
Mar 22, 2023
version 3
7fadd15d
3 commits,
Mar 22, 2023
version 2
7fee50de
2 commits,
Mar 22, 2023
version 1
1698ccb6
1 commit,
Mar 22, 2023
33 files
+
3984
−
1655
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
Files
33
cmd/root.go
+
30
−
1
View file @ a405238f
Edit in single-file editor
Open in Web IDE
Show full file
@@ -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