Page MenuHomeMusing Studio

No OneTemporary

diff --git a/activitystreams/attachment.go b/activitystreams/attachment.go
index c2bfc2e..d221169 100644
--- a/activitystreams/attachment.go
+++ b/activitystreams/attachment.go
@@ -1,33 +1,33 @@
package activitystreams
import (
"mime"
"strings"
)
type Attachment struct {
Type AttachmentType `json:"type"`
URL string `json:"url"`
MediaType string `json:"mediaType"`
Name string `json:"name"`
}
type AttachmentType string
const AttachImage AttachmentType = "Image"
// NewImageAttachment creates a new Attachment from the given URL, setting the
// correct type and automatically detecting the MediaType based on the file
// extension.
-func NewImageAttachment(url string) *Attachment {
+func NewImageAttachment(url string) Attachment {
var imgType string
extIdx := strings.LastIndexByte(url, '.')
if extIdx > -1 {
imgType = mime.TypeByExtension(url[extIdx:])
}
- return &Attachment{
+ return Attachment{
Type: AttachImage,
URL: url,
MediaType: imgType,
}
}

File Metadata

Mime Type
text/x-diff
Expires
Sun, May 17, 9:36 AM (1 d, 6 h)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
3732510

Event Timeline