@@ -240,7 +240,6 @@ extension WebAPI {
240
240
public func sendMessage(
241
241
channel: String ,
242
242
text: String ,
243
- escapeCharacters: Bool = true ,
244
243
username: String ? = nil ,
245
244
asUser: Bool ? = nil ,
246
245
parse: ParseMode ? = nil ,
@@ -256,7 +255,7 @@ extension WebAPI {
256
255
let parameters : [ String : Any ? ] = [
257
256
" token " : token,
258
257
" channel " : channel,
259
- " text " : escapeCharacters ? text . slackFormatEscaping : text,
258
+ " text " : text,
260
259
" as_user " : asUser,
261
260
" parse " : parse? . rawValue,
262
261
" link_names " : linkNames,
@@ -278,7 +277,6 @@ extension WebAPI {
278
277
channel: String ,
279
278
thread: String ,
280
279
text: String ,
281
- escapeCharacters: Bool = true ,
282
280
broadcastReply: Bool = false ,
283
281
username: String ? = nil ,
284
282
asUser: Bool ? = nil ,
@@ -296,7 +294,7 @@ extension WebAPI {
296
294
" token " : token,
297
295
" channel " : channel,
298
296
" thread_ts " : thread,
299
- " text " : escapeCharacters ? text . slackFormatEscaping : text,
297
+ " text " : text,
300
298
" broadcastReply " : broadcastReply,
301
299
" as_user " : asUser,
302
300
" parse " : parse? . rawValue,
@@ -318,11 +316,10 @@ extension WebAPI {
318
316
public func sendMeMessage(
319
317
channel: String ,
320
318
text: String ,
321
- escapeCharacters: Bool = true ,
322
319
success: ( ( ( ts: String ? , channel: String ? ) ) -> Void ) ? ,
323
320
failure: FailureClosure ?
324
321
) {
325
- let parameters : [ String : Any ? ] = [ " token " : token, " channel " : channel, " text " : escapeCharacters ? text . slackFormatEscaping : text]
322
+ let parameters : [ String : Any ? ] = [ " token " : token, " channel " : channel, " text " : text]
326
323
networkInterface. request ( . chatMeMessage, parameters: parameters, successClosure: { ( response) in
327
324
success ? ( ( ts: response [ " ts " ] as? String , response [ " channel " ] as? String ) )
328
325
} ) { ( error) in
@@ -337,15 +334,14 @@ extension WebAPI {
337
334
attachments: [ Attachment ? ] ? = nil ,
338
335
parse: ParseMode = . none,
339
336
linkNames: Bool = false ,
340
- escapeCharacters: Bool = true ,
341
337
success: SuccessClosure ? ,
342
338
failure: FailureClosure ?
343
339
) {
344
340
let parameters : [ String : Any ? ] = [
345
341
" token " : token,
346
342
" channel " : channel,
347
343
" ts " : ts,
348
- " text " : escapeCharacters ? message . slackFormatEscaping : message,
344
+ " text " : message,
349
345
" parse " : parse. rawValue,
350
346
" link_names " : linkNames,
351
347
" attachments " : encodeAttachments ( attachments)
@@ -460,7 +456,7 @@ extension WebAPI {
460
456
// MARK: - File Comments
461
457
extension WebAPI {
462
458
public func addFileComment( fileID: String , comment: String , success: CommentClosure ? , failure: FailureClosure ? ) {
463
- let parameters : [ String : Any ] = [ " token " : token, " file " : fileID, " comment " : comment. slackFormatEscaping ]
459
+ let parameters : [ String : Any ] = [ " token " : token, " file " : fileID, " comment " : comment]
464
460
networkInterface. request ( . filesCommentsAdd, parameters: parameters, successClosure: { ( response) in
465
461
success ? ( Comment ( comment: response [ " comment " ] as? [ String : Any ] ) )
466
462
} ) { ( error) in
@@ -469,7 +465,7 @@ extension WebAPI {
469
465
}
470
466
471
467
public func editFileComment( fileID: String , commentID: String , comment: String , success: CommentClosure ? , failure: FailureClosure ? ) {
472
- let parameters : [ String : Any ] = [ " token " : token, " file " : fileID, " id " : commentID, " comment " : comment. slackFormatEscaping ]
468
+ let parameters : [ String : Any ] = [ " token " : token, " file " : fileID, " id " : commentID, " comment " : comment]
473
469
networkInterface. request ( . filesCommentsEdit, parameters: parameters, successClosure: { ( response) in
474
470
success ? ( Comment ( comment: response [ " comment " ] as? [ String : Any ] ) )
475
471
} ) { ( error) in
0 commit comments