Page MenuHomePhorge

D15040.1765039158.diff
No OneTemporary

Size
1 KB
Referenced Files
None
Subscribers
None

D15040.1765039158.diff

diff --git a/lib/shared/dm-ops/change-thread-settings-spec.js b/lib/shared/dm-ops/change-thread-settings-spec.js
--- a/lib/shared/dm-ops/change-thread-settings-spec.js
+++ b/lib/shared/dm-ops/change-thread-settings-spec.js
@@ -15,10 +15,7 @@
import type { RawMessageInfo } from '../../types/message-types';
import { messageTypes } from '../../types/message-types-enum.js';
import type { ChangeSettingsMessageData } from '../../types/messages/change-settings.js';
-import type {
- RawThreadInfo,
- ThickRawThreadInfo,
-} from '../../types/minimally-encoded-thread-permissions-types.js';
+import type { RawThreadInfo } from '../../types/minimally-encoded-thread-permissions-types.js';
import { updateTypes } from '../../types/update-types-enum.js';
import type { ClientUpdateInfo } from '../../types/update-types.js';
import { blobHashFromBlobServiceURI } from '../../utils/blob-service.js';
@@ -74,7 +71,10 @@
} = {};
const { avatar: avatarObject, ...rest } = threadInfoUpdate;
- let normalizedThreadInfoUpdate;
+ let normalizedThreadInfoUpdate: {
+ ...DMThreadSettingsChanges,
+ +avatar?: string,
+ };
if (avatarObject) {
normalizedThreadInfoUpdate = {
...rest,
@@ -89,6 +89,9 @@
Object.keys(normalizedThreadInfoUpdate).forEach(fieldName => {
const value = normalizedThreadInfoUpdate[fieldName];
+ if (value === undefined) {
+ return;
+ }
const messageData: ChangeSettingsMessageData = {
type: messageTypes.CHANGE_SETTINGS,
threadID,
@@ -155,7 +158,7 @@
({ rawMessageInfo }) => rawMessageInfo,
);
- let threadInfoToUpdate: ThickRawThreadInfo = threadInfo;
+ let threadInfoToUpdate = { ...threadInfo };
Object.keys(threadInfoUpdate).forEach(fieldName => {
const timestamp = threadInfoToUpdate.timestamps[fieldName];
if (timestamp < time) {

File Metadata

Mime Type
text/plain
Expires
Sat, Dec 6, 4:39 PM (18 h, 29 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
5839644
Default Alt Text
D15040.1765039158.diff (1 KB)

Event Timeline