Cloudron makes it easy to run web apps like WordPress, Nextcloud, GitLab on your server. Find out more or install now.


    Cloudron Forum

    • Register
    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular

    Mastodon RSS : what is "contentSnippet"?

    Mastodon
    2
    4
    296
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • timconsidine
      timconsidine App Dev last edited by timconsidine

      I have an RSS feed from mastodon
      The json included both content and contentSnippet.
      I can't find documentation about how they differ.

      Guessing the contentSnippet is the 1st xx chars of content.
      But what is xx ?

      Or is contentSnippet the full but non-html version of content ? I guess this may be a question about the RSS feed rather than Mastodon, but checking here first.

      timconsidine 1 Reply Last reply Reply Quote 0
      • timconsidine
        timconsidine App Dev @timconsidine last edited by

        @timconsidine test of a 500 character toot suggests contentSnippet is just the non-html version of content.

        In case that helps anyone, and in anyone wants to dispute that!

        robi 1 Reply Last reply Reply Quote 3
        • robi
          robi @timconsidine last edited by

          @timconsidine you already did what I'd have suggested, testing and seeing what was given.

          What happens if it's just an image or video with no text?

          Life of Advanced Technology

          timconsidine 1 Reply Last reply Reply Quote 1
          • timconsidine
            timconsidine App Dev @robi last edited by

            @robi hmmm, that's a good question.
            I was under the impression that some text is mandatory.
            But having tried it, Mastodon certainly allows it.
            And the RSS feed looks like this :

            {
            "title": "xxxxxxx: “”",
            "link": "https://xxxxxxxxxxxx",
            "pubDate": "Sun, 26 Sep 2021 19:56:22 +0000",
            "enclosure": {
            "url": "https://xxxxxxxxx.png",
            "length": "14690",
            "type": "image/png"
            },
            "content": "",
            "contentSnippet": "",
            "guid": "https://xxxxxxx",
            "isoDate": "2021-09-26T19:56:22.000Z"
            },
            

            So it works.
            Although my n8n workflow to crosspost to Twitter would likely break, but I will try that later when I'm feeling braver.

            1 Reply Last reply Reply Quote 2
            • First post
              Last post
            Powered by NodeBB