Skip to content

add request logs for iOS:APNS and Android:FCM #562

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

Closed
wants to merge 10 commits into from

Conversation

keremoge
Copy link
Contributor

Apns and FCM Api logs added to see which requests are going to Apns And Fcm servers

@keremoge
Copy link
Contributor Author

Can you check this PR? @appleboy

@keremoge
Copy link
Contributor Author

I fixed lint errors

@keremoge
Copy link
Contributor Author

keremoge commented Jul 5, 2021

Can you check this PR? @appleboy

@appleboy

@@ -358,7 +359,15 @@ func GetIOSNotification(req PushNotification) *apns2.Notification {

notification.Payload = payload

return notification
jsonMarshall, err := json.Marshal(notification)
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maybe add a flag to enable or disable showing the debug message.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

good idea, I will check it out

@slimus
Copy link
Contributor

slimus commented Oct 26, 2021

Hi @keremoge! Could you explain please why we need to see apns\fcm message in logs? Is it still actual for you?

@keremoge
Copy link
Contributor Author

keremoge commented Oct 26, 2021

Hi @keremoge! Could you explain please why we need to see apns\fcm message in logs? Is it still actual for you?

Hi, because inn gorush you can track the log of gorush request but not the request going to Notification Servers.
If we can track these logs we can figure out if our notification request template is right.

  • request going gorush:
{
  "notifications": [
    {
      "platform": 1,
      "priority": "high",
      "tokens": [
        "**********4wAABp_BOYhKWWMLfSF9GV52UO_rYvBoKbQuuuI6HWSfLdG7_t-ZhA2_Zg47BpQbzBegmHUxovPTp3rU0xajPAfnz9IkOb**********"
      ],
      "content_available": true,
      "category": "CONFIRM",
      "sound": {
        "critical": 1,
        "name": "default",
        "volume": 1
      },
      "alert": {
        "body": "iOS UAT başarılı bildirim geldi"
      },
      "data": {
        "customerNo": 12345,
        "languageCode": "tr",
        "specificCharText": "denemee"
      }
    }
  ]
}
  • request going APNS: (We need this)
{
  "aps": {
    "alert": {
      "body": "iOS UAT başarılı bildirim geldi"
    },
    "category": "CONFIRM",
    "content-available": 1,
    "sound": {
      "critical": 1,
      "name": "default",
      "volume": 1
    }
  },
  "customerNo": 12345,
  "languageCode": "tr",
  "specificCharText": "denemee"
}

@slimus
Copy link
Contributor

slimus commented Oct 27, 2021

@keremoge makes sense! Thank you. Can you please update your PR? Now we have conflicts here

@keremoge
Copy link
Contributor Author

@keremoge makes sense! Thank you. Can you please update your PR? Now we have conflicts here

I resolved conflicts on vsCode but still has conflict warnings

@keremoge
Copy link
Contributor Author

Should I need to make new PR?

@slimus
Copy link
Contributor

slimus commented Oct 28, 2021

@keremoge I think so. Please close this PR and create a new one. Thank you!

@keremoge keremoge closed this Oct 29, 2021
@keremoge
Copy link
Contributor Author

reopened this PR as #639

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants