# rocketchat-chrome-presence **Repository Path**: mirrors_RocketChat/rocketchat-chrome-presence ## Basic Information - **Project Name**: rocketchat-chrome-presence - **Description**: No description available - **Primary Language**: Unknown - **License**: MIT - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2020-09-25 - **Last Updated**: 2026-04-26 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # Chat Presence Uses the idle status from browser API to set presence. On Rocket.Chat this snippet must be added into the client: ```javascript window.addEventListener("message", function (event) { if ((event.source != window) || (event.data.name != 'rocketchat_presence')) { return; } if (event.data.type === "idlestatus") { var state = event.data.state; if (state === "idle") { UserPresence.setAway(); } else if (state === "active") { UserPresence.setOnline(); } else if (state === "locked") { UserPresence.setAway(); } } else if (event.data.rocketchat_presence_extension) { // disabling the built in timer, use me! UserPresence.stopTimer(); UserPresence.startTimer = function () { } } }); ``` ## Icons