aboutsummaryrefslogtreecommitdiff
path: root/vendor/maunium.net/go/mautrix
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/maunium.net/go/mautrix')
-rw-r--r--vendor/maunium.net/go/mautrix/events.go9
1 files changed, 8 insertions, 1 deletions
diff --git a/vendor/maunium.net/go/mautrix/events.go b/vendor/maunium.net/go/mautrix/events.go
index 7151c27..efd3795 100644
--- a/vendor/maunium.net/go/mautrix/events.go
+++ b/vendor/maunium.net/go/mautrix/events.go
@@ -197,7 +197,7 @@ type Content struct {
RelatesTo *RelatesTo `json:"m.relates_to,omitempty"`
Command *MatchedCommand `json:"m.command,omitempty"`
- PowerLevels
+ *PowerLevels
Member
Aliases []string `json:"aliases,omitempty"`
Alias string `json:"alias,omitempty"`
@@ -234,6 +234,13 @@ func (content *Content) GetRelatesTo() *RelatesTo {
return content.RelatesTo
}
+func (content *Content) GetPowerLevels() *PowerLevels {
+ if content.PowerLevels == nil {
+ content.PowerLevels = &PowerLevels{}
+ }
+ return content.PowerLevels
+}
+
func (content *Content) UnmarshalPowerLevels() (pl PowerLevels, err error) {
err = json.Unmarshal(content.VeryRaw, &pl)
return