From d195b2df6f1b7b12bab1e2f0e8b20aa97b0534e4 Mon Sep 17 00:00:00 2001 From: Brendan Abolivier Date: Tue, 11 Jul 2017 11:02:57 +0100 Subject: [PATCH] Doc'd profileUpdate structure --- .../matrix-org/dendrite/clientapi/readers/profile.go | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/github.com/matrix-org/dendrite/clientapi/readers/profile.go b/src/github.com/matrix-org/dendrite/clientapi/readers/profile.go index 7e935d9ce..f2a703c6c 100644 --- a/src/github.com/matrix-org/dendrite/clientapi/readers/profile.go +++ b/src/github.com/matrix-org/dendrite/clientapi/readers/profile.go @@ -43,10 +43,12 @@ type displayName struct { DisplayName string `json:"displayname"` } +// TODO: Move this struct to `common` so the components that consume the topic +// can use it when parsing incoming messages type profileUpdate struct { - Updated string `json:"updated"` - OldValue string `json:"old_value"` - NewValue string `json:"new_value"` + Updated string `json:"updated"` // Which attribute is updated (can be either `avatar_url` or `displayname`) + OldValue string `json:"old_value"` // The attribute's value before the update + NewValue string `json:"new_value"` // The attribute's value after the update } // GetProfile implements GET /profile/{userID}