mirror of
https://github.com/MrUnknownDE/VRCX.git
synced 2026-04-21 15:53:50 +02:00
Invites in feed and notifications
This commit is contained in:
@@ -672,12 +672,18 @@ import webApiService from './service/webapi.js';
|
||||
}
|
||||
}
|
||||
}
|
||||
if (feed.type === 'invite') {
|
||||
if (!map[feed.senderUsername] ||
|
||||
map[feed.senderUsername] < feed.created_at) {
|
||||
map[feed.senderUsername] = feed.created_at;
|
||||
}
|
||||
}
|
||||
});
|
||||
// disable notification on busy
|
||||
if (this.currentUserStatus === 'busy') {
|
||||
return;
|
||||
}
|
||||
if (configRepository.getBool('VRCX_VIPNotifications') === true) {
|
||||
if (configRepository.getBool('VRCX_overlayNotifications') === true) {
|
||||
var notys = [];
|
||||
this.feeds.forEach((feed) => {
|
||||
if (feed.isFavorite) {
|
||||
@@ -697,6 +703,13 @@ import webApiService from './service/webapi.js';
|
||||
}
|
||||
}
|
||||
}
|
||||
if (feed.type === 'invite') {
|
||||
if (!map[feed.senderUsername] ||
|
||||
map[feed.senderUsername] < feed.created_at) {
|
||||
map[feed.senderUsername] = feed.created_at;
|
||||
notys.push(feed);
|
||||
}
|
||||
}
|
||||
});
|
||||
var bias = new Date(Date.now() - 60000).toJSON();
|
||||
var theme = 'relax';
|
||||
@@ -734,6 +747,13 @@ import webApiService from './service/webapi.js';
|
||||
text: `<strong>${noty.displayName}</strong> has logged out`
|
||||
}).show();
|
||||
break;
|
||||
case 'invite':
|
||||
new Noty({
|
||||
type: 'alert',
|
||||
theme: theme,
|
||||
text: `<strong>${noty.senderUsername}</strong> has invited you to ${noty.details.worldName}`
|
||||
}).show();
|
||||
break;
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user