aboutsummaryrefslogtreecommitdiffstats
path: root/commands/msg
diff options
context:
space:
mode:
authorRobin Jarry <robin@jarry.cc>2023-03-12 10:55:47 +0100
committerRobin Jarry <robin@jarry.cc>2023-03-13 23:35:48 +0100
commit49f58adda429c54225d79d13bfad7a054ae29db2 (patch)
tree316fb8eaa0b4c6dd32f610847db58473730ea8d4 /commands/msg
parent6ea08564041640a4d3552a9934e4317b1086fa9b (diff)
downloadaerc-49f58adda429c54225d79d13bfad7a054ae29db2.tar.gz
openers: add mime type handling for open-link
Provide a way to configure link openers. Based on the URL mime type: x-scheme-handler/$scheme. Signed-off-by: Kirill Chibisov <contact@kchibisov.com> Signed-off-by: Robin Jarry <robin@jarry.cc> Tested-by: Bence Ferdinandy <bence@ferdinandy.com>
Diffstat (limited to 'commands/msg')
-rw-r--r--commands/msg/unsubscribe.go3
1 files changed, 2 insertions, 1 deletions
diff --git a/commands/msg/unsubscribe.go b/commands/msg/unsubscribe.go
index 46ff5d1f..5fce7ece 100644
--- a/commands/msg/unsubscribe.go
+++ b/commands/msg/unsubscribe.go
@@ -175,7 +175,8 @@ func unsubscribeHTTP(aerc *widgets.Aerc, u *url.URL) error {
case "Yes":
go func() {
defer log.PanicHandler()
- if err := lib.XDGOpen(u.String()); err != nil {
+ mime := fmt.Sprintf("x-scheme-handler/%s", u.Scheme)
+ if err := lib.XDGOpenMime(u.String(), mime, nil); err != nil {
aerc.PushError("Unsubscribe:" + err.Error())
}
}()