Skip to content

Commit 6d93598

Browse files
committed
remove state key
1 parent 3863f5b commit 6d93598

File tree

2 files changed

+6
-8
lines changed

2 files changed

+6
-8
lines changed

src/ClientWidgetApi.ts

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -667,7 +667,9 @@ export class ClientWidgetApi extends EventEmitter {
667667
request.data.delay ?? null,
668668
request.data.parent_delay_id ?? null,
669669
request.data.sticky_duration_ms,
670-
...params,
670+
request.data.type,
671+
content,
672+
request.data.room_id,
671673
);
672674
} else if (isDelayedEvent) {
673675
sendEventPromise = this.driver.sendDelayedEvent(
@@ -676,7 +678,9 @@ export class ClientWidgetApi extends EventEmitter {
676678
...params,
677679
);
678680
} else if (request.data.sticky_duration_ms) {
679-
sendEventPromise = this.driver.sendStickyEvent(request.data.sticky_duration_ms, ...params);
681+
sendEventPromise = this.driver.sendStickyEvent(request.data.sticky_duration_ms,
682+
request.data.type,
683+
content, request.data.room_id);
680684
} else {
681685
sendEventPromise = this.driver.sendEvent(...params);
682686
}

src/driver/WidgetDriver.ts

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -117,8 +117,6 @@ export abstract class WidgetDriver {
117117
* @param {number} stickyDurationMs The length of time a sticky event may remain sticky, in milliseconds.
118118
* @param {string} eventType The event type to be sent.
119119
* @param {*} content The content for the event.
120-
* @param {string|null} stateKey The state key if this is a state event, otherwise null.
121-
* May be an empty string.
122120
* @param {string|null} roomId The room ID to send the event to. If falsy, the room the
123121
* user is currently looking at.
124122
* @returns {Promise<ISendEventDetails>} Resolves when the event has been sent with
@@ -129,7 +127,6 @@ export abstract class WidgetDriver {
129127
stickyDurationMs: number,
130128
eventType: string,
131129
content: unknown,
132-
stateKey: string | null = null,
133130
roomId: string | null = null,
134131
): Promise<ISendEventDetails> {
135132
throw new Error("Method not implemented.");
@@ -177,8 +174,6 @@ export abstract class WidgetDriver {
177174
* or null if it will be put in a new group. May not be null if {@link delay} is null.
178175
* @param {string} eventType The event type to be sent.
179176
* @param {*} content The content for the event.
180-
* @param {string|null} stateKey The state key if this is a state event, otherwise null.
181-
* May be an empty string.
182177
* @param {string|null} roomId The room ID to send the event to. If falsy, the room the
183178
* user is currently looking at.
184179
* @returns {Promise<ISendDelayedEventDetails>} Resolves when the event has been sent with
@@ -191,7 +186,6 @@ export abstract class WidgetDriver {
191186
stickyDurationMs: number,
192187
eventType: string,
193188
content: unknown,
194-
stateKey: string | null = null,
195189
roomId: string | null = null,
196190
): Promise<ISendDelayedEventDetails> {
197191
throw new Error("Method not implemented.");

0 commit comments

Comments
 (0)