Skip to content

Commit 1e3a821

Browse files
committed
fix: get user from socket or data
1 parent 0ddfeca commit 1e3a821

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -233,7 +233,7 @@
233233

234234
async function checkMethodOperators(data, key, value) {
235235
if (value === 'this.userId' && data.socket)
236-
value = data.socket.user_id
236+
value = data.socket.user_id || data.user_id
237237

238238
// TODO: support our standard query system
239239
let keys = key.split('.')

0 commit comments

Comments
 (0)