Drop chat_message.created notifications
This commit is contained in:
parent
c889ece788
commit
3a7f27b5bf
4 changed files with 11 additions and 3 deletions
|
@ -92,6 +92,7 @@ const updateNotificationsQueue = (notification: APIEntity, intlMessages: Record<
|
|||
(dispatch: AppDispatch, getState: () => RootState) => {
|
||||
if (!notification.type) return; // drop invalid notifications
|
||||
if (notification.type === 'pleroma:chat_mention') return; // Drop chat notifications, handle them per-chat
|
||||
if (notification.type === 'chat_message.created') return; // Drop Truth Social chat notifications.
|
||||
|
||||
const showAlert = getSettings(getState()).getIn(['notifications', 'alerts', notification.type]);
|
||||
const filters = getFilters(getState(), { contextType: 'notifications' });
|
||||
|
|
|
@ -151,7 +151,14 @@ const connectTimelineStream = (
|
|||
// break;
|
||||
case 'notification':
|
||||
messages[locale]().then(messages => {
|
||||
dispatch(updateNotificationsQueue(JSON.parse(data.payload), messages, locale, window.location.pathname));
|
||||
dispatch(
|
||||
updateNotificationsQueue(
|
||||
JSON.parse(data.payload),
|
||||
messages,
|
||||
locale,
|
||||
window.location.pathname,
|
||||
),
|
||||
);
|
||||
}).catch(error => {
|
||||
console.error(error);
|
||||
});
|
||||
|
|
|
@ -39,7 +39,7 @@ const messages = defineMessages({
|
|||
autoDelete30Days: { id: 'chat_settings.auto_delete.30days', defaultMessage: '30 days' },
|
||||
autoDelete90Days: { id: 'chat_settings.auto_delete.90days', defaultMessage: '90 days' },
|
||||
autoDeleteMessage: { id: 'chat_window.auto_delete_label', defaultMessage: 'Auto-delete after {day} days' },
|
||||
autoDeleteMessageTooltip: { id: 'chat_window.auto_delete_tooltip', defaultMessage: 'Chat messages are set to auto-delete after {day} days days upon sending.' },
|
||||
autoDeleteMessageTooltip: { id: 'chat_window.auto_delete_tooltip', defaultMessage: 'Chat messages are set to auto-delete after {day} days upon sending.' },
|
||||
});
|
||||
|
||||
const ChatPageMain = () => {
|
||||
|
|
|
@ -14,7 +14,7 @@ import ChatSettings from './chat-settings';
|
|||
|
||||
const messages = defineMessages({
|
||||
autoDeleteMessage: { id: 'chat_window.auto_delete_label', defaultMessage: 'Auto-delete after {day} days' },
|
||||
autoDeleteMessageTooltip: { id: 'chat_window.auto_delete_tooltip', defaultMessage: 'Chat messages are set to auto-delete after {day} days days upon sending.' },
|
||||
autoDeleteMessageTooltip: { id: 'chat_window.auto_delete_tooltip', defaultMessage: 'Chat messages are set to auto-delete after {day} days upon sending.' },
|
||||
});
|
||||
|
||||
const LinkWrapper = ({ enabled, to, children }: { enabled: boolean, to: string, children: React.ReactNode }): JSX.Element => {
|
||||
|
|
Loading…
Reference in a new issue