Forum Discussion

safikhan's avatar
3 years ago

Image attachment is a message_type = message with unique conversation_id

Hi,

I came across how events are recorded and reported through Khoros API and was wondering if someone can help me answer couple of questions based on my exploratory work:

1) Why are images recorded as a separate event with their own stand alone unique conversation_id even when they are part of the same reply or initial post to start the thread (attached pics reflect it as an example)

2) How can we connect these image events back to original conversation_id or message_id they are actually linked with?

Looking forward to your feedback! Any help understanding this will be highly appreciated. 

CC: tyw 

    • Claudius's avatar
      Claudius
      Boss

      The examples of media uploads I found in my data so far are actually avatar uploads, so they are not tied to a message id. They will all land in the user's media album though which is what explains why they are registered as a "publish" event. I agree though that it is confusing that it's a "message.publish" event and not a "media.publish" event. 

      • Claudius's avatar
        Claudius
        Boss

        After further digging into the depths of the Bulk Data API it looks to me like there is indeed no event triggered that would help you establish the relationship between media and - if and where - it is being used within a conversation topic.

        The message.publish events you found for media uploads seem to be triggered either during the avatar upload flow or on the post message page (e.g. while the message editor is opened and the "upload media" feature of the rich text editor is being used). But there is no event listed on bulk data event list that ties the media on post creation to the actual message.

        An alternative to obtain which message(s) an image is being used in would be to use API v2 and a LiQL query like:

        SELECT id FROM images WHERE messages.id ='187'

        See the LiQL reference for the 'images' collection