Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions EveningReading/Shared/ViewModels/MessageViewModel.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down