aboutsummaryrefslogtreecommitdiff
path: root/setup/config
diff options
context:
space:
mode:
authorTill <2353100+S7evinK@users.noreply.github.com>2022-04-06 13:11:19 +0200
committerGitHub <noreply@github.com>2022-04-06 13:11:19 +0200
commite5e3350ce168a192dfc6b6b654276d5cffbdbf0f (patch)
tree738e3bd364da85767de8c487d3d9a851ab804e8b /setup/config
parent16e2d243fc8f3d433a9d7f428e6f782065dc5e89 (diff)
Add presence module V2 (#2312)
* Syncapi presence * Clientapi http presence handler * Why is this here? * Missing files * FederationAPI presence implementation * Add new presence stream * Pinecone update * Pinecone update * Add passing tests * Make linter happy * Add presence producer * Add presence config option * Set user to unavailable after x minutes * Only set currently_active if online Avoid unneeded presence updates when syncing * Tweaks * Query devices for last_active_ts Fixes & tweaks * Export SharedUsers/SharedUsers * Presence stream in MemoryStorage * Remove status_msg_nil * Fix sytest crashes * Make presence types const and use stringer for it * Change options to allow inbound/outbound presence * Fix option & typo * Update configs Co-authored-by: Neil Alexander <neilalexander@users.noreply.github.com>
Diffstat (limited to 'setup/config')
-rw-r--r--setup/config/config_global.go11
1 files changed, 11 insertions, 0 deletions
diff --git a/setup/config/config_global.go b/setup/config/config_global.go
index b947f207..c1650f07 100644
--- a/setup/config/config_global.go
+++ b/setup/config/config_global.go
@@ -41,6 +41,9 @@ type Global struct {
// to other servers and the federation API will not be exposed.
DisableFederation bool `yaml:"disable_federation"`
+ // Configures the handling of presence events.
+ Presence PresenceOptions `yaml:"presence"`
+
// List of domains that the server will trust as identity servers to
// verify third-party identifiers.
// Defaults to an empty array.
@@ -225,3 +228,11 @@ func (c *DNSCacheOptions) Verify(configErrs *ConfigErrors, isMonolith bool) {
checkPositive(configErrs, "cache_size", int64(c.CacheSize))
checkPositive(configErrs, "cache_lifetime", int64(c.CacheLifetime))
}
+
+// PresenceOptions defines possible configurations for presence events.
+type PresenceOptions struct {
+ // Whether inbound presence events are allowed
+ EnableInbound bool `yaml:"enable_inbound"`
+ // Whether outbound presence events are allowed
+ EnableOutbound bool `yaml:"enable_outbound"`
+}