diff --git a/app/models/setting.rb b/app/models/setting.rb index c00152a..1d895b2 100644 --- a/app/models/setting.rb +++ b/app/models/setting.rb @@ -209,6 +209,6 @@ class Setting < RailsSettings::Base def self.default_services # TODO Make configurable from respective service settings page - %w[ discourse gitea mediawiki xmpp ] + %w[ discourse gitea mastodon mediawiki xmpp ] end end diff --git a/app/models/user.rb b/app/models/user.rb index 2169402..f0609a6 100644 --- a/app/models/user.rb +++ b/app/models/user.rb @@ -131,7 +131,7 @@ class User < ApplicationRecord def mastodon_address return nil unless Setting.mastodon_enabled? - "#{self.cn}@#{Setting.mastodon_address_domain}" + "#{self.cn.gsub("-", "_")}@#{Setting.mastodon_address_domain}" end def valid_attribute?(attribute_name) diff --git a/app/views/services/mastodon/show.html.erb b/app/views/services/mastodon/show.html.erb index 27a30e3..0e10c98 100644 --- a/app/views/services/mastodon/show.html.erb +++ b/app/views/services/mastodon/show.html.erb @@ -98,7 +98,17 @@ description: "The official Web app", icon_path: "/img/logos/icon_mastodon-2.svg", links: [ - ["Launch", "https://kosmos.social"] + ["Launch", "https://kosmos.social"], + ["GitHub", "https://github.com/mastodon/mastodon"] + ] + ) %> + <%= render AppInfoComponent.new( + name: "Phanpy", + description: " A slick, feature-rich Web app for mobile and desktop", + icon_path: "/img/logos/icon_phanpy.svg", + links: [ + ["Launch", "https://phanpy.social"], + ["GitHub", "https://github.com/cheeaun/phanpy"] ] ) %> <%= render AppInfoComponent.new( @@ -150,6 +160,15 @@ ["Google Play", "https://play.google.com/store/apps/details?id=org.joinmastodon.android.sk"] ] ) %> + <%= render AppInfoComponent.new( + name: "Phanpy", + description: " A slick, feature-rich Web app for mobile and desktop", + icon_path: "/img/logos/icon_phanpy.svg", + links: [ + ["Launch", "https://phanpy.social"], + ["GitHub", "https://github.com/cheeaun/phanpy"] + ] + ) %>