*target* content type exploration #8
Replies: 4 comments 21 replies
-
@killthebuddh4 This is awesome, and thanks for proposing this! This kind of thing is a solid foundation on which to build other types like Reply, Reactions, deletions, etc.
"Target" would be a more universal way of stating a relationship or intent with another message object. Using "Parent" and "Child" would imply a hierarchical relationship, which may be limiting. For instance, what if there was an "update" type of message…which would target an older message, and "update" it with new information. In that case—which is the parent, and which is the child?
This would be a great question for @mkobetic
If composite works with target, then perhaps multiple targets wouldn't be necessary to include in the type primitive, and one could just use a composite. |
Beta Was this translation helpful? Give feedback.
-
@galligan, I think that's a good point about avoiding a necessarily hierarchical relationship between messages. @saulmc, Nick, and I had a brief conversation earlier and may have come up with a name that satisfies each of the constraints: MessagePointer. We considered the name "Pointer" as well, but Nick brought up the concern that there could be a use-case for pointers to non-message objects, and we might want to make the use-case for this particular content type more specific. What do you think? |
Beta Was this translation helpful? Give feedback.
-
I'm probably missing some parts of the picture, but I feel that the target type as proposed is a bit too abstract. What are the various examples that we'd want to use it for? Do all those examples want the same content structure or would they be better off with different, more specific content types? |
Beta Was this translation helpful? Give feedback.
-
my two cents on terminology: if the desire is to both avoid hierarchy and have a more universal implementation, going with something simple like interface Related {
relatedMessageId: string;
payload: Payload;
} per @killthebuddh4 original post, i do think that allowing for multiple related/target messages will be desirable, but this might get tricky without a merkle or something similar to guarantee data integrity? |
Beta Was this translation helpful? Give feedback.
-
Given this prior discussion, the target content type seems to be a good opportunity for the community to work out its first potential XRC. The target content type is essentially a message with a bipartite payload: a reference to another message + a nested payload. So in TypeScript, for example, we'd have a message payload whose type is something like this:
A few notes/questions to get things started:
targetMessageId
as the "Target" or "Parent" rather than the message that includes the reference. Along these lines a name like "Child" might work?Composite
codec support a "Target" content type implementation out of the box? The particular case I'm wondering about is:[Text, Composite, Target]
Target
message. TheTarget
message's payload is encoded with some other content type, sayOtherType
.I'm sure there's plenty of details I've missed or haven't included, thoughts anyone?
Beta Was this translation helpful? Give feedback.
All reactions