Page MenuHomePhabricator

D11455.id38798.diff
No OneTemporary

D11455.id38798.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
Sun, Nov 24, 11:27 AM (20 h, 26 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2575019
Default Alt Text
D11455.id38798.diff (1 KB)

Event Timeline