mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-07-19 17:51:29 +00:00
Fix parsing
This commit is contained in:
parent
07dc55194b
commit
ad0e48ac21
@ -232,13 +232,13 @@ func telegramMediaActionFromApiAction(_ action: Api.MessageAction) -> TelegramMe
|
||||
let status: TelegramMediaActionType.SuggestedPostApprovalStatus
|
||||
if (flags & (1 << 0)) != 0 {
|
||||
let reason: TelegramMediaActionType.SuggestedPostApprovalStatus.RejectionReason
|
||||
if (flags & (1 << 0)) != 1 {
|
||||
if (flags & (1 << 1)) != 0 {
|
||||
reason = .lowBalance(balanceNeeded: starsAmount ?? 0)
|
||||
} else {
|
||||
reason = .generic
|
||||
}
|
||||
status = .rejected(reason: reason, comment: rejectComment)
|
||||
} else if (flags & (1 << 0)) != 1 {
|
||||
} else if (flags & (1 << 1)) != 0 {
|
||||
status = .rejected(reason: .lowBalance(balanceNeeded: starsAmount ?? 0), comment: nil)
|
||||
} else {
|
||||
status = .approved(timestamp: scheduleDate, amount: starsAmount ?? 0)
|
||||
|
Loading…
x
Reference in New Issue
Block a user