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
Commits
2b20059d
Commit
2b20059d
authored
May 12, 2021
by
Jonah Husson
Browse files
Options
Downloads
Patches
Plain Diff
format change
parent
5dff4878
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
firebase/fcm.go
+9
-3
9 additions, 3 deletions
firebase/fcm.go
with
9 additions
and
3 deletions
firebase/fcm.go
+
9
−
3
View file @
2b20059d
...
...
@@ -11,6 +11,7 @@ import (
"github.com/pkg/errors"
"gitlab.com/elixxir/comms/mixmessages"
"testing"
"time"
"golang.org/x/net/context"
...
...
@@ -74,11 +75,16 @@ func SetupMessagingApp(serviceKeyPath string) (*messaging.Client, error) {
// returns string, error (string is of dubious use, but is returned for the time being)
func
sendNotification
(
app
FBSender
,
token
string
,
data
*
mixmessages
.
NotificationData
)
(
string
,
error
)
{
ctx
:=
context
.
Background
()
ttl
:=
6
*
time
.
Hour
message
:=
&
messaging
.
Message
{
Android
:
&
messaging
.
AndroidConfig
{
Priority
:
"high"
,
TTL
:
&
ttl
,
Data
:
map
[
string
]
string
{
"messagehash"
:
base64
.
StdEncoding
.
EncodeToString
(
data
.
MessageHash
),
"identityfingerprint"
:
base64
.
StdEncoding
.
EncodeToString
(
data
.
IdentityFP
),
},
},
APNS
:
&
messaging
.
APNSConfig
{
// APNS is apple's native notification service, this is ios specific config
Payload
:
&
messaging
.
APNSPayload
{
Aps
:
&
messaging
.
Aps
{
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment