mirror of
https://github.com/wassname/talk.git
synced 2026-08-15 12:55:10 +08:00
Adds user and message to flagaction to display in FE.
This commit is contained in:
@@ -1,9 +1,15 @@
|
||||
const FlagAction = {
|
||||
|
||||
// Stored in the metadata, extract and return.
|
||||
reason({metadata: {reason}}) {
|
||||
return reason;
|
||||
}
|
||||
message({metadata: {message}}) {
|
||||
return message;
|
||||
},
|
||||
reason({group_id}) {
|
||||
return group_id;
|
||||
},
|
||||
user({user_id}, _, {loaders: {Users}}) {
|
||||
return Users.getByID.load(user_id);
|
||||
},
|
||||
};
|
||||
|
||||
module.exports = FlagAction;
|
||||
|
||||
@@ -31,7 +31,7 @@ type User {
|
||||
username: String!
|
||||
|
||||
# Action summaries against the user.
|
||||
action_summaries: [FlagActionSummary]
|
||||
action_summaries: [ActionSummary]
|
||||
|
||||
# Actions completed on the parent.
|
||||
actions: [Action]
|
||||
|
||||
Reference in New Issue
Block a user