mirror of
https://github.com/wassname/talk.git
synced 2026-06-30 02:56:56 +08:00
20 lines
347 B
JavaScript
20 lines
347 B
JavaScript
const FlagAction = {
|
|
|
|
// Stored in the metadata, extract and return.
|
|
message({metadata: {message}}) {
|
|
return message;
|
|
},
|
|
reason({group_id}) {
|
|
return group_id;
|
|
},
|
|
user({user_id}, _, {loaders: {Users}}) {
|
|
if (!user_id) {
|
|
return null;
|
|
}
|
|
|
|
return Users.getByID.load(user_id);
|
|
},
|
|
};
|
|
|
|
module.exports = FlagAction;
|