@@ -427,7 +427,7 @@ class Model{
430− static func createAndPublish(body: [Attachments], tags: [String]){
430+ static func createAndPublish(body: [Attachments], tags: [String], completion: @escaping ((ResultR)->())){
431 let jsonUpd = CreatedPost(body: body, tags: tags)
431 let jsonUpd = CreatedPost(body: body, tags: tags)
432 var request = URLRequest(url: postsPublishURL)
432 var request = URLRequest(url: postsPublishURL)
@@ -445,6 +445,14 @@ class Model{
445 if let code = response.response?.statusCode, code == 498 {
445 if let code = response.response?.statusCode, code == 498 {
449+ if let code = response.response?.statusCode,
450+ let result = ResultR(rawValue: code)
454+ completion(.internalServerError)
@@ -1048,7 +1056,7 @@ class Model{
1051− static func sendMessage(message: SendMessage, completion: @escaping (()->())){
1059+ static func sendMessage(message: SendMessage, completion: @escaping ((ResultR)->())){
1053 var request = URLRequest(url: messagesSendURL)
1061 var request = URLRequest(url: messagesSendURL)
1054 request.setValue("application/json; charset=utf-8", forHTTPHeaderField: "Content-Type")
1062 request.setValue("application/json; charset=utf-8", forHTTPHeaderField: "Content-Type")
@@ -1062,7 +1070,11 @@ class Model{
1073+ if let result = ResultR(rawValue: response.response!.statusCode){
1065− completion()
1076+ completion(.internalServerError)