Last user activity now marked on humie-friendly page-loads and last-socket disconnects, ensuring accurate 'online' status when disconnected from a channel.
This commit is contained in:
parent
6222535c47
commit
6445950f90
7 changed files with 99 additions and 2 deletions
|
|
@ -22,6 +22,7 @@ const { Router } = require('express');
|
|||
const channelModel = require("../schemas/channel/channelSchema");
|
||||
const channelController = require("../controllers/channelController");
|
||||
const channelSettingsController = require("../controllers/channelSettingsController");
|
||||
const presenceUtils = require("../utils/presenceUtils");
|
||||
|
||||
//globals
|
||||
const router = Router();
|
||||
|
|
@ -29,6 +30,9 @@ const router = Router();
|
|||
//User authentication middleware
|
||||
router.use("/*/settings",channelModel.reqPermCheck("manageChannel","/c/"));
|
||||
|
||||
//Use presence middleware
|
||||
router.use(presenceUtils.presenceMiddleware);
|
||||
|
||||
//routing functions
|
||||
router.get('/*/settings', channelSettingsController.get);
|
||||
router.get('/*/', channelController.get);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue