a fork of iceshrimp.net but a tweaked frontend to my personal liking. waow
fediverse social-media social iceshrimp fedi
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

[backend/akko-client] Advertise media_proxy feature in nodeinfo (ISH-851)

Kopper fb276967 cb21b448

+58 -51
+57 -50
Iceshrimp.Backend/Controllers/Federation/NodeInfoController.cs
··· 52 52 53 53 var bubbleTimelineEnabled = await db.BubbleInstances.AnyAsync(); 54 54 55 + var metadata = new NodeInfoResponse.NodeInfoMetadata 56 + { 57 + //FIXME Implement members 58 + NodeName = instanceName, 59 + NodeDescription = instanceDescription, 60 + Maintainer = new NodeInfoResponse.Maintainer { Name = "todo", Email = adminContact }, 61 + Languages = [], 62 + TosUrl = "todo", 63 + RepositoryUrl = new Uri(Constants.RepositoryUrl), 64 + FeedbackUrl = new Uri(Constants.IssueTrackerUrl), 65 + ThemeColor = themeColor, 66 + DisableRegistration = true, 67 + DisableLocalTimeline = false, 68 + DisableRecommendedTimeline = false, 69 + DisableGlobalTimeline = false, 70 + EmailRequiredForSignup = false, 71 + PostEditing = false, 72 + PostImports = false, 73 + EnableHCaptcha = false, 74 + EnableRecaptcha = false, 75 + MaxNoteTextLength = 0, 76 + MaxCaptionTextLength = 0, 77 + EnableGithubIntegration = false, 78 + EnableDiscordIntegration = false, 79 + EnableEmail = false, 80 + FederatedTimelineAvailable = true, 81 + PublicTimelineVisibility = new NodeInfoResponse.PleromaPublicTimelineVisibility 82 + { 83 + Bubble = false, 84 + Federated = false, 85 + Local = false 86 + }, 87 + // @formatter:off 88 + UploadLimits = new NodeInfoResponse.PleromaUploadLimits 89 + { 90 + General = maxUploadSize, 91 + Avatar = maxUploadSize, 92 + Background = maxUploadSize, 93 + Banner = maxUploadSize 94 + }, 95 + FieldsLimits = new NodeInfoResponse.PleromaFieldsLimits 96 + { 97 + MaxFields = 10 98 + }, 99 + // @formatter:on 100 + Suggestions = new NodeInfoResponse.PleromaSuggestions { Enabled = false }, 101 + Federation = new NodeInfoResponse.PleromaFederation { Enabled = true }, 102 + // We don't want to leak the list of bubble instances to unauthenticated clients 103 + LocalBubbleInstances = bubbleTimelineEnabled ? ["redacted.invalid"] : [] 104 + }; 105 + 106 + if (storageConfig.Value.ProxyRemoteMedia) 107 + { 108 + metadata.Features.Add("media_proxy"); 109 + } 110 + 55 111 return new NodeInfoResponse 56 112 { 57 113 Version = Request.Path.Value?.EndsWith("2.1") ?? false ? "2.1" : "2.0", ··· 80 136 LocalComments = 0, 81 137 LocalPosts = localPosts 82 138 }, 83 - Metadata = new NodeInfoResponse.NodeInfoMetadata 84 - { 85 - //FIXME Implement members 86 - NodeName = instanceName, 87 - NodeDescription = instanceDescription, 88 - Maintainer = new NodeInfoResponse.Maintainer { Name = "todo", Email = adminContact }, 89 - Languages = [], 90 - TosUrl = "todo", 91 - RepositoryUrl = new Uri(Constants.RepositoryUrl), 92 - FeedbackUrl = new Uri(Constants.IssueTrackerUrl), 93 - ThemeColor = themeColor, 94 - DisableRegistration = true, 95 - DisableLocalTimeline = false, 96 - DisableRecommendedTimeline = false, 97 - DisableGlobalTimeline = false, 98 - EmailRequiredForSignup = false, 99 - PostEditing = false, 100 - PostImports = false, 101 - EnableHCaptcha = false, 102 - EnableRecaptcha = false, 103 - MaxNoteTextLength = 0, 104 - MaxCaptionTextLength = 0, 105 - EnableGithubIntegration = false, 106 - EnableDiscordIntegration = false, 107 - EnableEmail = false, 108 - FederatedTimelineAvailable = true, 109 - PublicTimelineVisibility = new NodeInfoResponse.PleromaPublicTimelineVisibility 110 - { 111 - Bubble = false, 112 - Federated = false, 113 - Local = false 114 - }, 115 - // @formatter:off 116 - UploadLimits = new NodeInfoResponse.PleromaUploadLimits 117 - { 118 - General = maxUploadSize, 119 - Avatar = maxUploadSize, 120 - Background = maxUploadSize, 121 - Banner = maxUploadSize 122 - }, 123 - FieldsLimits = new NodeInfoResponse.PleromaFieldsLimits 124 - { 125 - MaxFields = 10 126 - }, 127 - // @formatter:on 128 - Suggestions = new NodeInfoResponse.PleromaSuggestions { Enabled = false }, 129 - Federation = new NodeInfoResponse.PleromaFederation { Enabled = true }, 130 - // We don't want to leak the list of bubble instances to unauthenticated clients 131 - LocalBubbleInstances = bubbleTimelineEnabled ? ["redacted.invalid"] : [] 132 - }, 139 + Metadata = metadata, 133 140 OpenRegistrations = false 134 141 }; 135 142 }
+1 -1
Iceshrimp.Backend/Core/Federation/WebFinger/Types.cs
··· 122 122 [J("post_formats")] public string[] PostFormats => ["text/plain", "text/x.misskeymarkdown"]; 123 123 124 124 [J("features")] 125 - public string[] Features => 125 + public List<string> Features { get; } = 126 126 [ 127 127 "pleroma_api", 128 128 "akkoma_api",