-
-
Notifications
You must be signed in to change notification settings - Fork 611
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
Make local echo work for threads #2026
Conversation
src/client.ts
Outdated
): Promise<ISendEventResponse> { | ||
return this.sendCompleteEvent(roomId, { type: eventType, content }, txnId, callback); | ||
if (!threadId?.startsWith("$") && threadId !== null) { |
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'm really not a fan of string matching these things - can we pass an object of some kind for instanceof
checks instead? The types will be a lot easier to work with.
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.
They could be, but the reason why I opted out from that was to keep it simple to send an event.
Not requiring a developer to instanciate 5 different models before they can even send something
The way the app is architectured too, the composer is not really aware of the Thread
model either, but is aware of a relation to attach to all event it emits out.
I decided to go with that solution to keep the door open to more changes in the future and not tie down the composer to the current model of threads
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! This is a lot more comfortable feeling :)
Related to element-hq/element-web#19616
This PR currently has no changelog labels, so will not be included in changelogs.
Add one of:
T-Deprecation
,T-Enhancement
,T-Defect
,T-Task
to indicate what type of change this is plusX-Breaking-Change
if it's a breaking change.