@@ -4631,7 +4631,6 @@ export class MatrixClient extends TypedEventEmitter<EmittedEvents, ClientEventHa
46314631 }
46324632
46334633 /**
4634- * TODO: update docstring for overloads
46354634 * @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.
46364635 * @param txnId - Optional.
46374636 * @returns Promise which resolves: to an empty object `{}`
@@ -4643,6 +4642,14 @@ export class MatrixClient extends TypedEventEmitter<EmittedEvents, ClientEventHa
46434642 eventObject : Partial < IEvent > ,
46444643 txnId ?: string ,
46454644 ) : Promise < ISendEventResponse > ;
4645+ /**
4646+ * Sends the event as a future (MSC4140).
4647+ * @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.
4648+ * @param futureOpts - Properties of the future to send for this event.
4649+ * @param txnId - Optional.
4650+ * @returns Promise which resolves: to an empty object `{}`
4651+ * @returns Rejects: with an error response.
4652+ */
46464653 private sendCompleteEvent < F extends ISendFutureRequestOpts > (
46474654 roomId : string ,
46484655 threadId : string | null ,
@@ -4730,11 +4737,16 @@ export class MatrixClient extends TypedEventEmitter<EmittedEvents, ClientEventHa
47304737 }
47314738
47324739 /**
4733- * TODO: update docstring for overloads
47344740 * encrypts the event if necessary; adds the event to the queue, or sends it; marks the event as sent/unsent
47354741 * @returns returns a promise which resolves with the result of the send request
47364742 */
47374743 protected async encryptAndSendEvent ( room : Room | null , event : MatrixEvent ) : Promise < ISendEventResponse > ;
4744+ /**
4745+ * Simply sends a future without encrypting it.
4746+ * TODO: Allow encrypted futures, and encrypt them properly
4747+ * @param futureOpts - Properties of the future to send for this event.
4748+ * @returns returns a promise which resolves with the result of the future send request
4749+ */
47384750 protected async encryptAndSendEvent < F extends ISendFutureRequestOpts > (
47394751 room : Room | null ,
47404752 event : MatrixEvent ,
@@ -4745,7 +4757,6 @@ export class MatrixClient extends TypedEventEmitter<EmittedEvents, ClientEventHa
47454757 event : MatrixEvent ,
47464758 futureOpts ?: F ,
47474759 ) : Promise < ISendEventResponse | ISendFutureResponse < F > > {
4748- // TODO: Allow encrypted futures, and encrypt them properly
47494760 if ( futureOpts ) {
47504761 return this . sendEventHttpRequest ( event , futureOpts ) ;
47514762 }
0 commit comments