Browse Source

Merge branch 'february_release' of https://github.com/Musare/Musare into february_release

# Conflicts:
#	app/client/stylesheets/app.css
#	app/server/server.js
Wesley McCann 9 years ago
parent
commit
61a6c0a11d

+ 9 - 3
app/client/scripts/events.js

@@ -207,6 +207,7 @@ Template.admin.events({
         console.log($(this));
         console.log($(this));
         console.log($(this)[0].type);
         console.log($(this)[0].type);
         Session.set("roomDesc", $(this)[0].type);
         Session.set("roomDesc", $(this)[0].type);
+        $("#desc_text").val(Rooms.findOne({type: Session.get("roomDesc")}).roomDesc);
     },
     },
     "click #submit_desc": function(){
     "click #submit_desc": function(){
         var description = $("#desc_text").val();
         var description = $("#desc_text").val();
@@ -633,15 +634,17 @@ Template.queues.events({
         newSong.duration = Number($("#duration").val());
         newSong.duration = Number($("#duration").val());
         newSong.skipDuration = $("#skip-duration").val();
         newSong.skipDuration = $("#skip-duration").val();
         newSong.requestedBy = Session.get("song").requestedBy;
         newSong.requestedBy = Session.get("song").requestedBy;
+        newSong.genres = Session.get("song").genres;
         if(newSong.skipDuration === undefined){
         if(newSong.skipDuration === undefined){
             newSong.skipDuration = 0;
             newSong.skipDuration = 0;
         }
         }
-        Meteor.call("updateQueueSong", Session.get("genre"), Session.get("song"), newSong, function(err, res) {
-            console.log(err, res);
+        Meteor.call("updateQueueSong", newSong.mid, newSong, function(err, res) {
             if (err) {
             if (err) {
                 var $toastContent = $('<span><strong>Song not saved.</strong> ' + err.reason + '</span>');
                 var $toastContent = $('<span><strong>Song not saved.</strong> ' + err.reason + '</span>');
                 Materialize.toast($toastContent, 8000);
                 Materialize.toast($toastContent, 8000);
             } else {
             } else {
+                var $toastContent = $('<span><strong>Song saved!</strong> No errors were found.</span>');
+                Materialize.toast($toastContent, 4000);
                 Session.set("song", newSong);
                 Session.set("song", newSong);
             }
             }
         });
         });
@@ -861,12 +864,15 @@ Template.manageStation.events({
         newSong.duration = Number($("#duration").val());
         newSong.duration = Number($("#duration").val());
         newSong.skipDuration = $("#skip-duration").val();
         newSong.skipDuration = $("#skip-duration").val();
         newSong.requestedBy = Session.get("song").requestedBy;
         newSong.requestedBy = Session.get("song").requestedBy;
-        Meteor.call("updatePlaylistSong", Session.get("genre"), Session.get("song"), newSong, function(err, res) {
+        newSong.genres = Session.get("song").genres;
+        Meteor.call("updatePlaylistSong", newSong.mid, newSong, function(err, res) {
             console.log(err, res);
             console.log(err, res);
             if (err) {
             if (err) {
                 var $toastContent = $('<span><strong>Song not saved.</strong> ' + err.reason + '</span>');
                 var $toastContent = $('<span><strong>Song not saved.</strong> ' + err.reason + '</span>');
                 Materialize.toast($toastContent, 8000);
                 Materialize.toast($toastContent, 8000);
             } else {
             } else {
+                var $toastContent = $('<span><strong>Song saved!</strong> No errors were found.</span>');
+                Materialize.toast($toastContent, 4000);
                 Session.set("song", newSong);
                 Session.set("song", newSong);
             }
             }
         });
         });

+ 6 - 0
app/client/scripts/helpers.js

@@ -204,6 +204,12 @@ Template.queues.helpers({
     }
     }
 });
 });
 
 
+Template.news.helpers({
+    articles: function() {
+        return News.find().fetch().reverse();
+    }
+});
+
 Template.manageStation.helpers({
 Template.manageStation.helpers({
     songs: function () {
     songs: function () {
         var parts = location.href.split('/');
         var parts = location.href.split('/');

+ 1 - 0
app/client/scripts/main.js

@@ -21,6 +21,7 @@ Deps.autorun(function() {
     Meteor.subscribe("songs");
     Meteor.subscribe("songs");
     Meteor.subscribe("alerts");
     Meteor.subscribe("alerts");
     Meteor.subscribe("rooms");
     Meteor.subscribe("rooms");
+    Meteor.subscribe("news");
     Meteor.subscribe("userData", Meteor.userId());
     Meteor.subscribe("userData", Meteor.userId());
 });
 });
 
 

+ 9 - 0
app/client/scripts/onRendered.js

@@ -50,6 +50,15 @@ Template.manageStation.onRendered(function() {
     });
     });
 });
 });
 
 
+Template.news.onRendered(function() {
+    if (rTimeInterval !== undefined) {
+        Meteor.clearInterval(rTimeInterval)
+    }
+    rTimeInterval = Meteor.setInterval(function() {
+        Session.set("time", new Date().getTime());
+    }, 10000);
+});
+
 Template.room.onRendered(function() {
 Template.room.onRendered(function() {
     if (rTimeInterval !== undefined) {
     if (rTimeInterval !== undefined) {
         Meteor.clearInterval(rTimeInterval)
         Meteor.clearInterval(rTimeInterval)

+ 5 - 4
app/client/stylesheets/app.css

@@ -177,7 +177,8 @@ textarea{
     color: black;
     color: black;
 }
 }
 
 
-#media-container {
-  min-height: 460px;
-  margin-top: 10px;
-}
+#team-page-container {
+    margin-left: 0;
+    margin-right: 0;
+    /* Weird hack... No clue why this is needed but it is.*/
+}

+ 17 - 26
app/client/templates/news.html

@@ -1,31 +1,22 @@
 <template name="news">
 <template name="news">
     {{> header}}
     {{> header}}
-    <main class="content-box">
-        <h3 class="black-text thin">News, Updates & Announcements</h3>
-        <ul class="collection">
-        <!--
-        {{#each chat}}
-        <li class="collection-item news-box">
-            <span class="news-title">{{title}}</span>
-            <hr>
-            <p class="news-content">{{content}}</p>
-            <p class="news-creator">Posted by: {{postBy}}</p>
-            <p class="news-postTime">{{timePostedAgo}}. ({{timePostedDate}})</p>
-        </li>
-        {{/each}}
-        -->
-
-        <!-- TEMP HARDCODED NEWS ARTICLE, soon you can add/remove news from the admin panel -->
-        <li class="collection-item news-box">
-            <span class="news-title">Welcome To Musare 2.0</span>
-            <hr>
-            <p class="news-content">Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla rhoncus magna orci, tristique aliquam arcu ultricies non.
-              <br />Vivamus iaculis leo lectus. In quis nunc rhoncus nulla hendrerit pellentesque in nec ipsum. Curabitur facilisis enim nulla, sit amet dapibus lacus aliquet ut. Integer lacinia pharetra semper.
-              <br />Duis mattis varius egestas. Cras sit amet venenatis lacus. Curabitur ut maximus urna, vel pulvinar ex. Do It Work?!</p>
-            <p class="news-creator">Posted by: Johand</p>
-            <p class="news-postTime">5days ago. (5/01/2016)</p>
-        </li>
-        </ul>
+    <main class="content-box row">
+        <h3 class="black-text thin center">News</h3>
+            {{#each articles}}
+                <div class="card teal-text col m6 s12 l6 offset-m3 offset-l3">
+                    <div class="card-content">
+                        <span>{{title}}</span>
+                        <hr>
+                        <p class="flow-text" style="word-wrap:break-word;">
+                            {{content}}
+                        </p>
+                    </div>
+                    <div class="card-action">
+                        <span>Posted by: {{author}}.</span><br>
+                        <span>Created at: {{rtime time}}.</span>
+                    </div>
+                </div>
+            {{/each}}
     </main>
     </main>
     {{> footer}}
     {{> footer}}
 </template>
 </template>

+ 49 - 37
app/client/templates/project.html

@@ -1,42 +1,54 @@
 <template name="project">
 <template name="project">
     {{> header}}
     {{> header}}
-    <main class="content-box">
-        <h3 class="black-text thin">The Project</h3>
-        <hr>
-        <h4 class="thin">What is Musare?</h4>
-        <p class="flow-text">
-            Musare is a modern, open source, collaborative music app where a user can go into any of our "stations" and
-            listen to music simultaneously with other users in that "station".
-        </p>
-        <hr>
-        <h4 class="thin">What is Musare's end goal?</h4>
-        <p class="flow-text">
-            Musare's end goal is to be a collaborative way of discovering new music. We are working hard to implement
-            all the features that are necessary for this.
-        </p>
-        <hr>
-        <h4 class="thin">How can I help?</h4>
-        <p class="flow-text">
-            There are essentially 3 main ways in which you can help us:
-        <ol>
-            <li>
-                If you are a JavaScript developer, then we can use your help! Our project is open source and all the
-                source code can be found on GitHub. We would love for you to create new features, add exciting
-                content or just improve what already is on Musare. Also, if you see a bug or glitch on Musare, then
-                create a new
-                "issue" on GitHub and we will fix it as soon as possible. You can also have a try at fixing a
-                bug that you may find!
-            </li>
-            <li>
-                If you are not a developer but want some way of supporting us - you can donate to Musare. Any
-                amount of donation is highly appreciated, and will help us maintain server costs.
-            </li>
-            <li>
-                Send us feedback! You're comments and/or suggestion are extremely valuable to us. In order to improve
-                we need to know what you like, don't like or what you might want on the app.
-            </li>
-        </ol>
-        </p>
+    <main class="content-box row">
+        <div class="col s12 l4 m8 offset-l4 offset-m2">
+            <h3 class="black-text thin">The Project</h3>
+            <hr>
+            <div class="card teal accent-3">
+                <div class="card-content white-text">
+                    <span class="card-title">What is Musare?</span>
+                    <p>
+                        Musare is a modern, open source, collaborative music app where a user can go into any of our "stations" and
+                        listen to music simultaneously with other users in that "station".
+                    </p>
+                </div>
+            </div>
+            <div class="card teal accent-3">
+                <div class="card-content white-text">
+                    <span class="card-title">What is Musare's end goal?</span>
+                    <p>
+                        Musare's end goal is to be a collaborative way of discovering new music. We are working hard to implement
+                        all the features that are necessary for this.
+                    </p>
+                </div>
+            </div>
+            <div class="card teal accent-3">
+                <div class="card-content white-text">
+                    <span class="card-title">How can I help?</span>
+                    <p>
+                        There are essentially 3 main ways in which you can help us:
+                        <ol>
+                            <li>
+                                If you are a JavaScript developer, then we can use your help! Our project is open source and all the
+                                source code can be found on GitHub. We would love for you to create new features, add exciting
+                                content or just improve what already is on Musare. Also, if you see a bug or glitch on Musare, then
+                                create a new
+                                "issue" on GitHub and we will fix it as soon as possible. You can also have a try at fixing a
+                                bug that you may find!
+                            </li>
+                            <li>
+                                If you are not a developer but want some way of supporting us - you can donate to Musare. Any
+                                amount of donation is highly appreciated, and will help us maintain server costs.
+                            </li>
+                            <li>
+                                Send us feedback! Your comments and/or suggestion are extremely valuable to us. In order to improve
+                                we need to know what you like, don't like or what you might want on the app.
+                            </li>
+                        </ol>
+                    </p>
+                </div>
+            </div>
+        </div>
     </main>
     </main>
     {{> footer}}
     {{> footer}}
 </template>
 </template>

+ 54 - 52
app/client/templates/team.html

@@ -1,57 +1,59 @@
 <template name="team">
 <template name="team">
     {{> header}}
     {{> header}}
-    <main class="content-box">
-        <h3 class="black-text thin">The Team</h3>
-        <ul class="collection">
-            <li class="collection-item avatar">
-                <img src="https://avatars0.githubusercontent.com/u/11958359?v=3&s=460" alt="Akira's Profile Picture"
-                     class="circle">
-                <span class="title">Akira Laine</span>
-                <p>Co Founder, Lead Developer & Whovian</p>
-                <div class="contact-details">
-                    <i class="material-icons">my_location</i> <span>Noumea, New Caledonia</span>
-                </div>
-                <div class="contact-details">
-                    <i class="material-icons">email</i> <span>akira_laine@outlook.com</span>
-                </div>
-            </li>
-            <li class="collection-item avatar">
-                <img src="https://avatars2.githubusercontent.com/u/9784561?v=3&s=460" alt="Kris' Profile Picture"
-                     class="circle">
-                <span class="title">Kris Vos</span>
-                <p>Co Founder, Lead Developer & Fox</p>
-                <div class="contact-details">
-                    <i class="material-icons">my_location</i> <span>Haarlem, The Netherlands</span>
-                </div>
-                <div class="contact-details">
-                    <i class="material-icons">email</i> <span>krisvos130@gmail.com</span>
-                </div>
-            </li>
-            <li class="collection-item avatar">
-                <img src="https://avatars2.githubusercontent.com/u/6952369?v=3&s=460" alt="Johand's Profile Picture"
-                     class="circle">
-                <span class="title">Johannes Andersen</span>
-                <p>Co Founder, <span title="Chief business officer">CBO</span> & Developer</p>
-                <div class="contact-details">
-                    <i class="material-icons">my_location</i> <span>Fredrikstad, Norway</span>
-                </div>
-                <div class="contact-details">
-                    <i class="material-icons">email</i> <span>Johand@Johand.me</span>
-                </div>
-            </li>
-            <li class="collection-item avatar">
-                <img src="https://avatars0.githubusercontent.com/u/1158013?v=3&s=460" alt="Wesley's Profile Picture"
-                     class="circle">
-                <span class="title">Wesley McCaan</span>
-                <p>Core Developer</p>
-                <div class="contact-details">
-                    <i class="material-icons">my_location</i> <span>Colorado Springs, CA</span>
-                </div>
-                <!--<div class="contact-details">-->
-                    <!--<i class="material-icons">email</i> <span></span>-->
-                <!--</div>-->
-            </li>
-        </ul>
+    <main class="content-box row" id="team-page-container">
+        <div class="col s12 l4 m8 offset-l4 offset-m2">
+            <h3 class="black-text thin">The Team</h3>
+            <ul class="collection">
+                <li class="collection-item avatar">
+                    <img src="https://avatars0.githubusercontent.com/u/11958359?v=3&s=460" alt="Akira's Profile Picture"
+                         class="circle">
+                    <span class="title">Akira Laine</span>
+                    <p>Co Founder, Lead Developer & Whovian</p>
+                    <div class="contact-details">
+                        <i class="material-icons">my_location</i> <span>Noumea, New Caledonia</span>
+                    </div>
+                    <div class="contact-details">
+                        <i class="material-icons">email</i> <span>akira_laine@outlook.com</span>
+                    </div>
+                </li>
+                <li class="collection-item avatar">
+                    <img src="https://avatars2.githubusercontent.com/u/9784561?v=3&s=460" alt="Kris' Profile Picture"
+                         class="circle">
+                    <span class="title">Kristian Vos</span>
+                    <p>Co Founder, Lead Developer & Fox</p>
+                    <div class="contact-details">
+                        <i class="material-icons">my_location</i> <span>Haarlem, The Netherlands</span>
+                    </div>
+                    <div class="contact-details">
+                        <i class="material-icons">email</i> <span>krisvos130@gmail.com</span>
+                    </div>
+                </li>
+                <li class="collection-item avatar">
+                    <img src="https://avatars2.githubusercontent.com/u/6952369?v=3&s=460" alt="Johand's Profile Picture"
+                         class="circle">
+                    <span class="title">Johannes Andersen</span>
+                    <p>Co Founder, <span title="Chief business officer">CBO</span> & Developer</p>
+                    <div class="contact-details">
+                        <i class="material-icons">my_location</i> <span>Fredrikstad, Norway</span>
+                    </div>
+                    <div class="contact-details">
+                        <i class="material-icons">email</i> <span>Johand@Johand.me</span>
+                    </div>
+                </li>
+                <li class="collection-item avatar">
+                    <img src="https://avatars0.githubusercontent.com/u/1158013?v=3&s=460" alt="Wesley's Profile Picture"
+                         class="circle">
+                    <span class="title">Wesley McCaan</span>
+                    <p>Core Developer</p>
+                    <div class="contact-details">
+                        <i class="material-icons">my_location</i> <span>Colorado Springs, CA</span>
+                    </div>
+                    <!--<div class="contact-details">-->
+                        <!--<i class="material-icons">email</i> <span></span>-->
+                    <!--</div>-->
+                </li>
+            </ul>
+        </div>
     </main>
     </main>
     {{> footer}}
     {{> footer}}
 </template>
 </template>

+ 2 - 1
app/database/collections.js

@@ -6,4 +6,5 @@ Chat = new Mongo.Collection("chat");
 Alerts = new Mongo.Collection("alerts");
 Alerts = new Mongo.Collection("alerts");
 Deleted = new Mongo.Collection("deleted");
 Deleted = new Mongo.Collection("deleted");
 Feedback = new Mongo.Collection("feedback");
 Feedback = new Mongo.Collection("feedback");
-Songs = new Mongo.Collection("songs");
+Songs = new Mongo.Collection("songs");
+News = new Mongo.Collection("news");

+ 20 - 0
app/database/schemas.js

@@ -503,6 +503,25 @@ Schemas.Report = new SimpleSchema({
     }
     }
 });
 });
 
 
+Schemas.Article = new SimpleSchema({
+    "title": {
+        type: String,
+        label: "Article Title"
+    },
+    "content": {
+        type: String,
+        label: "Article Content"
+    },
+    "author": {
+        type: String,
+        label: "Article's Author"
+    },
+    "time": {
+        type: Date,
+        label: "Article's Create Date"
+    }
+});
+
 Rooms.attachSchema(Schemas.Room);
 Rooms.attachSchema(Schemas.Room);
 Alerts.attachSchema(Schemas.Alert);
 Alerts.attachSchema(Schemas.Alert);
 Chat.attachSchema(Schemas.Chat);
 Chat.attachSchema(Schemas.Chat);
@@ -512,3 +531,4 @@ Meteor.users.attachSchema(Schemas.User);
 Reports.attachSchema(Schemas.Report);
 Reports.attachSchema(Schemas.Report);
 Feedback.attachSchema(Schemas.Feedback);
 Feedback.attachSchema(Schemas.Feedback);
 Songs.attachSchema(Schemas.FullSong);
 Songs.attachSchema(Schemas.FullSong);
+News.attachSchema(Schemas.Article);

+ 59 - 24
app/server/server.js

@@ -13,7 +13,7 @@ Meteor.startup(function () {
     var stations = [{tag: "edm", display: "EDM"}, {tag: "pop", display: "Pop"}]; //Rooms to be set on server startup
     var stations = [{tag: "edm", display: "EDM"}, {tag: "pop", display: "Pop"}]; //Rooms to be set on server startup
     for (var i in stations) {
     for (var i in stations) {
         if (Rooms.find({type: stations[i]}).count() === 0) {
         if (Rooms.find({type: stations[i]}).count() === 0) {
-            createRoom(stations[i].display, stations[i].tag, false);
+            createRoom(stations[i].display, stations[i].tag, false, "Room description goes here.");
         }
         }
     }
     }
     emojione.ascii = true;
     emojione.ascii = true;
@@ -118,7 +118,7 @@ function getStation(type, cb) {
     });
     });
 }
 }
 
 
-function createRoom(display, tag, private) {
+function createRoom(display, tag, private, desc) {
     var type = tag;
     var type = tag;
     if (Rooms.find({type: type}).count() === 0) {
     if (Rooms.find({type: type}).count() === 0) {
         Rooms.insert({
         Rooms.insert({
@@ -126,8 +126,8 @@ function createRoom(display, tag, private) {
             type: type,
             type: type,
             users: 0,
             users: 0,
             private: private,
             private: private,
-            roomDesc: "Test room yo",
-            currentSong: {song: default_song, started: 0}
+            currentSong: {song: default_song, started: 0},
+            roomDesc: desc
         }, function (err) {
         }, function (err) {
             if (err) {
             if (err) {
                 throw err;
                 throw err;
@@ -438,6 +438,10 @@ Meteor.publish("alerts", function () {
     return Alerts.find({active: true})
     return Alerts.find({active: true})
 });
 });
 
 
+Meteor.publish("news", function () {
+    return News.find({})
+});
+
 Meteor.publish("userData", function (userId) {
 Meteor.publish("userData", function (userId) {
     if (userId !== undefined) {
     if (userId !== undefined) {
         return Meteor.users.find(userId, {fields: {"services.github.username": 1, "punishments": 1}})
         return Meteor.users.find(userId, {fields: {"services.github.username": 1, "punishments": 1}})
@@ -566,18 +570,6 @@ function isMuted() {
 }
 }
 
 
 Meteor.methods({
 Meteor.methods({
-    getSongAudio: function(url) {
-      var ytdl = Meteor.npmRequire("ytdl-core");
-      var stream = ytdl(url);
-      console.log(url);
-
-      var audioCtx = new (window.AudioContext || window.webkitAudioContext)();
-      var analyser = audioCtx.createAnalyser();
-
-      var source = audioCtx.createMediaStreamSource(stream);
-      source.connect(analyser);
-      analyser.connect(distortion);
-    },
     lockRoom: function (type) {
     lockRoom: function (type) {
         if (isAdmin() && !isBanned()) {
         if (isAdmin() && !isBanned()) {
             getStation(type, function (station) {
             getStation(type, function (station) {
@@ -948,6 +940,37 @@ Meteor.methods({
             return true;
             return true;
         }
         }
     },
     },
+    createArticle: function(data) {
+        if (!isBanned() && isModerator()) {
+            var userId = Meteor.userId();
+            var requiredProperties = ["title", "content", "author"];
+            if (data !== undefined && Object.keys(data).length === requiredProperties.length) {
+                for (var property in requiredProperties) {
+                    if (data[requiredProperties[property]] === undefined) {
+                        throw new Meteor.Error(403, "Invalid data.");
+                    }
+                }
+                if (data.author === true) {
+                    data.author = Meteor.user().profile.username
+                } else {
+                    data.author = "A Musare Admin";
+                }
+                data.time =  new Date();
+                News.insert(data, function(err, res) {
+                    if (err) {
+                        console.log(err);
+                        throw err.sanitizedError;
+                    } else {
+                        return true;
+                    }
+                });
+            } else {
+                throw new Meteor.Error(403, "Invalid data.");
+            }
+        } else {
+            throw new Meteor.Error(403, "Invalid permissions.");
+        }
+    },
     addSongToQueue: function (songData) {
     addSongToQueue: function (songData) {
         if (Meteor.userId() && !isBanned()) {
         if (Meteor.userId() && !isBanned()) {
             var userId = Meteor.userId();
             var userId = Meteor.userId();
@@ -990,8 +1013,14 @@ Meteor.methods({
     },
     },
     updateQueueSong: function (mid, newSong) {
     updateQueueSong: function (mid, newSong) {
         if (isModerator() && !isBanned()) {
         if (isModerator() && !isBanned()) {
-            newSong.mid = mid;
-            Queues.update({mid: mid}, newSong, function(err) {
+            Queues.update({mid: mid}, {$set: {
+                "title": newSong.title,
+                "artist": newSong.artist,
+                "id": newSong.id,
+                "img": newSong.img,
+                "duration" : newSong.duration,
+                "skipDuration" : newSong.skipDuration
+            }}, function(err) {
                 console.log(err);
                 console.log(err);
                 if (err) {
                 if (err) {
                     throw err.sanitizedError;
                     throw err.sanitizedError;
@@ -1005,9 +1034,15 @@ Meteor.methods({
     },
     },
     updatePlaylistSong: function (mid, newSong) {
     updatePlaylistSong: function (mid, newSong) {
         if (isModerator() && !isBanned()) {
         if (isModerator() && !isBanned()) {
-            newSong.mid = mid;
-            newSong.approvedBy = Meteor.userId();
-            Playlists.update({mid: mid}, newSong, function(err) {
+            Songs.update({mid: mid}, {$set: {
+                "title": newSong.title,
+                "artist": newSong.artist,
+                "id": newSong.id,
+                "img": newSong.img,
+                "duration": newSong.duration,
+                "skipDuration": newSong.skipDuration,
+                "approvedBy": Meteor.userId()
+        }}, function(err) {
                 console.log(err);
                 console.log(err);
                 if (err) {
                 if (err) {
                     throw err.sanitizedError;
                     throw err.sanitizedError;
@@ -1071,9 +1106,9 @@ Meteor.methods({
             throw new Meteor.Error(403, "Invalid permissions.");
             throw new Meteor.Error(403, "Invalid permissions.");
         }
         }
     },
     },
-    createRoom: function (display, tag, private) {
+    createRoom: function (display, tag, private, desc) {
         if (isAdmin() && !isBanned()) {
         if (isAdmin() && !isBanned()) {
-            createRoom(display, tag, private);
+            createRoom(display, tag, private, desc);
         } else {
         } else {
             throw new Meteor.Error(403, "Invalid permissions.");
             throw new Meteor.Error(403, "Invalid permissions.");
         }
         }
@@ -1191,4 +1226,4 @@ Meteor.setInterval(function () {
 
 
 Meteor.users.after.insert(function (err, user) {
 Meteor.users.after.insert(function (err, user) {
     Accounts.sendVerificationEmail(user._id);
     Accounts.sendVerificationEmail(user._id);
-});
+});