feat: appendHashtag column
This commit is contained in:
parent
8507761272
commit
650af9c5ca
6 changed files with 36 additions and 2 deletions
|
@ -42,8 +42,12 @@ export const format = (user: IUser, count: Count): string => {
|
|||
...getDelta(user, count),
|
||||
};
|
||||
const template = user.template || defaultTemplate;
|
||||
return template.replace(variableRegex, (m, name) => {
|
||||
let result = template.replace(variableRegex, (m, name) => {
|
||||
const v = variables[name];
|
||||
return !v ? m : typeof v === 'function' ? v(score, user) : v;
|
||||
}) + '\n\n#misshaialert';
|
||||
});
|
||||
if (user.appendHashtag) {
|
||||
result = result + '\n\n#misshaialert'
|
||||
}
|
||||
return result;
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue