Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F3714503
D11382.id38306.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
6 KB
Referenced Files
None
Subscribers
None
D11382.id38306.diff
View Options
diff --git a/keyserver/src/updaters/relationship-updaters.js b/keyserver/src/updaters/relationship-updaters.js
--- a/keyserver/src/updaters/relationship-updaters.js
+++ b/keyserver/src/updaters/relationship-updaters.js
@@ -88,7 +88,7 @@
const status = undirectedStatus.FRIEND;
undirectedInsertRows.push({ user1, user2, status });
messageDatas.push({
- type: messageTypes.UPDATE_RELATIONSHIP,
+ type: messageTypes.LEGACY_UPDATE_RELATIONSHIP,
threadID: threadIDPerUser[userID],
creatorID: viewer.userID,
targetID: userID,
@@ -99,7 +99,7 @@
const status = directedStatus.PENDING_FRIEND;
directedInsertRows.push([viewer.userID, userID, status]);
messageDatas.push({
- type: messageTypes.UPDATE_RELATIONSHIP,
+ type: messageTypes.LEGACY_UPDATE_RELATIONSHIP,
threadID: threadIDPerUser[userID],
creatorID: viewer.userID,
targetID: userID,
diff --git a/lib/shared/message-utils.test.js b/lib/shared/message-utils.test.js
--- a/lib/shared/message-utils.test.js
+++ b/lib/shared/message-utils.test.js
@@ -155,7 +155,7 @@
id: '1',
};
const updateRelationshipMessageInfo: RawUpdateRelationshipMessageInfo = {
- type: messageTypes.UPDATE_RELATIONSHIP,
+ type: messageTypes.LEGACY_UPDATE_RELATIONSHIP,
threadID: '10000',
creatorID: '123',
targetID: '456',
@@ -420,7 +420,7 @@
});
it('should return false for RawUpdateRelationshipMessageInfo', () => {
- const messageSpec = messageSpecs[messageTypes.UPDATE_RELATIONSHIP];
+ const messageSpec = messageSpecs[messageTypes.LEGACY_UPDATE_RELATIONSHIP];
const shouldBeInvalidSidebarSource = isInvalidSidebarSource(
updateRelationshipMessageInfo,
@@ -653,7 +653,7 @@
});
it('should return false for RawUpdateRelationshipMessageInfo', () => {
- const messageSpec = messageSpecs[messageTypes.UPDATE_RELATIONSHIP];
+ const messageSpec = messageSpecs[messageTypes.LEGACY_UPDATE_RELATIONSHIP];
const shouldBeInvalidPinSource = isInvalidPinSource(
updateRelationshipMessageInfo,
diff --git a/lib/shared/messages/message-specs.js b/lib/shared/messages/message-specs.js
--- a/lib/shared/messages/message-specs.js
+++ b/lib/shared/messages/message-specs.js
@@ -46,7 +46,7 @@
[messageTypes.UNSUPPORTED]: unsupportedMessageSpec,
[messageTypes.IMAGES]: multimediaMessageSpec,
[messageTypes.MULTIMEDIA]: multimediaMessageSpec,
- [messageTypes.UPDATE_RELATIONSHIP]: updateRelationshipMessageSpec,
+ [messageTypes.LEGACY_UPDATE_RELATIONSHIP]: updateRelationshipMessageSpec,
[messageTypes.SIDEBAR_SOURCE]: sidebarSourceMessageSpec,
[messageTypes.CREATE_SIDEBAR]: createSidebarMessageSpec,
[messageTypes.REACTION]: reactionMessageSpec,
diff --git a/lib/shared/messages/update-relationship-message-spec.js b/lib/shared/messages/update-relationship-message-spec.js
--- a/lib/shared/messages/update-relationship-message-spec.js
+++ b/lib/shared/messages/update-relationship-message-spec.js
@@ -57,7 +57,7 @@
): RawUpdateRelationshipMessageInfo {
const content = JSON.parse(row.content);
return {
- type: messageTypes.UPDATE_RELATIONSHIP,
+ type: messageTypes.LEGACY_UPDATE_RELATIONSHIP,
id: row.id.toString(),
threadID: row.threadID.toString(),
time: row.time,
@@ -78,7 +78,7 @@
const content = JSON.parse(clientDBMessageInfo.content);
const rawUpdateRelationshipMessageInfo: RawUpdateRelationshipMessageInfo =
{
- type: messageTypes.UPDATE_RELATIONSHIP,
+ type: messageTypes.LEGACY_UPDATE_RELATIONSHIP,
id: clientDBMessageInfo.id,
threadID: clientDBMessageInfo.thread,
time: parseInt(clientDBMessageInfo.time),
@@ -101,7 +101,7 @@
return null;
}
return {
- type: messageTypes.UPDATE_RELATIONSHIP,
+ type: messageTypes.LEGACY_UPDATE_RELATIONSHIP,
id: rawMessageInfo.id,
threadID: rawMessageInfo.threadID,
creator,
diff --git a/lib/shared/unshim-utils.js b/lib/shared/unshim-utils.js
--- a/lib/shared/unshim-utils.js
+++ b/lib/shared/unshim-utils.js
@@ -38,7 +38,7 @@
const localUnshimTypes = new Set([
messageTypes.IMAGES,
- messageTypes.UPDATE_RELATIONSHIP,
+ messageTypes.LEGACY_UPDATE_RELATIONSHIP,
messageTypes.CREATE_SIDEBAR,
messageTypes.SIDEBAR_SOURCE,
messageTypes.MULTIMEDIA,
diff --git a/lib/types/message-types-enum.js b/lib/types/message-types-enum.js
--- a/lib/types/message-types-enum.js
+++ b/lib/types/message-types-enum.js
@@ -27,7 +27,7 @@
UNSUPPORTED: 13,
IMAGES: 14,
MULTIMEDIA: 15,
- UPDATE_RELATIONSHIP: 16,
+ LEGACY_UPDATE_RELATIONSHIP: 16,
SIDEBAR_SOURCE: 17,
// Appears in the newly created sidebar
CREATE_SIDEBAR: 18,
diff --git a/lib/types/messages/update-relationship.js b/lib/types/messages/update-relationship.js
--- a/lib/types/messages/update-relationship.js
+++ b/lib/types/messages/update-relationship.js
@@ -22,7 +22,7 @@
export const rawUpdateRelationshipMessageInfoValidator: TInterface<RawUpdateRelationshipMessageInfo> =
tShape<RawUpdateRelationshipMessageInfo>({
- type: tNumber(messageTypes.UPDATE_RELATIONSHIP),
+ type: tNumber(messageTypes.LEGACY_UPDATE_RELATIONSHIP),
threadID: tID,
creatorID: t.String,
targetID: t.String,
diff --git a/lib/types/validation.test.js b/lib/types/validation.test.js
--- a/lib/types/validation.test.js
+++ b/lib/types/validation.test.js
@@ -240,7 +240,7 @@
id: '92771',
},
{
- type: messageTypes.UPDATE_RELATIONSHIP,
+ type: messageTypes.LEGACY_UPDATE_RELATIONSHIP,
threadID: '92796',
creatorID: '83928',
targetID: '83853',
diff --git a/lib/utils/message-ops-utils.test.js b/lib/utils/message-ops-utils.test.js
--- a/lib/utils/message-ops-utils.test.js
+++ b/lib/utils/message-ops-utils.test.js
@@ -318,7 +318,7 @@
).toStrictEqual(localRawImagesMessageInfo);
});
-test('UPDATE_RELATIONSHIP: rawMessageInfo -> clientDBMessageInfo -> rawMessageInfo', () => {
+test('LEGACY_UPDATE_RELATIONSHIP: rawMessageInfo -> clientDBMessageInfo -> rawMessageInfo', () => {
const rawUpdateRelationshipMessageInfo: RawUpdateRelationshipMessageInfo = {
type: 16,
id: '85651',
diff --git a/native/redux/persist.js b/native/redux/persist.js
--- a/native/redux/persist.js
+++ b/native/redux/persist.js
@@ -317,7 +317,7 @@
[20]: (state: AppState) => ({
...state,
messageStore: DEPRECATED_unshimMessageStore(state.messageStore, [
- messageTypes.UPDATE_RELATIONSHIP,
+ messageTypes.LEGACY_UPDATE_RELATIONSHIP,
]),
}),
[21]: (state: AppState) => ({
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Thu, Jan 9, 8:29 AM (9 h, 30 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2830813
Default Alt Text
D11382.id38306.diff (6 KB)
Attached To
Mode
D11382: [lib] Rename `UPDATE_RELATIONSHIP` message type to `LEGACY_UPDATE...`
Attached
Detach File
Event Timeline
Log In to Comment