Skip to content

Commit b015b34

Browse files
fix ci
1 parent eec27df commit b015b34

1 file changed

Lines changed: 6 additions & 6 deletions

File tree

lib/util.ts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -226,14 +226,14 @@ const RETURN_BUFFERS = true;
226226
export function SUBSCRIBE(
227227
subClient: any,
228228
channels: string[],
229-
listener: (payload: Uint8Array) => void
229+
listener: (payload: Buffer) => void
230230
) {
231231
if (isRedisV4Client(subClient)) {
232232
subClient.subscribe(channels, listener, RETURN_BUFFERS);
233233
} else {
234234
subClient.subscribe(channels);
235-
subClient.on("messageBuffer", (channel: string, payload: Uint8Array) => {
236-
if (channels.includes(channel)) {
235+
subClient.on("messageBuffer", (channel: Buffer, payload: Buffer) => {
236+
if (channels.includes(channel.toString())) {
237237
listener(payload);
238238
}
239239
});
@@ -243,14 +243,14 @@ export function SUBSCRIBE(
243243
export function SSUBSCRIBE(
244244
subClient: any,
245245
channels: string[],
246-
listener: (payload: Uint8Array) => void
246+
listener: (payload: Buffer) => void
247247
) {
248248
if (isRedisV4Client(subClient)) {
249249
subClient.sSubscribe(channels, listener, RETURN_BUFFERS);
250250
} else {
251251
subClient.ssubscribe(channels);
252-
subClient.on("smessageBuffer", (channel: string, payload: Uint8Array) => {
253-
if (channels.includes(channel)) {
252+
subClient.on("smessageBuffer", (channel: Buffer, payload: Buffer) => {
253+
if (channels.includes(channel.toString())) {
254254
listener(payload);
255255
}
256256
});

0 commit comments

Comments
 (0)