Skip to content

Commit bac69c4

Browse files
committed
(feature): Add correct multi-topic matching
Signed-off-by: SeeuSim <[email protected]>
1 parent 4847c90 commit bac69c4

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

backend/matching/src/lib/utils/decode-pool-ticket.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,11 @@ export const decodePoolTicket = (ticket: IStreamMessage) => {
99
userId,
1010
socketPort,
1111
timestamp,
12-
topic,
12+
topic: topic
13+
? typeof topic === 'string'
14+
? topic.split(',').join('|') // For OR match as opposed to AND in sequence
15+
: topic.join('|')
16+
: undefined,
1317
difficulty,
1418
};
1519
};

0 commit comments

Comments
 (0)