messages: check permissions

This commit is contained in:
knst-kotov
2022-01-25 14:16:13 +03:00
parent 77759f620d
commit 92595e567c
2 changed files with 20 additions and 7 deletions

View File

@@ -64,9 +64,10 @@ enum MessageStatus {
DELETED
}
type MessageWithStatus {
status: MessageStatus!
message: Message!
type ChatUpdatedResult {
error: String
status: MessageStatus
message: Message
}
type CreateChatResult {
@@ -186,7 +187,7 @@ type Query {
############################################ Subscription
type Subscription {
chatUpdated(chatId: String!): MessageWithStatus!
chatUpdated(chatId: String!): ChatUpdatedResult!
onlineUpdated: [User!]!
shoutUpdated: Shout!
userUpdated: User!
@@ -259,7 +260,7 @@ type User {
}
type Message {
author: Int!
author: String!
chatRoom: Int!
body: String!
createdAt: DateTime!