Skip to content

Commit

Permalink
Insert a note to the support ticket to indicate logs are attached (#2477
Browse files Browse the repository at this point in the history
)
  • Loading branch information
SergioEstevao authored Nov 25, 2024
2 parents 72b3771 + c0e30c4 commit 735a65d
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion podcasts/Zendesk/MessageSupportViewModel.swift
Original file line number Diff line number Diff line change
Expand Up @@ -142,10 +142,16 @@ class MessageSupportViewModel: ObservableObject {
if containsWatch && customFields.first(where: { $0.value.contains(FileLog.noWearableLogsAvailable) }) != nil && !ignoreUnavailableWatchLogs {
return Fail(error: MessageSupportFailure.watchLogMissing).eraseToAnyPublisher()
} else {
let hasLogs = customFields.contains(where: { $0.id == SupportCustomField.debugLog.rawValue && !$0.value.hasSuffix("User opted out")})
var extraText = ""
if hasLogs {
extraText = "\n\nNote: Logs Attached"
}

let requestObject = ZDSupportRequest(subject: self.config.subject,
name: self.requesterName,
email: self.requesterEmail,
comment: self.comment,
comment: self.comment + extraText,
customFields: customFields,
tags: self.config.tags)

Expand Down

0 comments on commit 735a65d

Please sign in to comment.