diff options
author | Tulir Asokan <tulir@maunium.net> | 2018-11-14 01:19:52 +0200 |
---|---|---|
committer | Tulir Asokan <tulir@maunium.net> | 2018-11-14 01:19:52 +0200 |
commit | 2fc3378b717f40f37f3a188b68407887242d9c06 (patch) | |
tree | 1af07de3a528c517ad3dd51b9601986dbccd96e1 | |
parent | 912bf309d1f102f8f10c96c718784f01901dad4d (diff) |
Fix go vet
-rw-r--r-- | Gopkg.lock | 4 | ||||
-rw-r--r-- | vendor/maunium.net/go/mautrix/events.go | 9 |
2 files changed, 10 insertions, 3 deletions
@@ -164,14 +164,14 @@ [[projects]] branch = "master" - digest = "1:f0a9c6bdcbf2bbaa02f4f913b1956cc722daf92bec1715b51e001e53ba93b3a2" + digest = "1:1abef70ba640c92bf2763f1b1fbcb8c6e3ba1b58b2dcfeb933a09bfc51f7147b" name = "maunium.net/go/mautrix" packages = [ ".", "format", ] pruneopts = "UT" - revision = "5012a3c49b63ccb3c72cd01d2fd3442759c3ea3c" + revision = "ffb03045581b402abaa1fd51340207dfb807dc81" [[projects]] branch = "master" 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 |