mirror of
https://github.com/wassname/talk.git
synced 2026-07-02 09:05:13 +08:00
19 lines
358 B
JavaScript
19 lines
358 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;
|