-
Notifications
You must be signed in to change notification settings - Fork 8
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
[BE2] Added RumorStateAns to possible values of response #1889
Conversation
Pull reviewers statsStats of the last 30 days for popstellar:
|
Quality Gate passed for 'PoP - PoPCHA-Web-Client'Issues Measures |
Quality Gate passed for 'PoP - Be2-Scala'Issues Measures |
Quality Gate passed for 'PoP - Be1-Go'Issues Measures |
Quality Gate passed for 'PoP - Fe1-Web'Issues Measures |
Quality Gate passed for 'PoP - Fe2-Android'Issues Measures |
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.
Went quickly over it, looks good to me
Pending on #1877
Added the possibility to have a list of rumors in the response. Some refactoring was needed because Scala do not see two List[A] and List[B] as different types. For that I added a new sealed trait ResultTypes that represents all possible ResultTypes. With this structure it is more manageable for future additions is more intuitive with a ResultObject having only one result and not one result for each possible type. ResultEmptyList is a "dirtyfix". It is necessary because for jsonRPC coming in, if list is empty it is impossible to differentiate a List[Rumor] or List[Message]. ResultEmptyList is a handled in a way that it returns a emptyList for both List[Rumor] and List[Message]. Such behaviour si not a real problem because there using jsonRPC id should avoid any conflict.