mobile app chat notifications theme
This commit is contained in:
@@ -332,6 +332,19 @@ document.addEventListener('DOMContentLoaded', () => {
|
||||
if (params.get('room_id')) {
|
||||
setTimeout(() => selectRoom(parseInt(params.get('room_id'))), 500);
|
||||
}
|
||||
if (params.get('dm')) {
|
||||
const dmUserId = parseInt(params.get('dm'));
|
||||
setTimeout(async () => {
|
||||
try {
|
||||
const res = await fetch(`/api/chat/private/${dmUserId}`, { method: 'POST' });
|
||||
const data = await res.json();
|
||||
if (data.success) {
|
||||
await loadRooms();
|
||||
selectRoom(data.room_id);
|
||||
}
|
||||
} catch(e) { console.error('打开私聊失败', e); }
|
||||
}, 500);
|
||||
}
|
||||
if (params.get('tab') === 'notif') {
|
||||
switchTab('notif');
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user