From 85ba55dc2616447fd61a2a8251bf466ff0c11645 Mon Sep 17 00:00:00 2001
From: Arpit Jalan <arpit@techapj.com>
Date: Wed, 2 Jul 2014 19:21:15 +0530
Subject: [PATCH] FEATURE: support txt file to be uploaded for bulk invite

---
 app/controllers/invites_controller.rb | 2 +-
 config/locales/server.en.yml          | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/app/controllers/invites_controller.rb b/app/controllers/invites_controller.rb
index 6067ed74c..08b92997f 100644
--- a/app/controllers/invites_controller.rb
+++ b/app/controllers/invites_controller.rb
@@ -71,7 +71,7 @@ class InvitesController < ApplicationController
     guardian.ensure_can_bulk_invite_to_forum!(current_user)
 
     filename = params.fetch(:resumableFilename)
-    return render status: 415, text: I18n.t("bulk_invite.file_should_be_csv") unless filename.to_s.end_with?(".csv")
+    return render status: 415, text: I18n.t("bulk_invite.file_should_be_csv") unless (filename.to_s.end_with?(".csv") || filename.to_s.end_with?(".txt"))
 
     file               = params.fetch(:file)
     identifier         = params.fetch(:resumableIdentifier)
diff --git a/config/locales/server.en.yml b/config/locales/server.en.yml
index e347a4776..5d910febd 100644
--- a/config/locales/server.en.yml
+++ b/config/locales/server.en.yml
@@ -40,7 +40,7 @@ en:
       load_from_remote: "There was an error loading that post."
 
   bulk_invite:
-    file_should_be_csv: "The uploaded file should be of csv format."
+    file_should_be_csv: "The uploaded file should be of csv or txt format."
 
   backup:
     operation_already_running: "An operation is currently running. Can't start a new job right now."