mirror of
https://github.com/MrUnknownDE/VRCX.git
synced 2026-04-20 23:33:50 +02:00
Request invites and friend requests
This commit is contained in:
@@ -678,6 +678,18 @@ import webApiService from './service/webapi.js';
|
||||
map[feed.senderUsername] = feed.created_at;
|
||||
}
|
||||
}
|
||||
else if (feed.type === 'requestInvite') {
|
||||
if (!map[feed.senderUsername] ||
|
||||
map[feed.senderUsername] < feed.created_at) {
|
||||
map[feed.senderUsername] = feed.created_at;
|
||||
}
|
||||
}
|
||||
else if (feed.type === 'friendRequest') {
|
||||
if (!map[feed.senderUsername] ||
|
||||
map[feed.senderUsername] < feed.created_at) {
|
||||
map[feed.senderUsername] = feed.created_at;
|
||||
}
|
||||
}
|
||||
});
|
||||
// disable notification on busy
|
||||
if (this.currentUserStatus === 'busy') {
|
||||
@@ -710,6 +722,20 @@ import webApiService from './service/webapi.js';
|
||||
notys.push(feed);
|
||||
}
|
||||
}
|
||||
else if (feed.type === 'requestInvite') {
|
||||
if (!map[feed.senderUsername] ||
|
||||
map[feed.senderUsername] < feed.created_at) {
|
||||
map[feed.senderUsername] = feed.created_at;
|
||||
notys.push(feed);
|
||||
}
|
||||
}
|
||||
else if (feed.type === 'friendRequest') {
|
||||
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';
|
||||
@@ -754,6 +780,20 @@ import webApiService from './service/webapi.js';
|
||||
text: `<strong>${noty.senderUsername}</strong> has invited you to ${noty.details.worldName}`
|
||||
}).show();
|
||||
break;
|
||||
case 'requestInvite':
|
||||
new Noty({
|
||||
type: 'alert',
|
||||
theme: theme,
|
||||
text: `<strong>${noty.senderUsername}</strong> has requested an invite`
|
||||
}).show();
|
||||
break;
|
||||
case 'friendRequest':
|
||||
new Noty({
|
||||
type: 'alert',
|
||||
theme: theme,
|
||||
text: `<strong>${noty.senderUsername}</strong> has sent you a friend request`
|
||||
}).show();
|
||||
break;
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user