Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F32160936
D14345.1765042088.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Size
6 KB
Referenced Files
None
Subscribers
None
D14345.1765042088.diff
View Options
diff --git a/lib/shared/messages/add-members-message-spec.js b/lib/shared/messages/add-members-message-spec.js
--- a/lib/shared/messages/add-members-message-spec.js
+++ b/lib/shared/messages/add-members-message-spec.js
@@ -2,12 +2,13 @@
import invariant from 'invariant';
-import type {
- CreateMessageInfoParams,
- MessageSpec,
- NotificationTextsParams,
- MergeRobotextMessageItemResult,
- ShowInMessagePreviewParams,
+import {
+ type CreateMessageInfoParams,
+ type MessageSpec,
+ type NotificationTextsParams,
+ type MergeRobotextMessageItemResult,
+ type ShowInMessagePreviewParams,
+ messageNotifyTypes,
} from './message-spec.js';
import { joinResult } from './utils.js';
import type { RobotextChatMessageInfoItem } from '../../selectors/chat-selectors.js';
@@ -25,6 +26,7 @@
import type { ThreadInfo } from '../../types/minimally-encoded-thread-permissions-types.js';
import type { NotifTexts } from '../../types/notif-types.js';
import { threadTypeIsThick } from '../../types/thread-types-enum.js';
+import { threadIDIsThick } from '../../types/thread-types.js';
import type { RelativeUserInfo } from '../../types/user-types.js';
import {
type EntityText,
@@ -236,4 +238,9 @@
messageInfo: AddMembersMessageInfo | RawAddMembersMessageInfo,
params: ShowInMessagePreviewParams,
) => (threadTypeIsThick(params.threadInfo.type) ? messageInfo.time : null),
+
+ getMessageNotifyType: async (rawMessageInfo: RawAddMembersMessageInfo) =>
+ threadIDIsThick(rawMessageInfo.threadID)
+ ? messageNotifyTypes.SET_UNREAD
+ : messageNotifyTypes.NONE,
});
diff --git a/lib/shared/messages/join-thread-message-spec.js b/lib/shared/messages/join-thread-message-spec.js
--- a/lib/shared/messages/join-thread-message-spec.js
+++ b/lib/shared/messages/join-thread-message-spec.js
@@ -2,11 +2,12 @@
import invariant from 'invariant';
-import type {
- MessageSpec,
- RobotextParams,
- MergeRobotextMessageItemResult,
- ShowInMessagePreviewParams,
+import {
+ type MessageSpec,
+ type RobotextParams,
+ type MergeRobotextMessageItemResult,
+ type ShowInMessagePreviewParams,
+ messageNotifyTypes,
} from './message-spec.js';
import { joinResult } from './utils.js';
import type { RobotextChatMessageInfoItem } from '../../selectors/chat-selectors.js';
@@ -24,6 +25,7 @@
import type { ThreadInfo } from '../../types/minimally-encoded-thread-permissions-types.js';
import type { NotifTexts } from '../../types/notif-types.js';
import { threadTypeIsThick } from '../../types/thread-types-enum.js';
+import { threadIDIsThick } from '../../types/thread-types.js';
import type { RelativeUserInfo } from '../../types/user-types.js';
import {
type EntityText,
@@ -182,4 +184,9 @@
messageInfo: JoinThreadMessageInfo | RawJoinThreadMessageInfo,
params: ShowInMessagePreviewParams,
) => (threadTypeIsThick(params.threadInfo.type) ? messageInfo.time : null),
+
+ getMessageNotifyType: async (rawMessageInfo: RawJoinThreadMessageInfo) =>
+ threadIDIsThick(rawMessageInfo.threadID)
+ ? messageNotifyTypes.SET_UNREAD
+ : messageNotifyTypes.NONE,
});
diff --git a/lib/shared/messages/leave-thread-message-spec.js b/lib/shared/messages/leave-thread-message-spec.js
--- a/lib/shared/messages/leave-thread-message-spec.js
+++ b/lib/shared/messages/leave-thread-message-spec.js
@@ -2,11 +2,12 @@
import invariant from 'invariant';
-import type {
- MessageSpec,
- RobotextParams,
- MergeRobotextMessageItemResult,
- ShowInMessagePreviewParams,
+import {
+ type MessageSpec,
+ type RobotextParams,
+ type MergeRobotextMessageItemResult,
+ type ShowInMessagePreviewParams,
+ messageNotifyTypes,
} from './message-spec.js';
import { joinResult } from './utils.js';
import type { RobotextChatMessageInfoItem } from '../../selectors/chat-selectors.js';
@@ -24,6 +25,7 @@
import type { ThreadInfo } from '../../types/minimally-encoded-thread-permissions-types.js';
import type { NotifTexts } from '../../types/notif-types.js';
import { threadTypeIsThick } from '../../types/thread-types-enum.js';
+import { threadIDIsThick } from '../../types/thread-types.js';
import type { RelativeUserInfo } from '../../types/user-types.js';
import {
type EntityText,
@@ -182,4 +184,9 @@
messageInfo: LeaveThreadMessageInfo | RawLeaveThreadMessageInfo,
params: ShowInMessagePreviewParams,
) => (threadTypeIsThick(params.threadInfo.type) ? messageInfo.time : null),
+
+ getMessageNotifyType: async (rawMessageInfo: RawLeaveThreadMessageInfo) =>
+ threadIDIsThick(rawMessageInfo.threadID)
+ ? messageNotifyTypes.SET_UNREAD
+ : messageNotifyTypes.NONE,
});
diff --git a/lib/shared/messages/remove-members-message-spec.js b/lib/shared/messages/remove-members-message-spec.js
--- a/lib/shared/messages/remove-members-message-spec.js
+++ b/lib/shared/messages/remove-members-message-spec.js
@@ -2,12 +2,13 @@
import invariant from 'invariant';
-import type {
- CreateMessageInfoParams,
- MessageSpec,
- NotificationTextsParams,
- MergeRobotextMessageItemResult,
- ShowInMessagePreviewParams,
+import {
+ type CreateMessageInfoParams,
+ type MessageSpec,
+ type NotificationTextsParams,
+ type MergeRobotextMessageItemResult,
+ type ShowInMessagePreviewParams,
+ messageNotifyTypes,
} from './message-spec.js';
import { joinResult } from './utils.js';
import type { RobotextChatMessageInfoItem } from '../../selectors/chat-selectors.js';
@@ -25,6 +26,7 @@
import type { ThreadInfo } from '../../types/minimally-encoded-thread-permissions-types.js';
import type { NotifTexts } from '../../types/notif-types.js';
import { threadTypeIsThick } from '../../types/thread-types-enum.js';
+import { threadIDIsThick } from '../../types/thread-types.js';
import type { RelativeUserInfo } from '../../types/user-types.js';
import {
type EntityText,
@@ -242,5 +244,12 @@
messageInfo: RemoveMembersMessageInfo | RawRemoveMembersMessageInfo,
params: ShowInMessagePreviewParams,
) => (threadTypeIsThick(params.threadInfo.type) ? messageInfo.time : null),
+
+ getMessageNotifyType: async (
+ rawMessageInfo: RawRemoveMembersMessageInfo,
+ ) =>
+ threadIDIsThick(rawMessageInfo.threadID)
+ ? messageNotifyTypes.SET_UNREAD
+ : messageNotifyTypes.NONE,
},
);
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sat, Dec 6, 5:28 PM (19 h, 46 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
5839795
Default Alt Text
D14345.1765042088.diff (6 KB)
Attached To
Mode
D14345: [lib] Don't set thread to unread for membership robotext in thin threads
Attached
Detach File
Event Timeline
Log In to Comment