From 09e14fa3ed27f1d20387c05013d70efcfcab5fd6 Mon Sep 17 00:00:00 2001 From: dyep49 Date: Tue, 11 Jun 2019 11:42:46 -0700 Subject: [PATCH] Add support for subtitles create and delete --- lib/file_uploader.js | 2 ++ lib/twitter.js | 2 ++ 2 files changed, 4 insertions(+) diff --git a/lib/file_uploader.js b/lib/file_uploader.js index ffaf1b94..e3015756 100644 --- a/lib/file_uploader.js +++ b/lib/file_uploader.js @@ -133,6 +133,8 @@ FileUploader.prototype._initMedia = function (cb) { media_category = 'tweet_gif'; } else if (mediaType.toLowerCase().indexOf('video') > -1) { media_category = 'tweet_video'; + } else if (mediaType.toLowerCase().indexOf('subrip') > -1) { + media_category = 'SUBTITLES' } // Check the file size - it should not go over 15MB for video. diff --git a/lib/twitter.js b/lib/twitter.js index 9540857e..b5bb7124 100644 --- a/lib/twitter.js +++ b/lib/twitter.js @@ -31,6 +31,8 @@ var FORMDATA_PATHS = [ var JSONPAYLOAD_PATHS = [ 'media/metadata/create', + 'media/subtitles/create', + 'media/subtitles/delete', 'direct_messages/events/new', 'direct_messages/welcome_messages/new', 'direct_messages/welcome_messages/rules/new',