aboutsummaryrefslogtreecommitdiff
path: root/internal
diff options
context:
space:
mode:
authorNeil Alexander <neilalexander@users.noreply.github.com>2020-11-20 11:29:02 +0000
committerGitHub <noreply@github.com>2020-11-20 11:29:02 +0000
commitc636be5070b575a2b4e986e1fd7fc0ba24991907 (patch)
tree9fb1d986afe8f8e89091a270760de2dc9b4777ae /internal
parent13cbd50dc26721792a36ab47c17e62b7bb965a85 (diff)
Update last seen on sync requests (#1593)
* Update last seen on sync requests * Fix MSC2836 unit tests * Only update once per minute * Remove debug logging * Configurable option * Simplify updateLastSeen/cleanLastSeen
Diffstat (limited to 'internal')
-rw-r--r--internal/config/config_syncapi.go2
-rw-r--r--internal/mscs/msc2836/msc2836_test.go3
2 files changed, 5 insertions, 0 deletions
diff --git a/internal/config/config_syncapi.go b/internal/config/config_syncapi.go
index 0a96e41c..fc08f738 100644
--- a/internal/config/config_syncapi.go
+++ b/internal/config/config_syncapi.go
@@ -7,6 +7,8 @@ type SyncAPI struct {
ExternalAPI ExternalAPIOptions `yaml:"external_api"`
Database DatabaseOptions `yaml:"database"`
+
+ RealIPHeader string `yaml:"real_ip_header"`
}
func (c *SyncAPI) Defaults() {
diff --git a/internal/mscs/msc2836/msc2836_test.go b/internal/mscs/msc2836/msc2836_test.go
index cbf8b726..265d6ee6 100644
--- a/internal/mscs/msc2836/msc2836_test.go
+++ b/internal/mscs/msc2836/msc2836_test.go
@@ -457,6 +457,9 @@ func (u *testUserAPI) PerformDeviceDeletion(ctx context.Context, req *userapi.Pe
func (u *testUserAPI) PerformDeviceUpdate(ctx context.Context, req *userapi.PerformDeviceUpdateRequest, res *userapi.PerformDeviceUpdateResponse) error {
return nil
}
+func (u *testUserAPI) PerformLastSeenUpdate(ctx context.Context, req *userapi.PerformLastSeenUpdateRequest, res *userapi.PerformLastSeenUpdateResponse) error {
+ return nil
+}
func (u *testUserAPI) PerformAccountDeactivation(ctx context.Context, req *userapi.PerformAccountDeactivationRequest, res *userapi.PerformAccountDeactivationResponse) error {
return nil
}