Lync/SfB: How to change Persistent Chat Privacy Web Form

Recently we were asked to disable the Open Room creation in Persistent Chat. The purpose was to only allow users to create Private or Closed Rooms from the website.

pchatwebprivacy01

After some research we didn’t find any setting/policy that could disable or remove that option.

The only option was to try to find in the web pages if there was anything we could change. It turns out that the easiest way is to change the JavaScripts for Persistent Chat Room Management webpages. These are located in:

Internal Website- C:\Program Files\Microsoft Lync Server 2013\Web Components\PersistentChat\Int\RM\JScripts

External Website – C:\Program Files\Microsoft Lync Server 2013\Web Components\PersistentChat\Ext\RM\JScripts

pchatwebprivacy02

We need to change the RoomForm.js file. In this file look for the function MainForm.prototype.cleanUpRoomPage:

pchatwebprivacy03

The radio button is radOpen, so we simply disable it. For this we need to add the following line:

this.radOpen.disabled = true;

pchatwebprivacy04

Note: You need to change it in all relevant servers and also in both Internal and External Websites.

Since we changed the JavaScript, there’s no need to recycle the application pool or execute iisreset.

Now reload the page and the Open radio button should be grayed out:

pchatwebprivacy05

Note: This will also change the form for the creation and editing of a Room.