aboutsummaryrefslogtreecommitdiff
path: root/matrix
diff options
context:
space:
mode:
authorTulir Asokan <tulir@maunium.net>2020-05-06 23:40:50 +0300
committerTulir Asokan <tulir@maunium.net>2020-05-06 23:40:50 +0300
commit2b07b80e64e0c1ebe1673a5a534398f1fb8ad086 (patch)
tree46ac9ff26431a158d3f5a06c2c45ec12c00ba3b1 /matrix
parent03826346d9bbe44f32e868e18d0367949b518361 (diff)
Parse event content when getting single event from server
Diffstat (limited to 'matrix')
-rw-r--r--matrix/matrix.go7
1 files changed, 5 insertions, 2 deletions
diff --git a/matrix/matrix.go b/matrix/matrix.go
index 82ba006..7918aeb 100644
--- a/matrix/matrix.go
+++ b/matrix/matrix.go
@@ -1024,9 +1024,12 @@ func (c *Container) GetEvent(room *rooms.Room, eventID id.EventID) (*muksevt.Eve
if err != nil {
return nil, err
}
- evt = muksevt.Wrap(mxEvent)
+ err = mxEvent.Content.ParseRaw(mxEvent.Type)
+ if err != nil {
+ return nil, err
+ }
debug.Printf("Loaded event %s from server", eventID)
- return evt, nil
+ return muksevt.Wrap(mxEvent), nil
}
// GetOrCreateRoom gets the room instance stored in the session.