File tree Expand file tree Collapse file tree 1 file changed +10
-0
lines changed Expand file tree Collapse file tree 1 file changed +10
-0
lines changed Original file line number Diff line number Diff line change @@ -227,6 +227,8 @@ export default {
227
227
this .rooms = this .rooms .concat (formattedRooms)
228
228
this .rooms .map ((room , index ) => this .listenLastMessage (room, index))
229
229
230
+ if (! this .rooms .length ) this .loadingRooms = false
231
+
230
232
this .listenUsersOnlineStatus ()
231
233
this .listenRoomsTypingUsers (query)
232
234
// setTimeout(() => console.log('TOTAL', this.dbRequestCount), 2000)
@@ -642,6 +644,14 @@ export default {
642
644
},
643
645
644
646
async deleteRoom (roomId ) {
647
+ const room = this .rooms .find (r => r .roomId === roomId)
648
+ if (
649
+ room .users .find (user => user ._id === ' SGmFnBZB4xxMv9V4CVlW' ) ||
650
+ room .users .find (user => user ._id === ' 6jMsIXUrBHBj7o2cRlau' )
651
+ ) {
652
+ return alert (' Nope, for demo purposes you cannot delete this room' )
653
+ }
654
+
645
655
const ref = messagesRef (roomId)
646
656
647
657
ref .get ().then (res => {
You can’t perform that action at this time.
0 commit comments