Skip to content

Commit

Permalink
Merge pull request #43 from AstroDogeDX/remove-forcing-display-instan…
Browse files Browse the repository at this point in the history
…ces-as-private

Remove forcing the display of instances as private #40
  • Loading branch information
AstroDogeDX authored Jun 3, 2023
2 parents b8d599f + 8182e39 commit dd3fb57
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 6 deletions.
2 changes: 1 addition & 1 deletion client/frontend.js
Original file line number Diff line number Diff line change
Expand Up @@ -307,7 +307,7 @@ function getFriendStatus(friend) {
if (!friend.isConnected) return { name: '', type: 'Offline Instance' };
if (!friend.instance) return { name: '', type: 'Private Instance' };
if (friend.instance.name) return {
name: friend.instance.privacy >= PrivacyLevel.Friends ? 'Private Instance' : friend.instance.name,
name: friend.instance.name,
type: GetPrivacyLevelName(friend.instance.privacy),
};
return { name: 'Unknown', type: null };
Expand Down
5 changes: 0 additions & 5 deletions server/data.js
Original file line number Diff line number Diff line change
Expand Up @@ -675,11 +675,6 @@ class Core {
for (const friend of Object.values(this.friends)) {
if (!friend?.instance?.id) continue;

// Todo: When the websocket stops leaking the private instances info, we can remove this check so we
// get info about Friends instance we do have access to...
// Ignore Friends and higher privacy levels
if (friend.instance.privacy >= CVRHttp.PrivacyLevel.Friends) continue;

// If the instance doesn't exist already, lets fetch it
if (!Object.prototype.hasOwnProperty.call(this.activeInstancesDetails, friend.instance.id)) {
try {
Expand Down

0 comments on commit dd3fb57

Please sign in to comment.