diff --git a/app/soapbox/features/account/components/header.js b/app/soapbox/features/account/components/header.js
index dbd57cb91..e023564f7 100644
--- a/app/soapbox/features/account/components/header.js
+++ b/app/soapbox/features/account/components/header.js
@@ -292,19 +292,16 @@ class Header extends ImmutablePureComponent {
}
- {
- me &&
-
-
- {account.get('id') !== me && account.getIn(['pleroma', 'accepts_chat_messages'], false) === true &&
-
- }
-
-
- }
+
+
+ {me && account.get('id') !== me && account.getIn(['pleroma', 'accepts_chat_messages'], false) === true &&
+
+ }
+ {me &&
}
+
diff --git a/app/soapbox/features/ui/components/action_button.js b/app/soapbox/features/ui/components/action_button.js
index b0b114ee6..47dfb30b1 100644
--- a/app/soapbox/features/ui/components/action_button.js
+++ b/app/soapbox/features/ui/components/action_button.js
@@ -16,6 +16,7 @@ import {
const messages = defineMessages({
unfollow: { id: 'account.unfollow', defaultMessage: 'Unfollow' },
follow: { id: 'account.follow', defaultMessage: 'Follow' },
+ remote_follow: { id: 'account.remote_follow', defaultMessage: 'Remote follow' },
requested: { id: 'account.requested', defaultMessage: 'Awaiting approval. Click to cancel follow request' },
requested_small: { id: 'account.requested_small', defaultMessage: 'Awaiting approval' },
unblock: { id: 'account.unblock', defaultMessage: 'Unblock @{name}' },
@@ -81,24 +82,42 @@ class ActionButton extends ImmutablePureComponent {
render() {
const { account, intl, me, small } = this.props;
- let actionBtn = null;
+ const empty = <>>;
- if (!account || !me) return actionBtn;
+ if (!me) {
+ // Remote follow
+ return ();
+ }
if (me !== account.get('id')) {
if (!account.get('relationship')) { // Wait until the relationship is loaded
- //
+ return empty;
} else if (account.getIn(['relationship', 'requested'])) {
- actionBtn = ;
+ // Awaiting acceptance
+ return ;
} else if (!account.getIn(['relationship', 'blocking'])) {
- actionBtn = ;
+ // Follow & Unfollow
+ return ();
} else if (account.getIn(['relationship', 'blocking'])) {
- actionBtn = ;
+ // Unblock
+ return ;
}
} else {
- actionBtn = ;
+ // Edit profile
+ return ;
}
- return actionBtn;
+ return empty;
}
}
diff --git a/app/soapbox/service_worker/entry.js b/app/soapbox/service_worker/entry.js
index 0cb11095c..db15c8b2f 100644
--- a/app/soapbox/service_worker/entry.js
+++ b/app/soapbox/service_worker/entry.js
@@ -65,7 +65,9 @@ self.addEventListener('fetch', function(event) {
url.pathname.startsWith('/avatars') ||
url.pathname.startsWith('/authorize_follow') ||
url.pathname.startsWith('/media_proxy') ||
- url.pathname.startsWith('/relationships')) {
+ url.pathname.startsWith('/relationships') ||
+ url.pathname.startsWith('/main/ostatus') ||
+ url.pathname.startsWith('/ostatus_subscribe')) {
//non-webapp routes
} else if (url.pathname.startsWith('/')) {
// : TODO : if is /web
diff --git a/webpack/development.js b/webpack/development.js
index cc3212536..7fbde09c7 100644
--- a/webpack/development.js
+++ b/webpack/development.js
@@ -22,6 +22,8 @@ const backendEndpoints = [
'/.well-known/webfinger',
'/static',
'/emoji',
+ '/main/ostatus',
+ '/ostatus_subscribe',
];
const makeProxyConfig = () => {