Skip to content

Commit

Permalink
Install web+diaspora:// handler only when the user is logged in
Browse files Browse the repository at this point in the history
  • Loading branch information
SuperTux88 committed Jul 12, 2018
1 parent ea15403 commit e35b987
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/assets/javascripts/protocol-handler.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,6 @@ function registerDiasporaLinksProtocol() {
window.navigator.registerProtocolHandler("web+diaspora", host.concat("/link?q=%s"), document.title);
}

if (typeof (window.navigator.registerProtocolHandler) === "function") {
if (typeof (window.navigator.registerProtocolHandler) === "function" && window.gon.user) {
registerDiasporaLinksProtocol();
}

0 comments on commit e35b987

Please sign in to comment.