aboutsummaryrefslogtreecommitdiff
path: root/mxlib/mediaobject.go
diff options
context:
space:
mode:
Diffstat (limited to 'mxlib/mediaobject.go')
-rw-r--r--mxlib/mediaobject.go4
1 files changed, 4 insertions, 0 deletions
diff --git a/mxlib/mediaobject.go b/mxlib/mediaobject.go
index 1c35187..f29127b 100644
--- a/mxlib/mediaobject.go
+++ b/mxlib/mediaobject.go
@@ -59,3 +59,7 @@ func (m *MediaObject) URL() string {
return fmt.Sprintf("%s/_matrix/media/r0/download/%s/%s/%s",
m.mxClient.Server, m.MxcServer, m.MxcMediaId, url.QueryEscape(m.filename))
}
+
+func (m *MediaObject) MxcUri() string {
+ return fmt.Sprintf("mxc://%s/%s", m.MxcServer, m.MxcMediaId)
+}