From 728750b3d40855a94dc8ce3f4cf2ff7d7fddabbb Mon Sep 17 00:00:00 2001
From: Richard Alam <ritzalam@gmail.com>
Date: Fri, 8 Dec 2017 14:31:07 -0800
Subject: [PATCH]  - fic sending of chat message

---
 .../modules/chat/views/ChatTab.mxml           | 22 +++++--------------
 1 file changed, 5 insertions(+), 17 deletions(-)

diff --git a/bigbluebutton-client/src/org/bigbluebutton/modules/chat/views/ChatTab.mxml b/bigbluebutton-client/src/org/bigbluebutton/modules/chat/views/ChatTab.mxml
index dcadaf14c8..f051468516 100755
--- a/bigbluebutton-client/src/org/bigbluebutton/modules/chat/views/ChatTab.mxml
+++ b/bigbluebutton-client/src/org/bigbluebutton/modules/chat/views/ChatTab.mxml
@@ -507,23 +507,11 @@ with BigBlueButton; if not, see <http://www.gnu.org/licenses/>.
           }
           sendStartCustomPollEvent(answers);
         } else {
-          var cm:ChatMessageVO = new ChatMessageVO();
-          cm.fromUserId = UsersUtil.getMyUserID();
-          cm.fromUsername = UsersUtil.getMyUsername();
-          // get the color value from ColorPicker
-          cm.fromColor =  cmpColorPicker.selectedColor.toString();
-          // Get the current UTC time and the timezone for this sender.
-          // The receiver will have to convert this to local time.
-          var now:Date = new Date();
-          cm.fromTime = now.valueOf();
-          cm.fromTimezoneOffset = now.getTimezoneOffset();
-          
-          //cm.message = ChatUtil.parseURLs(ChatUtil.cleanup(message));
-          cm.message = ExternalInterface.call('parseURLs', (ChatUtil.cleanup(message)));
-          
-          var publicEvent:SendGroupChatMessageEvent = new SendGroupChatMessageEvent(
-            chatId, cm);
-          globalDispatcher.dispatchEvent(publicEvent);
+          var cm:ChatMessageVO = processChatMessage(message);
+          if (cm != null) {
+             var publicEvent:SendGroupChatMessageEvent = new SendGroupChatMessageEvent(chatId, cm);
+             globalDispatcher.dispatchEvent(publicEvent);
+          }
         }
       }
 
-- 
GitLab