Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F32221580
D6936.1765198695.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Size
2 KB
Referenced Files
None
Subscribers
None
D6936.1765198695.diff
View Options
diff --git a/keyserver/src/push/send.js b/keyserver/src/push/send.js
--- a/keyserver/src/push/send.js
+++ b/keyserver/src/push/send.js
@@ -166,6 +166,9 @@
notifTargetUserInfo,
getENSNames,
);
+ if (!notifTexts) {
+ continue;
+ }
const dbID = dbIDs.shift();
invariant(dbID, 'should have sufficient DB IDs');
diff --git a/lib/shared/messages/message-spec.js b/lib/shared/messages/message-spec.js
--- a/lib/shared/messages/message-spec.js
+++ b/lib/shared/messages/message-spec.js
@@ -47,7 +47,7 @@
+notificationTexts: (
messageInfos: $ReadOnlyArray<MessageInfo>,
threadInfo: ThreadInfo,
- ) => Promise<NotifTexts>,
+ ) => Promise<?NotifTexts>,
+notifTargetUserInfo: UserInfo,
};
@@ -99,7 +99,7 @@
messageInfos: $ReadOnlyArray<MessageInfo>,
threadInfo: ThreadInfo,
params: NotificationTextsParams,
- ) => Promise<NotifTexts>,
+ ) => Promise<?NotifTexts>,
+notificationCollapseKey?: (
rawMessageInfo: RawInfo,
messageData: Data,
diff --git a/lib/shared/notif-utils.js b/lib/shared/notif-utils.js
--- a/lib/shared/notif-utils.js
+++ b/lib/shared/notif-utils.js
@@ -32,13 +32,16 @@
threadInfo: ThreadInfo,
notifTargetUserInfo: UserInfo,
getENSNames: ?GetENSNames,
-): Promise<ResolvedNotifTexts> {
+): Promise<?ResolvedNotifTexts> {
const fullNotifTexts = await fullNotifTextsForMessageInfo(
messageInfos,
threadInfo,
notifTargetUserInfo,
getENSNames,
);
+ if (!fullNotifTexts) {
+ return fullNotifTexts;
+ }
const merged = trimText(fullNotifTexts.merged, 300);
const body = trimText(fullNotifTexts.body, 300);
const title = trimText(fullNotifTexts.title, 100);
@@ -147,7 +150,7 @@
threadInfo: ThreadInfo,
notifTargetUserInfo: UserInfo,
getENSNames: ?GetENSNames,
-): Promise<ResolvedNotifTexts> {
+): Promise<?ResolvedNotifTexts> {
const mostRecentType = mostRecentMessageInfoType(messageInfos);
const messageSpec = messageSpecs[mostRecentType];
invariant(
@@ -169,6 +172,9 @@
threadInfo,
{ notifTargetUserInfo, notificationTexts: innerNotificationTexts },
);
+ if (!unresolvedNotifTexts) {
+ return unresolvedNotifTexts;
+ }
const resolveToString = async (
entityText: string | EntityText,
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Mon, Dec 8, 12:58 PM (7 h, 46 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
5848348
Default Alt Text
D6936.1765198695.diff (2 KB)
Attached To
Mode
D6936: [keyserver][lib] Allow notificationTexts to return null
Attached
Detach File
Event Timeline
Log In to Comment