Swap 2 error messages #279
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
I tried to set up the gcm and because the guide (http://docs.parseplatform.org/parse-server/guide/#configuring-your-clients-to-receive-push-notifications) is a bit outdated and it had wrong permissions. But when using them the error message would show that the error messages are from the other group of permissions. Swapping the names would solve the problem and would show the correct permissions where the problem occurred.
Atm:
bool hasApplicationPermission = hasPermissions( "android.permission.INTERNET", "android.permission.ACCESS_NETWORK_STATE", "android.permission.WAKE_LOCK", "android.permission.GET_ACCOUNTS", "com.google.android.c2dm.permission.RECEIVE", PackageName + ".permission.C2D_MESSAGE" );gets checked and
(hasApplicationPermission ? "" : MissingApplicationPermissionMessage)gives this output:
"<receiver android:name=\"parse.ParsePushBroadcastReceiver\" />.\n" + "android:permission=\"com.google.android.c2dm.permission.SEND\">\n" + " <intent-filter>\n" + " <action android:name=\"com.google.android.c2dm.intent.RECEIVE\" />\n" + " <action android:name=\"com.google.android.c2dm.intent.REGISTRATION\" />\n" + " <category android:name=\"" + PackageName + "\" />\n" + " </intent-filter>\n" + "</receiver>\n";which isn't what checked and other other way around for the other group.