mirror of
https://github.com/Ocelot-Social-Community/Ocelot-Social.git
synced 2025-12-13 07:46:06 +00:00
Merge branch 'master' of github.com:Ocelot-Social-Community/Ocelot-Social into fix-code-in-editor-component
This commit is contained in:
commit
d57e3aa0f3
@ -25,8 +25,8 @@ export default {
|
||||
chatMessageAdded: {
|
||||
subscribe: withFilter(
|
||||
() => pubsub.asyncIterator(CHAT_MESSAGE_ADDED),
|
||||
(payload, variables) => {
|
||||
return payload.userId === variables.userId
|
||||
(payload, variables, context) => {
|
||||
return payload.userId === context.user?.id
|
||||
},
|
||||
),
|
||||
},
|
||||
|
||||
@ -7,8 +7,8 @@ export default {
|
||||
notificationAdded: {
|
||||
subscribe: withFilter(
|
||||
() => pubsub.asyncIterator(NOTIFICATION_ADDED),
|
||||
(payload, variables) => {
|
||||
return payload.notificationAdded.to.id === variables.userId
|
||||
(payload, variables, context) => {
|
||||
return payload.notificationAdded.to.id === context.user?.id
|
||||
},
|
||||
),
|
||||
},
|
||||
|
||||
@ -20,8 +20,8 @@ export default {
|
||||
roomCountUpdated: {
|
||||
subscribe: withFilter(
|
||||
() => pubsub.asyncIterator(ROOM_COUNT_UPDATED),
|
||||
(payload, variables) => {
|
||||
return payload.userId === variables.userId
|
||||
(payload, variables, context) => {
|
||||
return payload.userId === context.user?.id
|
||||
},
|
||||
),
|
||||
},
|
||||
|
||||
@ -46,5 +46,5 @@ type Query {
|
||||
}
|
||||
|
||||
type Subscription {
|
||||
chatMessageAdded(userId: ID!): Message
|
||||
chatMessageAdded: Message
|
||||
}
|
||||
|
||||
@ -38,5 +38,5 @@ type Mutation {
|
||||
}
|
||||
|
||||
type Subscription {
|
||||
notificationAdded(userId: ID!): NOTIFIED
|
||||
notificationAdded: NOTIFIED
|
||||
}
|
||||
|
||||
@ -58,5 +58,5 @@ type Query {
|
||||
}
|
||||
|
||||
type Subscription {
|
||||
roomCountUpdated(userId: ID!): Int
|
||||
roomCountUpdated: Int
|
||||
}
|
||||
|
||||
@ -31,4 +31,7 @@
|
||||
chatMessageTimestamp: $chat-message-timestamp;
|
||||
chatMessageCheckmarkSeen: $chat-message-checkmark-seen;
|
||||
chatMessageCheckmark: $chat-message-checkmark;
|
||||
|
||||
chatRoomBackgroundCounterBadge: $chat-room-background-counter-badge;
|
||||
chatRoomColorCounterBadge: $chat-room-color-counter-badge;
|
||||
}
|
||||
@ -420,3 +420,5 @@ $chat-new-message-color: $color-secondary-active;
|
||||
$chat-message-timestamp: $text-color-soft;
|
||||
$chat-message-checkmark-seen: $text-color-secondary;
|
||||
$chat-message-checkmark: $text-color-soft;
|
||||
$chat-room-color-counter-badge: $text-color-inverse;
|
||||
$chat-room-background-counter-badge: $color-secondary;
|
||||
|
||||
@ -181,9 +181,6 @@ export default {
|
||||
// Subscriptions
|
||||
const observer = this.$apollo.subscribe({
|
||||
query: chatMessageAdded(),
|
||||
variables: {
|
||||
userId: this.currentUser.id,
|
||||
},
|
||||
})
|
||||
|
||||
observer.subscribe({
|
||||
|
||||
@ -44,11 +44,6 @@ export default {
|
||||
},
|
||||
subscribeToMore: {
|
||||
document: roomCountUpdated(),
|
||||
variables() {
|
||||
return {
|
||||
userId: this.user.id,
|
||||
}
|
||||
},
|
||||
updateQuery: (previousResult, { subscriptionData }) => {
|
||||
return { UnreadRooms: subscriptionData.data.roomCountUpdated }
|
||||
},
|
||||
|
||||
@ -137,11 +137,6 @@ export default {
|
||||
},
|
||||
subscribeToMore: {
|
||||
document: notificationAdded(),
|
||||
variables() {
|
||||
return {
|
||||
userId: this.user.id,
|
||||
}
|
||||
},
|
||||
updateQuery: (previousResult, { subscriptionData }) => {
|
||||
const {
|
||||
data: { notificationAdded: newNotification },
|
||||
|
||||
@ -109,8 +109,8 @@ const STYLE = {
|
||||
colorTimestamp: '#a2aeb8',
|
||||
colorStateOnline: '#4caf50',
|
||||
colorStateOffline: '#9ca6af',
|
||||
backgroundCounterBadge: '#0696c7',
|
||||
colorCounterBadge: '#fff',
|
||||
backgroundCounterBadge: styleData.chatRoomBackgroundCounterBadge,
|
||||
colorCounterBadge: styleData.chatRoomColorCounterBadge,
|
||||
},
|
||||
|
||||
emoji: {
|
||||
|
||||
@ -54,8 +54,8 @@ export const messageQuery = () => {
|
||||
|
||||
export const chatMessageAdded = () => {
|
||||
return gql`
|
||||
subscription chatMessageAdded($userId: ID!) {
|
||||
chatMessageAdded(userId: $userId) {
|
||||
subscription chatMessageAdded {
|
||||
chatMessageAdded {
|
||||
_id
|
||||
id
|
||||
indexId
|
||||
|
||||
@ -66,8 +66,8 @@ export const unreadRoomsQuery = () => {
|
||||
|
||||
export const roomCountUpdated = () => {
|
||||
return gql`
|
||||
subscription roomCountUpdated($userId: ID!) {
|
||||
roomCountUpdated(userId: $userId)
|
||||
subscription roomCountUpdated {
|
||||
roomCountUpdated
|
||||
}
|
||||
`
|
||||
}
|
||||
|
||||
@ -245,8 +245,8 @@ export const notificationAdded = () => {
|
||||
${postFragment}
|
||||
${groupFragment}
|
||||
|
||||
subscription notifications($userId: ID!) {
|
||||
notificationAdded(userId: $userId) {
|
||||
subscription notifications {
|
||||
notificationAdded {
|
||||
id
|
||||
read
|
||||
reason
|
||||
|
||||
@ -902,7 +902,7 @@
|
||||
"Tag": "Hashtag ::: Hashtags",
|
||||
"User": "Nutzer ::: Nutzer"
|
||||
},
|
||||
"hint": "Wonach suchst Du? Nutze !… für Beiträge, @… für Mitglieder, &… für Gruppen, #… für Hashtags",
|
||||
"hint": "!... sucht Beiträge, @... sucht Nutzer, &... sucht Gruppen, #… sucht Hashtags",
|
||||
"no-results": "Keine Ergebnisse für \"{search}\" gefunden. Versuch' es mit einem anderen Begriff!",
|
||||
"page": "Seite",
|
||||
"placeholder": "Suchen",
|
||||
|
||||
@ -902,7 +902,7 @@
|
||||
"Tag": "Hashtag ::: Hashtags",
|
||||
"User": "User ::: Users"
|
||||
},
|
||||
"hint": "What are you searching for? Use !… for posts, @… for users, &… for groups, #… for hashtags.",
|
||||
"hint": "!... searches posts, @... searches users, &... searches groups, #… searches hashtags",
|
||||
"no-results": "No results found for \"{search}\". Try a different search term!",
|
||||
"page": "Page",
|
||||
"placeholder": "Search",
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user