-
-
Notifications
You must be signed in to change notification settings - Fork 231
Add message deletion endpoint #740
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
Conversation
Many thanks for the contribution! I quickly scrolled through your PR and it looks good so far. I'll have a more detailed look on the weekend, when I have a bit more time :) |
Timestamp int64 `json:"target-timestamp"` | ||
} | ||
request := Request{} | ||
if !isGroup { |
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.
Thanks for the contribution and sorry for the late reply!
In general it looks really good, the only small suggestion I'd have is:
Instead of checking with strings.HasPrefix
whether it is a group, please use the newly introduced function getRecipientType
for that. The big advantage of that one is, that it not only checks if it is a phone number or a group, but also if it is a username.
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.
Thanks for the review. I've fixed it in de2cb04.
I checked that it still works both with usernames and with group ids.
Is there anything that I need to do to get the CI to pass? It looks like an error unrelated to any of the code changes that I've done.
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 think the CI failures are because the CI pipeline isn't properly configured to handle pull requests. Need to have a look at that one at some point. But for now, I'll just merge the changes.
Thanks!
This PR adds the end point to delete messages. I've tested this both in normal and in the json-rpc modes.
This closes #558