WARNING: THIS SITE IS A MIRROR OF GITHUB.COM / IT CANNOT LOGIN OR REGISTER ACCOUNTS / THE CONTENTS ARE PROVIDED AS-IS / THIS SITE ASSUMES NO RESPONSIBILITY FOR ANY DISPLAYED CONTENT OR LINKS / IF YOU FOUND SOMETHING MAY NOT GOOD FOR EVERYONE, CONTACT ADMIN AT ilovescratch@foxmail.com
Skip to content

Commit a245ef4

Browse files
authored
fix(xreadgroup): dont parse number props (#3133)
Initially, there was a bug in the server where the two additional props were returned as string instead of number. This should now be fixed in the GA, so no need to parse to Number anymore.
1 parent ff91ece commit a245ef4

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

packages/client/lib/commands/generic-transformers.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -522,17 +522,17 @@ export type StreamMessageRawReply = TuplesReply<[
522522
export type StreamMessageReply = {
523523
id: BlobStringReply,
524524
message: MapReply<BlobStringReply | string, BlobStringReply>,
525-
millisElapsedFromDelivery?: number
526-
deliveriesCounter?: number
525+
millisElapsedFromDelivery?: NumberReply
526+
deliveriesCounter?: NumberReply
527527
};
528528

529529
export function transformStreamMessageReply(typeMapping: TypeMapping | undefined, reply: StreamMessageRawReply): StreamMessageReply {
530530
const [ id, message, millisElapsedFromDelivery, deliveriesCounter ] = reply as unknown as UnwrapReply<typeof reply>;
531531
return {
532532
id: id,
533533
message: transformTuplesReply(message, undefined, typeMapping),
534-
...(millisElapsedFromDelivery !== undefined ? { millisElapsedFromDelivery: Number(millisElapsedFromDelivery) } : {}),
535-
...(deliveriesCounter !== undefined ? { deliveriesCounter: Number(deliveriesCounter) } : {})
534+
...(millisElapsedFromDelivery !== undefined ? { millisElapsedFromDelivery } : {}),
535+
...(deliveriesCounter !== undefined ? { deliveriesCounter } : {})
536536
};
537537
}
538538

0 commit comments

Comments
 (0)