Open
Conversation
- Message.Text can not be filled, as described in the FIXME comment (schemas/schemas.go). This is critical to fix! - Packets other than Message are not currently supported, as I was not able to figure out how to make that work with Go's type system. This would be a nice feature to have, though, so custom commands could potentially return other packets (for example, triggering a ban after a custom warning or something.) - util/jsonapi.go was changed to allow for the standard placement of JSON-API tags (e.g. "attr,foo" instead of "foo,attr"). Is this an issue, @RPiAwesomeness? - createdAt and id are not being populated, but I suspect this has simply not been completed yet.
2Cubed
commented
Aug 19, 2017
schemas/schemas.go
Outdated
| ) | ||
|
|
||
| type Message struct { | ||
| Text []Component `json:"text"` // FIXME: Anything besides [] breaks this. It is assumed that this is due to the interface being used for Component. |
Member
Author
There was a problem hiding this comment.
@RPiAwesomeness This is critical to fix before merging; we obviously need to be able to PATCH new commands! Any ideas?
| default: // Ignore any other tags | ||
| } | ||
| // Need to set the keys w/ their names here if it's a struct | ||
| switch split[0] { |
Member
Author
There was a problem hiding this comment.
@RPiAwesomeness Will this change have any negative side effects?
| Role int `jsonapi:"role,attr" validate:"gte=0,lte=256"` | ||
| Target string `jsonapi:"target,attr"` | ||
| User string `jsonapi:"user,attr"` | ||
| ID string `json:"id" validate:"-"` |
Member
Author
There was a problem hiding this comment.
None of these fields seem to be automatically populated. (Instead, it looks like they're just "made up" later on.) I'm assuming this is still WIP?
Not ready for production; see HACK/FIXME/TODO comments.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
(schemas/schemas.go). This is critical to fix!
able to figure out how to make that work with Go's type system. This
would be a nice feature to have, though, so custom commands could
potentially return other packets (for example, triggering a ban after a
custom warning or something.)
JSON-API tags (e.g. "attr,foo" instead of "foo,attr"). Is this an issue,
@RPiAwesomeness?
simply not been completed yet.