-
Notifications
You must be signed in to change notification settings - Fork 14
Johnpooch/migrate fcm #200
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
…iguring environment variables
…update FCM configuration in Docker Compose
…ity-configuration
| @@ -1,5 +1,5 @@ | |||
| # Start with a base image containing golang runtime | |||
| FROM golang:1.20 | |||
| FROM golang:1.23 | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@zond do you anticipate any problems with upgrading to go 1.23? It is required for the new FCM package, or some of its dependencies.
| } | ||
|
|
||
| func infoToUser(ui *oauth2service.Userinfoplus) *User { | ||
| func infoToUser(ui *oauth2service.Userinfo) *User { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I had to change this to get the service to start. I suspect it comes from some indirect dependency which was upgraded and the original type no longer exists?
| sleep 20 && | ||
| curl -XPOST http://diplicity-application:8080/_configure | ||
| -d '{\"OAuth\": { \"ClientID\": \"${OAUTH_CLIENT_ID}\", \"Secret\": \"${OAUTH_SECRET}\" }, \"FCMConf\": { \"ServerKey\": \"${FCM_SERVER_KEY}\" }}' | ||
| " |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a helper container that comes up and sends the values from .env to the service. Saves having to do it manually every time. There's a few values missing like SendGrid, but I'll add them as I go
| log.Errorf(ctx, "Unable to encode FCM data payload %v: %v; fix NewFCMData", msgContext.fcmData, err) | ||
| return err | ||
| } | ||
|
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've gotten rid of the data payload in notifications for now. I understand that they are used to power the click action on the client side.
I'm not convinced that it is the best approach, I'm going to re-implement the click actions later, and hopefully in a way that is a little more straight-forward. I was struggling a lot with the encoding and decoding of data. Felt like client knew too much about what was being sent to it. I reckon there's an easier way.
No description provided.