fix(core): update
This commit is contained in:
parent
b5a6517756
commit
243f1a70e9
@ -28,7 +28,7 @@ export class ReactionRequest<T extends plugins.typedrequestInterfaces.ITypedRequ
|
|||||||
this.method = optionsArg.method;
|
this.method = optionsArg.method;
|
||||||
}
|
}
|
||||||
|
|
||||||
public async fire(channelsArg: Array<UniverseChannel | ClientUniverseChannel>, timeoutMillisArg=60000) {
|
public async fire(channelsArg: Array<UniverseChannel | ClientUniverseChannel>, requestDataArg: T['request'], timeoutMillisArg=60000) {
|
||||||
const subscriptionMap = new plugins.lik.Objectmap<plugins.smartrx.rxjs.Subscription>();
|
const subscriptionMap = new plugins.lik.Objectmap<plugins.smartrx.rxjs.Subscription>();
|
||||||
const reactionResult = new ReactionResult<T>();
|
const reactionResult = new ReactionResult<T>();
|
||||||
const requestId = plugins.smartunique.shortId();
|
const requestId = plugins.smartunique.shortId();
|
||||||
@ -42,6 +42,18 @@ export class ReactionRequest<T extends plugins.typedrequestInterfaces.ITypedRequ
|
|||||||
reactionResult.pushReactionResponse(payload.typedRequestPayload.response);
|
reactionResult.pushReactionResponse(payload.typedRequestPayload.response);
|
||||||
}
|
}
|
||||||
}));
|
}));
|
||||||
|
const payload: ICombinatorPayload<T> = {
|
||||||
|
id: requestId,
|
||||||
|
typedRequestPayload: {
|
||||||
|
method: this.method,
|
||||||
|
request: requestDataArg,
|
||||||
|
response: null
|
||||||
|
}
|
||||||
|
}
|
||||||
|
channel.sendMessage({
|
||||||
|
messageText: 'reactionRequest',
|
||||||
|
payload
|
||||||
|
});
|
||||||
}
|
}
|
||||||
plugins.smartdelay.delayFor(timeoutMillisArg).then(async () => {
|
plugins.smartdelay.delayFor(timeoutMillisArg).then(async () => {
|
||||||
await subscriptionMap.forEach(subscriptionArg => {
|
await subscriptionMap.forEach(subscriptionArg => {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user