Hackathon: Post Reminders (#20555)
This PR adds the post reminder backend work. We add a new API endpoint via which a user can set a reminder for a post. An ephemeral message will be sent down the line to let the user know about the action. And then after the time is over, the system admin bot will send a DM message to the user about the reminder post.
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
e6459b97de
Коммит
20cb042362
@@ -221,10 +221,20 @@ func generateLayer(name, templateFile string) ([]byte, error) {
|
||||
if len(results) == 0 {
|
||||
return ""
|
||||
}
|
||||
if len(results) == 1 {
|
||||
return strings.Join(results, ", ")
|
||||
returns := []string{}
|
||||
for _, result := range results {
|
||||
switch result {
|
||||
case "*PostReminderMetadata":
|
||||
returns = append(returns, fmt.Sprintf("*store.%s", strings.TrimPrefix(result, "*")))
|
||||
default:
|
||||
returns = append(returns, result)
|
||||
}
|
||||
}
|
||||
return fmt.Sprintf("(%s)", strings.Join(results, ", "))
|
||||
|
||||
if len(returns) == 1 {
|
||||
return strings.Join(returns, ", ")
|
||||
}
|
||||
return fmt.Sprintf("(%s)", strings.Join(returns, ", "))
|
||||
},
|
||||
"genResultsVars": func(results []string, withNilError bool) string {
|
||||
vars := []string{}
|
||||
|
||||
Ссылка в новой задаче
Block a user