Skip to content

[WIP] Temp with queryDict refactor#5155

Draft
toger5 wants to merge 4 commits intodevelopfrom
toger5/sticky-with-refactor
Draft

[WIP] Temp with queryDict refactor#5155
toger5 wants to merge 4 commits intodevelopfrom
toger5/sticky-with-refactor

Conversation

@toger5
Copy link
Copy Markdown
Contributor

@toger5 toger5 commented Jan 20, 2026

Checklist

  • Tests written for new code (and old code if feasible).
  • New or updated public/exported symbols have accurate TSDoc documentation.
  • Linter and other CI checks pass.
  • Sign-off given on the changes (see CONTRIBUTING.md).

@toger5 toger5 requested a review from a team as a code owner January 20, 2026 18:07
@toger5 toger5 requested review from MidhunSureshR and t3chguy and removed request for a team January 20, 2026 18:07
Comment thread src/client.ts
Comment on lines -2761 to 2767
/**
* @param eventObject - An object with the partial structure of an event, to which event_id, user_id, room_id and origin_server_ts will be added.
* @param txnId - Optional.
* @returns Promise which resolves: to an empty object `{}`
* @returns Rejects: with an error response.
*/
private sendCompleteEvent(params: {
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Losing docs seems like a bad thing

Comment thread src/client.ts
Comment on lines 2761 to 2781
private sendCompleteEvent(params: {
roomId: string;
threadId: string | null;
eventObject: Partial<IEvent>;
queryDict?: QueryDict;
queryDict: SendDelayedEventRequestOpts;
txnId?: string;
}): Promise<SendDelayedEventResponse>;
private sendCompleteEvent(params: {
roomId: string;
threadId: string | null;
eventObject: Partial<IEvent>;
queryDict: QueryDict & SendDelayedEventRequestOpts;
txnId?: string;
}): Promise<SendDelayedEventResponse>;
private sendCompleteEvent(params: {
roomId: string;
threadId: string | null;
eventObject: Partial<IEvent>;
queryDict?: QueryDict | SendStickyEventRequestOpts;
txnId?: string;
}): Promise<ISendEventResponse>;
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This overload doesn't seem to add anything over the implementation signature?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This overload is only there to type the response.
I am not sure if there is a better way to do this in ts.

Based on a key existing in queryDict we either return
SendDelayedEventResponse or ISendEventResponse ({delayId: string} and {eventId: string} respectivly)

Any good idea on this would be gold!

@t3chguy
Copy link
Copy Markdown
Member

t3chguy commented Jan 20, 2026

Please make sure your review is ready for review (i.e has a changelog-worthy title) before marking it as ready. Some context in the PR description would be good too. As well as passing CI.

@toger5 toger5 marked this pull request as draft January 21, 2026 10:38
@toger5
Copy link
Copy Markdown
Contributor Author

toger5 commented Jan 21, 2026

Please make sure your review is ready for review

This was totally intended to be a draft. It is also not even against the develop branch. I am very sorry that I set its status to ready to review.

Base automatically changed from robin/sticky-embedded to develop January 22, 2026 16:26
@MidhunSureshR MidhunSureshR removed their request for review March 18, 2026 17:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants