fix(instance): публичная информация отдаёт voice_enabled
Поле никогда не заполнялось, поэтому /api/v1/instance всегда сообщал voice_enabled:false, хотя голос настроен (клиент читает признак из /meta, но контракт 6.5 обещает его и здесь).
This commit is contained in:
@@ -768,11 +768,14 @@ func (s *Server) instancePayload(ctx context.Context) (instancePayload, error) {
|
|||||||
Version: s.cfg.Version,
|
Version: s.cfg.Version,
|
||||||
RegistrationEnabled: settings.RegistrationEnabled,
|
RegistrationEnabled: settings.RegistrationEnabled,
|
||||||
AllowGuildCreation: settings.AllowGuildCreation,
|
AllowGuildCreation: settings.AllowGuildCreation,
|
||||||
MaxGuildsPerUser: settings.MaxGuildsPerUser,
|
// Признак «голос настроен»: клиент берёт его из /meta, но контракт
|
||||||
MaxMembersPerGuild: settings.MaxMembersPerGuild,
|
// публичной информации об инстансе (AGENT.md 6.5) обещает и здесь.
|
||||||
MaxMessageLength: settings.MaxMessageLength,
|
VoiceEnabled: s.cfg.VoiceEnabled(),
|
||||||
UserCount: users,
|
MaxGuildsPerUser: settings.MaxGuildsPerUser,
|
||||||
GuildCount: len(guilds),
|
MaxMembersPerGuild: settings.MaxMembersPerGuild,
|
||||||
|
MaxMessageLength: settings.MaxMessageLength,
|
||||||
|
UserCount: users,
|
||||||
|
GuildCount: len(guilds),
|
||||||
}
|
}
|
||||||
if settings.MainGuildID != 0 {
|
if settings.MainGuildID != 0 {
|
||||||
payload.AdminGuildID = formatSnowflake(settings.MainGuildID)
|
payload.AdminGuildID = formatSnowflake(settings.MainGuildID)
|
||||||
|
|||||||
Reference in New Issue
Block a user