mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-20 05:16:07 +00:00
create direct message
This commit is contained in:
@@ -241,7 +241,7 @@ export class SignalRConnection {
|
||||
}
|
||||
|
||||
|
||||
sendData(input: ISignalRInput): Promise<Result<any, any>> {
|
||||
sendData<T>(input: ISignalRInput): Promise<Result<T, any>> {
|
||||
return new Promise((resolve, reject) => {
|
||||
|
||||
if(this.connectionStateSubject.value == true) {
|
||||
@@ -249,10 +249,10 @@ export class SignalRConnection {
|
||||
this.hubConnection.invoke(input.method, input.data)
|
||||
|
||||
this.sendDataSubject.pipe(
|
||||
filter((message: any) => input.data.requestId == message?.requestId),
|
||||
filter((message) => input.data.requestId == message?.data.requestId),
|
||||
first()
|
||||
).subscribe(value => {
|
||||
resolve(ok(value))
|
||||
resolve(ok(value.data as unknown as T))
|
||||
console.log('Received valid value:', value);
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user