Page MenuHomePhabricator

D11455.diff
No OneTemporary

D11455.diff

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
@@ -88,15 +88,19 @@
rawMessageInfoFromClientDB(
clientDBMessageInfo: ClientDBMessageInfo,
- ): RawLegacyUpdateRelationshipMessageInfo {
+ ):
+ | RawLegacyUpdateRelationshipMessageInfo
+ | RawUpdateRelationshipMessageInfo {
invariant(
clientDBMessageInfo.content !== undefined &&
clientDBMessageInfo.content !== null,
'content must be defined for UpdateRelationship',
);
const content = JSON.parse(clientDBMessageInfo.content);
- const rawUpdateRelationshipMessageInfo: RawLegacyUpdateRelationshipMessageInfo =
- {
+
+ const messageType = parseInt(clientDBMessageInfo.type);
+ if (messageType === messageTypes.LEGACY_UPDATE_RELATIONSHIP) {
+ return {
type: messageTypes.LEGACY_UPDATE_RELATIONSHIP,
id: clientDBMessageInfo.id,
threadID: clientDBMessageInfo.thread,
@@ -105,7 +109,17 @@
targetID: content.targetID,
operation: content.operation,
};
- return rawUpdateRelationshipMessageInfo;
+ } else {
+ return {
+ type: messageTypes.UPDATE_RELATIONSHIP,
+ id: clientDBMessageInfo.id,
+ threadID: clientDBMessageInfo.thread,
+ time: parseInt(clientDBMessageInfo.time),
+ creatorID: clientDBMessageInfo.user,
+ targetID: content.targetID,
+ operation: content.operation,
+ };
+ }
},
createMessageInfo(

File Metadata

Mime Type
text/plain
Expires
Thu, Nov 28, 1:06 AM (21 h, 8 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2592251
Default Alt Text
D11455.diff (1 KB)

Event Timeline