-
Notifications
You must be signed in to change notification settings - Fork 7
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
Add message field to quote model #14
base: master
Are you sure you want to change the base?
Conversation
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.
Suggestion inline.
The quoted message | ||
|
||
This should always be provided if a message ID is specified, unless the | ||
app cannot find the message in its database. |
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.
Suggest to add:
This MUST NOT be a message containing a quote!
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.
As long as quotes aren't resolved recursively, there should be little harm in doing so. I think it's better if Threema Web is written in a robust way that can handle this, versus having to trust that the app doesn't have any validation bug.
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.
I disagree. It is not allowed to have a quote within a quote. Furthermore, a MUST does not make validation redundant. On the contrary, it makes the reader aware of it.
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.
I also think the recursive resolving is a very easy mistake to make.
Also, have you checked for side effects? This model is being used throughout a couple of other messages and I'm not sure it makes a lot of sense in all of them. |
What type of side effects would you expect? All new fields are optional, so the protocol change itself will not break anything, unless it's explicitly handled. You're right though that creating a quote and retrieving a quote could use separate types ( |
@lgrahl I added some additional notes regarding validation. |
The message needs to be embedded, since the webclient might not have received that message yet.