diff --git a/EveningReading/Shared/ViewModels/MessageViewModel.swift b/EveningReading/Shared/ViewModels/MessageViewModel.swift index 8e04d4d..df490ef 100644 --- a/EveningReading/Shared/ViewModels/MessageViewModel.swift +++ b/EveningReading/Shared/ViewModels/MessageViewModel.swift @@ -315,7 +315,12 @@ class MessageViewModel: ObservableObject { } public func getComplaintText(author: String, postId: Int) -> String { + if postId == 0 { + let encodedAuthor = author.addingPercentEncoding(withAllowedCharacters: .urlHostAllowed) ?? author + return "I would like to report posts by user '\(author)' https://www.shacknews.com/user/\(encodedAuthor)/posts for not adhering to the Shacknews guidelines." + } else { return "I would like to report user '\(author)', author of post https://www.shacknews.com/chatty?id=" + String(postId) + "#item_" + String(postId) + " for not adhering to the Shacknews guidelines." + } } public func submitComplaint(author: String, postId: Int) {