Skip to content

Commit

Permalink
use SentryId instead of String
Browse files Browse the repository at this point in the history
  • Loading branch information
armcknight committed Feb 20, 2025
1 parent c0c3421 commit b4f5b1b
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions Sources/Swift/Integrations/UserFeedback/SentryFeedback.swift
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,12 @@ class SentryFeedback: NSObject {
var attachments: [Data]?

/// The event id that this feedback is associated with, like a crash report.
var associatedEventId: String?
var associatedEventId: SentryId?

/// - parameters:
/// - associatedEventId The ID for an event you'd like associated with the feedback.
/// - attachments Data objects for any attachments. Currently the web UI only supports showing one attached image, like for a screenshot.
@objc init(message: String, name: String?, email: String?, source: SentryFeedbackSource = .widget, associatedEventId: String? = nil, attachments: [Data]? = nil) {
@objc init(message: String, name: String?, email: String?, source: SentryFeedbackSource = .widget, associatedEventId: SentryId? = nil, attachments: [Data]? = nil) {

Check warning on line 33 in Sources/Swift/Integrations/UserFeedback/SentryFeedback.swift

View check run for this annotation

Codecov / codecov/patch

Sources/Swift/Integrations/UserFeedback/SentryFeedback.swift#L33

Added line #L33 was not covered by tests
self.eventId = SentryId()
self.name = name
self.email = email
Expand All @@ -54,7 +54,7 @@ extension SentryFeedback: SentrySerializable {
dict["contact_email"] = email
}
if let associatedEventId = associatedEventId {
dict["associated_event_id"] = associatedEventId
dict["associated_event_id"] = associatedEventId.sentryIdString

Check warning on line 57 in Sources/Swift/Integrations/UserFeedback/SentryFeedback.swift

View check run for this annotation

Codecov / codecov/patch

Sources/Swift/Integrations/UserFeedback/SentryFeedback.swift#L57

Added line #L57 was not covered by tests
}
dict["source"] = source.rawValue

Expand Down

0 comments on commit b4f5b1b

Please sign in to comment.