feat: Add presence heartbeat for Matrix online status

- matrix-gateway: POST /internal/matrix/presence/online endpoint
- usePresenceHeartbeat hook with activity tracking
- Auto away after 5 min inactivity
- Offline on page close/visibility change
- Integrated in MatrixChatRoom component
This commit is contained in:
Apple
2025-11-27 00:19:40 -08:00
parent 5bed515852
commit 3de3c8cb36
6371 changed files with 1317450 additions and 932 deletions

View File

@@ -0,0 +1,26 @@
<svg width="64" height="64" viewBox="0 0 64 64" fill="none" xmlns="http://www.w3.org/2000/svg">
<defs>
<linearGradient id="grad1" x1="0%" y1="0%" x2="100%" y2="100%">
<stop offset="0%" style="stop-color:#a855f7;stop-opacity:1" />
<stop offset="100%" style="stop-color:#ec4899;stop-opacity:1" />
</linearGradient>
<linearGradient id="grad2" x1="0%" y1="0%" x2="100%" y2="100%">
<stop offset="0%" style="stop-color:#06b6d4;stop-opacity:1" />
<stop offset="100%" style="stop-color:#3b82f6;stop-opacity:1" />
</linearGradient>
</defs>
<circle cx="32" cy="32" r="30" fill="url(#grad1)" opacity="0.2"/>
<circle cx="32" cy="16" r="4" fill="url(#grad1)"/>
<circle cx="48" cy="32" r="4" fill="url(#grad2)"/>
<circle cx="32" cy="48" r="4" fill="url(#grad1)"/>
<circle cx="16" cy="32" r="4" fill="url(#grad2)"/>
<circle cx="32" cy="32" r="6" fill="url(#grad1)"/>
<line x1="32" y1="20" x2="32" y2="26" stroke="url(#grad1)" stroke-width="2" opacity="0.6"/>
<line x1="44" y1="32" x2="38" y2="32" stroke="url(#grad2)" stroke-width="2" opacity="0.6"/>
<line x1="32" y1="44" x2="32" y2="38" stroke="url(#grad1)" stroke-width="2" opacity="0.6"/>
<line x1="20" y1="32" x2="26" y2="32" stroke="url(#grad2)" stroke-width="2" opacity="0.6"/>
<line x1="24" y1="24" x2="28" y2="28" stroke="url(#grad1)" stroke-width="1.5" opacity="0.4"/>
<line x1="40" y1="24" x2="36" y2="28" stroke="url(#grad2)" stroke-width="1.5" opacity="0.4"/>
<line x1="40" y1="40" x2="36" y2="36" stroke="url(#grad1)" stroke-width="1.5" opacity="0.4"/>
<line x1="24" y1="40" x2="28" y2="36" stroke="url(#grad2)" stroke-width="1.5" opacity="0.4"/>
</svg>

After

Width:  |  Height:  |  Size: 1.6 KiB