|
|
@ -14,13 +14,14 @@ class SharesController < ApplicationController |
|
|
|
private |
|
|
|
private |
|
|
|
|
|
|
|
|
|
|
|
def initial_state_params |
|
|
|
def initial_state_params |
|
|
|
|
|
|
|
text = [params[:title], params[:text], params[:url]].compact.join(' ') |
|
|
|
{ |
|
|
|
{ |
|
|
|
settings: Web::Setting.find_by(user: current_user)&.data || {}, |
|
|
|
settings: Web::Setting.find_by(user: current_user)&.data || {}, |
|
|
|
push_subscription: current_account.user.web_push_subscription(current_session), |
|
|
|
push_subscription: current_account.user.web_push_subscription(current_session), |
|
|
|
current_account: current_account, |
|
|
|
current_account: current_account, |
|
|
|
token: current_session.token, |
|
|
|
token: current_session.token, |
|
|
|
admin: Account.find_local(Setting.site_contact_username), |
|
|
|
admin: Account.find_local(Setting.site_contact_username), |
|
|
|
text: params[:text], |
|
|
|
text: text, |
|
|
|
} |
|
|
|
} |
|
|
|
end |
|
|
|
end |
|
|
|
|
|
|
|
|
|
|
|