Skip to content
Snippets Groups Projects
Commit d47c9e47 authored by Dariusz Rybicki's avatar Dariusz Rybicki
Browse files

Add Report model

parent 86fa1b84
No related branches found
No related tags found
3 merge requests!71Releasing v1.1.5 (214),!69Implemented filtering for banned/blocked users and reporting,!67v1.1.5 b(203)
import Foundation
public struct Report: Encodable {
public init(
sender: ReportUser,
recipient: ReportUser,
type: ReportType,
screenshot: Data
) {
self.sender = sender
self.recipient = recipient
self.type = type
self.screenshot = screenshot
}
public var sender: ReportUser
public var recipient: ReportUser
public var type: ReportType
public var screenshot: Data
}
extension Report {
public struct ReportUser: Encodable {
public init(
userId: String,
username: String
) {
self.userId = userId
self.username = username
}
public var userId: String
public var username: String
}
}
extension Report {
public enum ReportType: String, Encodable {
case dm
case group
case channel
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment