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
|
let status: TelegramMediaActionType.SuggestedPostApprovalStatus
|
||||||
if (flags & (1 << 0)) != 0 {
|
if (flags & (1 << 0)) != 0 {
|
||||||
let reason: TelegramMediaActionType.SuggestedPostApprovalStatus.RejectionReason
|
let reason: TelegramMediaActionType.SuggestedPostApprovalStatus.RejectionReason
|
||||||
if (flags & (1 << 0)) != 1 {
|
if (flags & (1 << 1)) != 0 {
|
||||||
reason = .lowBalance(balanceNeeded: starsAmount ?? 0)
|
reason = .lowBalance(balanceNeeded: starsAmount ?? 0)
|
||||||
} else {
|
} else {
|
||||||
reason = .generic
|
reason = .generic
|
||||||
}
|
}
|
||||||
status = .rejected(reason: reason, comment: rejectComment)
|
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)
|
status = .rejected(reason: .lowBalance(balanceNeeded: starsAmount ?? 0), comment: nil)
|
||||||
} else {
|
} else {
|
||||||
status = .approved(timestamp: scheduleDate, amount: starsAmount ?? 0)
|
status = .approved(timestamp: scheduleDate, amount: starsAmount ?? 0)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user