Skip to content
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

Return always json struct #1220

Merged
merged 1 commit into from
Sep 28, 2018
Merged

Return always json struct #1220

merged 1 commit into from
Sep 28, 2018

Conversation

cammellos
Copy link
Contributor

There seem to be a difference on how desktop and android/ios handles callbacks from status-go, whereby returning nil in desktop is cast to "" ,making the JSON parser complain about it.
It seems sensible to always return some JSON so the type is always the same.

@status-github-bot
Copy link

status-github-bot bot commented Sep 28, 2018

Pull Request Checklist

  • Have you updated the documentation, if impacted (e.g. docs.status.im)?

lib/library.go Outdated
@@ -106,7 +106,14 @@ func VerifyGroupMembershipSignatures(signaturePairsStr *C.char) *C.char {
return makeJSONResponse(err)
}

return nil
data, err := json.Marshal(struct {
Success bool
Copy link
Contributor

Choose a reason for hiding this comment

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

Success bool `json:"success"`

if you don't want it to be capitalized.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

yes,thanks !

@pedropombeiro pedropombeiro merged commit f3880f8 into develop Sep 28, 2018
@pedropombeiro pedropombeiro deleted the bug/return-json branch September 28, 2018 11:55
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