aboutsummaryrefslogtreecommitdiff
path: root/clientapi/producers/syncapi.go
diff options
context:
space:
mode:
authorTill <2353100+S7evinK@users.noreply.github.com>2022-04-07 16:08:19 +0200
committerGitHub <noreply@github.com>2022-04-07 15:08:19 +0100
commit60ee7eef4c8ea7e17135d52d3dde9be0b54e2f55 (patch)
tree5e0330d4fbdac2f67e67338c445c4d8a3b0b68ae /clientapi/producers/syncapi.go
parent99ef5472959a4e4d49bd9760fcb8b3872e21fa71 (diff)
Add possibility to ignore users (#2329)
* Add ignore users * Ignore users in pushrules Add passing tests * Update sytest lists * Store ignore knowledge in the sync API * Fix copyrights Co-authored-by: Neil Alexander <neilalexander@users.noreply.github.com>
Diffstat (limited to 'clientapi/producers/syncapi.go')
-rw-r--r--clientapi/producers/syncapi.go9
1 files changed, 5 insertions, 4 deletions
diff --git a/clientapi/producers/syncapi.go b/clientapi/producers/syncapi.go
index 6e869c31..187e3412 100644
--- a/clientapi/producers/syncapi.go
+++ b/clientapi/producers/syncapi.go
@@ -42,7 +42,7 @@ type SyncAPIProducer struct {
}
// SendData sends account data to the sync API server
-func (p *SyncAPIProducer) SendData(userID string, roomID string, dataType string, readMarker *eventutil.ReadMarkerJSON) error {
+func (p *SyncAPIProducer) SendData(userID string, roomID string, dataType string, readMarker *eventutil.ReadMarkerJSON, ignoredUsers *types.IgnoredUsers) error {
m := &nats.Msg{
Subject: p.TopicClientData,
Header: nats.Header{},
@@ -50,9 +50,10 @@ func (p *SyncAPIProducer) SendData(userID string, roomID string, dataType string
m.Header.Set(jetstream.UserID, userID)
data := eventutil.AccountData{
- RoomID: roomID,
- Type: dataType,
- ReadMarker: readMarker,
+ RoomID: roomID,
+ Type: dataType,
+ ReadMarker: readMarker,
+ IgnoredUsers: ignoredUsers,
}
var err error
m.Data, err = json.Marshal(data)