diff options
author | Simon Ser <contact@emersion.fr> | 2020-05-13 14:07:44 +0200 |
---|---|---|
committer | Simon Ser <contact@emersion.fr> | 2020-05-13 14:07:44 +0200 |
commit | b891a95fcf4a3d4b64100911dae49fb28904a7fd (patch) | |
tree | fe07b29d6f2443047b7f740c79d86b3c499cc9e9 /plugins/viewhtml/viewer.go | |
parent | 4cf5ad68afd80f27512c464843b0d917182ef0c2 (diff) | |
download | alps-b891a95fcf4a3d4b64100911dae49fb28904a7fd.tar.gz alps-b891a95fcf4a3d4b64100911dae49fb28904a7fd.zip |
Rename project to alps
Diffstat (limited to 'plugins/viewhtml/viewer.go')
-rw-r--r-- | plugins/viewhtml/viewer.go | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/plugins/viewhtml/viewer.go b/plugins/viewhtml/viewer.go index abc9f2d..de6ee4a 100644 --- a/plugins/viewhtml/viewer.go +++ b/plugins/viewhtml/viewer.go @@ -1,4 +1,4 @@ -package koushinviewhtml +package alpsviewhtml import ( "bytes" @@ -7,8 +7,8 @@ import ( "io/ioutil" "strings" - "git.sr.ht/~emersion/koushin" - koushinbase "git.sr.ht/~emersion/koushin/plugins/base" + "git.sr.ht/~emersion/alps" + alpsbase "git.sr.ht/~emersion/alps/plugins/base" "github.com/emersion/go-message" ) @@ -24,7 +24,7 @@ var tpl = template.Must(template.New("view-html.html").Parse(tplSrc)) type viewer struct{} -func (viewer) ViewMessagePart(ctx *koushin.Context, msg *koushinbase.IMAPMessage, part *message.Entity) (interface{}, error) { +func (viewer) ViewMessagePart(ctx *alps.Context, msg *alpsbase.IMAPMessage, part *message.Entity) (interface{}, error) { allowRemoteResources := ctx.QueryParam("allow-remote-resources") == "1" mimeType, _, err := part.Header.ContentType() @@ -32,7 +32,7 @@ func (viewer) ViewMessagePart(ctx *koushin.Context, msg *koushinbase.IMAPMessage return nil, err } if !strings.EqualFold(mimeType, "text/html") { - return nil, koushinbase.ErrViewUnsupported + return nil, alpsbase.ErrViewUnsupported } body, err := ioutil.ReadAll(part.Body) @@ -61,5 +61,5 @@ func (viewer) ViewMessagePart(ctx *koushin.Context, msg *koushinbase.IMAPMessage } func init() { - koushinbase.RegisterViewer(viewer{}) + alpsbase.RegisterViewer(viewer{}) } |