mirror of
https://github.com/Ocelot-Social-Community/Ocelot-Social.git
synced 2025-12-13 07:46:06 +00:00
sender user
This commit is contained in:
parent
b6fe28e1c4
commit
d75566a8ce
@ -32,8 +32,8 @@ export default {
|
|||||||
const session = context.driver.session()
|
const session = context.driver.session()
|
||||||
const readTxResultPromise = session.readTransaction(async (transaction) => {
|
const readTxResultPromise = session.readTransaction(async (transaction) => {
|
||||||
const unreadRoomsCypher = `
|
const unreadRoomsCypher = `
|
||||||
MATCH (:User { id: $currentUserId })-[:CHATS_IN]->(room:Room)<-[:INSIDE]-(message:Message)<-[:CREATED]-(user:User)
|
MATCH (:User { id: $currentUserId })-[:CHATS_IN]->(room:Room)<-[:INSIDE]-(message:Message)<-[:CREATED]-(sender:User)
|
||||||
WHERE NOT user.id = $currentUserId AND NOT message.seen
|
WHERE NOT sender.id = $currentUserId AND NOT message.seen
|
||||||
RETURN toString(COUNT(DISTINCT room)) AS count
|
RETURN toString(COUNT(DISTINCT room)) AS count
|
||||||
`
|
`
|
||||||
const unreadRoomsTxResponse = await transaction.run(unreadRoomsCypher, { currentUserId })
|
const unreadRoomsTxResponse = await transaction.run(unreadRoomsCypher, { currentUserId })
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user