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
feat(ThreadChannel): add fetchStarterMessage #6488
Conversation
13b7dfd
to
8a9519f
Compare
After thinking about this for a while I opted by adding a method instead to be more in line with the direction the library has been going in recently. The getter was unreliable as it got the message from cache so this just simply fetches it. |
When can this method return |
Good point, will update |
Co-authored-by: Vlad Frangu <kingdgrizzle@gmail.com>
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 guess it has to be nullable as I tried deleting the starter message in a thread
@PuneetGopinath refer to monbrey’s comment: #6488 (comment) |
Ohk. |
Nor should it be there, because fetch will either resolve to a Message, or throw. Nullish-coallescing is not correct in any sense. |
Please describe the changes this PR makes and why it should be merged:
This PR adds a method to ThreadChannels called fetchStarterMessage that fetches the message that started the thread when this exists. I didn't find any better way to tell if a thread channel was started by a message or not so this just fetches the message with the same ID as the channel from the parent channel.
Status and versioning classification: