mirror of
https://github.com/hoytech/strfry.git
synced 2025-06-20 17:59:50 +00:00
include negentropy protocol version in NIP-11 and landing page
This commit is contained in:
@ -56,6 +56,7 @@ void RelayServer::runWebsocket(ThreadPool<MsgWebsocket>::Thread &thr) {
|
|||||||
{ "supported_nips", supportedNips },
|
{ "supported_nips", supportedNips },
|
||||||
{ "software", "git+https://github.com/hoytech/strfry.git" },
|
{ "software", "git+https://github.com/hoytech/strfry.git" },
|
||||||
{ "version", APP_GIT_VERSION },
|
{ "version", APP_GIT_VERSION },
|
||||||
|
{ "negentropy", negentropy::PROTOCOL_VERSION - 0x60 },
|
||||||
{ "limitation", tao::json::value({
|
{ "limitation", tao::json::value({
|
||||||
{ "max_message_length", cfg().relay__maxWebsocketPayloadSize },
|
{ "max_message_length", cfg().relay__maxWebsocketPayloadSize },
|
||||||
{ "max_subscriptions", cfg().relay__maxSubsPerConnection },
|
{ "max_subscriptions", cfg().relay__maxSubsPerConnection },
|
||||||
@ -81,7 +82,8 @@ void RelayServer::runWebsocket(ThreadPool<MsgWebsocket>::Thread &thr) {
|
|||||||
struct {
|
struct {
|
||||||
std::string supportedNips;
|
std::string supportedNips;
|
||||||
std::string version;
|
std::string version;
|
||||||
} ctx = { tao::json::to_string(supportedNips), APP_GIT_VERSION };
|
uint64_t negentropy;
|
||||||
|
} ctx = { tao::json::to_string(supportedNips), APP_GIT_VERSION, negentropy::PROTOCOL_VERSION - 0x60 };
|
||||||
|
|
||||||
rendered = preGenerateHttpResponse("text/html", ::strfrytmpl::landing(ctx).str);
|
rendered = preGenerateHttpResponse("text/html", ::strfrytmpl::landing(ctx).str);
|
||||||
ver = cfg().version();
|
ver = cfg().version();
|
||||||
|
@ -155,6 +155,11 @@
|
|||||||
<td>Supported NIPs</td>
|
<td>Supported NIPs</td>
|
||||||
<td>$(ctx.supportedNips)</td>
|
<td>$(ctx.supportedNips)</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
|
<tr>
|
||||||
|
<td><a href="https://github.com/hoytech/negentropy">negentropy</a></td>
|
||||||
|
<td>$(ctx.negentropy)</td>
|
||||||
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
Reference in New Issue
Block a user