From efec2db859c803e180f143b26ed439d810cb8764 Mon Sep 17 00:00:00 2001 From: Rafael dos Santos Silva Date: Fri, 7 Dec 2018 13:48:09 -0200 Subject: [PATCH] FEATURE: Web Share Target Support This adds a **very basic** support for share to Discourse. Currently, this is only supported in Android + Chrome 71+. After installing a Discourse site to the Home Screen, you will be able to share from anywhere in the OS to the Discourse site. Discourse will use the title and text from the share event. --- app/controllers/metadata_controller.rb | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/app/controllers/metadata_controller.rb b/app/controllers/metadata_controller.rb index dacba4dbd7b..bbe977b3fd2 100644 --- a/app/controllers/metadata_controller.rb +++ b/app/controllers/metadata_controller.rb @@ -37,7 +37,14 @@ class MetadataController < ApplicationController sizes: file_info[:size], type: file_info[:type] } - ] + ], + share_target: { + action: "/new-topic", + params: { + title: "title", + text: "body" + } + } } manifest[:short_name] = SiteSetting.short_title if SiteSetting.short_title.present?