From cf218e41ef06bcc3051cf32e99b58335ca67c043 Mon Sep 17 00:00:00 2001 From: jon r Date: Tue, 12 Apr 2022 22:13:37 +0000 Subject: [PATCH 1/3] README Upstream changed the location of the document about the differences between the Pleroma and Mastodon APIs. --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 6068126d3..54aaae634 100644 --- a/README.md +++ b/README.md @@ -38,7 +38,7 @@ Soapbox FE is a [single-page application (SPA)](https://en.wikipedia.org/wiki/Si It has a single HTML file, `index.html`, responsible only for loading the required JavaScript and CSS. It interacts with the backend through [XMLHttpRequest (XHR)](https://developer.mozilla.org/en-US/docs/Web/API/XMLHttpRequest). -It incorporates much of the [Mastodon API](https://docs.joinmastodon.org/methods/) used by Pleroma and Mastodon, but requires many [Pleroma-specific features](https://docs-develop.pleroma.social/backend/API/differences_in_mastoapi_responses/) in order to function. +It incorporates much of the [Mastodon API](https://docs.joinmastodon.org/methods/) used by Pleroma and Mastodon, but requires many [Pleroma-specific features](https://docs.pleroma.social/backend/development/API/differences_in_mastoapi_responses/) in order to function. # Running locally From 0b3509b5bde2bec2a36b9cbf42b6022201d637be Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?marcin=20miko=C5=82ajczak?= Date: Thu, 14 Apr 2022 22:08:53 +0200 Subject: [PATCH 2/3] Support 'status' notification type MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: marcin mikołajczak --- app/soapbox/actions/notifications.js | 4 +- .../notifications/components/filter_bar.js | 7 ++++ .../notifications/components/notification.js | 37 +++++++++++++++++++ app/soapbox/locales/pl.json | 2 + app/soapbox/reducers/notifications.js | 2 +- 5 files changed, 49 insertions(+), 3 deletions(-) diff --git a/app/soapbox/actions/notifications.js b/app/soapbox/actions/notifications.js index a4331bf8c..9ecf61687 100644 --- a/app/soapbox/actions/notifications.js +++ b/app/soapbox/actions/notifications.js @@ -98,7 +98,7 @@ export function updateNotificationsQueue(notification, intlMessages, intlLocale, const isOnNotificationsPage = curPath === '/notifications'; - if (notification.type === 'mention') { + if (['mention', 'status'].includes(notification.type)) { const regex = regexFromFilters(filters); const searchIndex = notification.status.spoiler_text + '\n' + unescapeHTML(notification.status.content); filtered = regex && regex.test(searchIndex); @@ -170,7 +170,7 @@ export function dequeueNotifications() { const excludeTypesFromSettings = getState => getSettings(getState()).getIn(['notifications', 'shows']).filter(enabled => !enabled).keySeq().toJS(); const excludeTypesFromFilter = filter => { - const allTypes = ImmutableList(['follow', 'follow_request', 'favourite', 'reblog', 'mention', 'poll', 'move', 'pleroma:emoji_reaction']); + const allTypes = ImmutableList(['follow', 'follow_request', 'favourite', 'reblog', 'mention', 'status', 'poll', 'move', 'pleroma:emoji_reaction']); return allTypes.filterNot(item => item === filter).toJS(); }; diff --git a/app/soapbox/features/notifications/components/filter_bar.js b/app/soapbox/features/notifications/components/filter_bar.js index a95574036..dfc656279 100644 --- a/app/soapbox/features/notifications/components/filter_bar.js +++ b/app/soapbox/features/notifications/components/filter_bar.js @@ -14,6 +14,7 @@ const messages = defineMessages({ follows: { id: 'notifications.filter.follows', defaultMessage: 'Follows' }, moves: { id: 'notifications.filter.moves', defaultMessage: 'Moves' }, emoji_reacts: { id: 'notifications.filter.emoji_reacts', defaultMessage: 'Emoji reacts' }, + statuses: { id: 'notifications.filter.statuses', defaultMessage: 'Updates from people you follow' }, }); export default @injectIntl @@ -79,6 +80,12 @@ class NotificationFilterBar extends React.PureComponent { action: this.onClick('poll'), name: 'poll', }); + items.push({ + text: , + title: intl.formatMessage(messages.statuses), + action: this.onClick('status'), + name: 'status', + }); items.push({ text: , title: intl.formatMessage(messages.follows), diff --git a/app/soapbox/features/notifications/components/notification.js b/app/soapbox/features/notifications/components/notification.js index b3475e1b8..db4685a1e 100644 --- a/app/soapbox/features/notifications/components/notification.js +++ b/app/soapbox/features/notifications/components/notification.js @@ -325,6 +325,41 @@ class Notification extends ImmutablePureComponent { ); } + renderStatus(notification) { + const { intl } = this.props; + + const account = notification.get('account'); + const link = this.renderLink(account); + + return ( + +
+
+
+ +
+ + + + +
+ +
+
+ ); + } + renderPoll(notification) { const { intl } = this.props; @@ -398,6 +433,8 @@ class Notification extends ImmutablePureComponent { return this.renderFavourite(notification); case 'reblog': return this.renderReblog(notification); + case 'status': + return this.renderStatus(notification); case 'poll': return this.renderPoll(notification); case 'move': diff --git a/app/soapbox/locales/pl.json b/app/soapbox/locales/pl.json index 51b349541..2ab4dd79c 100644 --- a/app/soapbox/locales/pl.json +++ b/app/soapbox/locales/pl.json @@ -669,6 +669,7 @@ "notification.pleroma:emoji_reaction": "{name} zareagował(a) na Twój wpis", "notification.poll": "Głosowanie w którym brałeś(-aś) udział zakończyła się", "notification.reblog": "{name} podbił(a) Twój wpis", + "notification.status": "{name} właśnie opublikował(a) wpis", "notifications.clear": "Wyczyść powiadomienia", "notifications.clear_confirmation": "Czy na pewno chcesz bezpowrotnie usunąć wszystkie powiadomienia?", "notifications.clear_heading": "Wyczyść powiadomienia", @@ -700,6 +701,7 @@ "notifications.filter.mentions": "Wspomienia", "notifications.filter.moves": "Przenoszone konta", "notifications.filter.polls": "Wyniki głosowania", + "notifications.filter.statuses": "Nowe wpisy osób, które subskrybujesz", "notifications.group": "{count, number} {count, plural, one {powiadomienie} few {powiadomienia} many {powiadomień} more {powiadomień}}", "notifications.queue_label": "Naciśnij aby zobaczyć {count} {count, plural, one {nowe powiadomienie} few {nowe powiadomienia} many {nowych powiadomień} other {nowe powiadomienia}}", "password_reset.confirmation": "Sprawdź swoją pocztę e-mail, aby potwierdzić.", diff --git a/app/soapbox/reducers/notifications.js b/app/soapbox/reducers/notifications.js index fad2563c3..faade6a82 100644 --- a/app/soapbox/reducers/notifications.js +++ b/app/soapbox/reducers/notifications.js @@ -73,7 +73,7 @@ const isValid = notification => { } // Mastodon can return status notifications with a null status - if (['mention', 'reblog', 'favourite', 'poll'].includes(notification.type) && !notification.status.id) { + if (['mention', 'reblog', 'favourite', 'poll', 'status'].includes(notification.type) && !notification.status.id) { return false; } From 7e208a0e991977a32601d7ec06595c623de21118 Mon Sep 17 00:00:00 2001 From: Alex Gleason Date: Sun, 17 Apr 2022 18:57:22 -0500 Subject: [PATCH 3/3] Add FUNDING.yml --- FUNDING.yml | 4 ++++ 1 file changed, 4 insertions(+) create mode 100644 FUNDING.yml diff --git a/FUNDING.yml b/FUNDING.yml new file mode 100644 index 000000000..208108ff7 --- /dev/null +++ b/FUNDING.yml @@ -0,0 +1,4 @@ +# https://github.blog/2020-03-24-getting-started-with-github-sponsors/ + +github: soapbox-pub +custom: https://soapbox.pub/donate/