1
0
mirror of synced 2024-11-22 12:26:02 +03:00

fix problem with empty lines

This commit is contained in:
DmitryZagorulko 2018-09-25 10:48:25 +03:00
parent a9c04bcfcf
commit fd546a060c

View File

@ -728,14 +728,12 @@ func getOrderMessage(dataOrder *v1.MessageDataOrder) string {
} }
} }
if dataOrder.Delivery != nil { if dataOrder.Delivery.Name != "" {
if dataOrder.Delivery.Name != "" { mb += fmt.Sprintf(
mb += fmt.Sprintf( "\n*%s:*\n%s",
"\n*%s:*\n%s", getLocalizedMessage("delivery"),
getLocalizedMessage("delivery"), dataOrder.Delivery.Name,
dataOrder.Delivery.Name, )
)
}
if dataOrder.Delivery.Amount != nil { if dataOrder.Delivery.Amount != nil {
if val, ok := currency[strings.ToLower(dataOrder.Delivery.Amount.Currency)]; ok && dataOrder.Delivery.Amount.Value != 0 { if val, ok := currency[strings.ToLower(dataOrder.Delivery.Amount.Currency)]; ok && dataOrder.Delivery.Amount.Value != 0 {