Updated flows tree
This commit is contained in:
parent
e11acda672
commit
e96f301350
|
|
@ -189,7 +189,15 @@ func (n *Notifier) NotifyInitiatorApproved(
|
|||
|
||||
ctx := context.Background()
|
||||
|
||||
card := n.topic.FormatApproverMessage(initiator, collected)
|
||||
initiatorCollected := make(map[string]string, len(collected))
|
||||
for k, v := range collected {
|
||||
if k == "instructions" {
|
||||
continue
|
||||
}
|
||||
initiatorCollected[k] = v
|
||||
}
|
||||
|
||||
card := n.topic.FormatApproverMessage(initiator, initiatorCollected)
|
||||
|
||||
text := fmt.Sprintf(
|
||||
"✅ <b>Заявка #%d согласована</b>\n"+
|
||||
|
|
@ -229,11 +237,15 @@ func (n *Notifier) NotifyInitiatorRejected(
|
|||
approverName = *approver.FullName
|
||||
}
|
||||
|
||||
content := collected["content"]
|
||||
if content == "" {
|
||||
content = "—"
|
||||
initiatorCollected := make(map[string]string, len(collected))
|
||||
for k, v := range collected {
|
||||
if k == "instructions" {
|
||||
continue
|
||||
}
|
||||
initiatorCollected[k] = v
|
||||
}
|
||||
card := n.topic.FormatApproverMessage(initiator, collected)
|
||||
|
||||
card := n.topic.FormatApproverMessage(initiator, initiatorCollected)
|
||||
|
||||
text := fmt.Sprintf(
|
||||
"❌ <b>Заявка #%d отклонена</b>\n\n"+
|
||||
|
|
|
|||
|
|
@ -244,6 +244,14 @@ func (h *Handler) finalizeAndSubmit(bot *tgbotapi.BotAPI, ctx context.Context, c
|
|||
logrus.Errorf("finalizeAndSubmit: GetUserByTelegramIDDB err=%v", err)
|
||||
}
|
||||
|
||||
initiatorCollected := make(map[string]string, len(flowState.Collected))
|
||||
for k, v := range flowState.Collected {
|
||||
if k == "instructions" {
|
||||
continue
|
||||
}
|
||||
initiatorCollected[k] = v
|
||||
}
|
||||
|
||||
var card string
|
||||
if topic != nil {
|
||||
card = topic.FormatApproverMessage(initiator, flowState.Collected)
|
||||
|
|
|
|||
Loading…
Reference in New Issue