ActivityPub Viewer

A small tool to view real-world ActivityPub objects as JSON! Enter a URL or username from Mastodon or a similar service below, and we'll send a request with the right Accept header to the server to view the underlying object.

Open in browser →
{ "@context": [ "https://www.w3.org/ns/activitystreams", "https://w3id.org/security/v1", { "Hashtag": "as:Hashtag", "sensitive": "as:sensitive", "manuallyApprovesFollowers": "as:manuallyApprovesFollowers", "alsoKnownAs": { "@id": "as:alsoKnownAs", "@type": "@id" }, "movedTo": { "@id": "as:movedTo", "@type": "@id" }, "toot": "http://joinmastodon.org/ns#", "featured": { "@id": "toot:featured", "@type": "@id" }, "Emoji": "toot:Emoji", "blurhash": "toot:blurhash", "votersCount": "toot:votersCount", "schema": "http://schema.org#", "PropertyValue": "schema:PropertyValue", "value": "schema:value", "ostatus": "http://ostatus.org#", "conversation": "ostatus:conversation" } ], "type": "Note", "id": "https://chrichri.ween.de/o/1044a9a212c8450789c20d3e422c339d", "attributedTo": "https://chrichri.ween.de", "content": "<p>Receiving SMS plays a long tune on my <a href=\"https://chrichri.ween.de/t/librem5\" class=\"mention hashtag\" rel=\"tag\">#<span>Librem5</span></a>. For a few persons I&#x27;d like to have this tune played also if they send me a message using <a href=\"https://chrichri.ween.de/t/matrix\" class=\"mention hashtag\" rel=\"tag\">#<span>matrix</span></a>.</p>\n<p>A problem is that the <a href=\"https://chrichri.ween.de/t/fractal\" class=\"mention hashtag\" rel=\"tag\">#<span>fractal</span></a> flatpak does not use <a href=\"https://chrichri.ween.de/t/feedbackd\" class=\"mention hashtag\" rel=\"tag\">#<span>feedbackd</span></a> yet to signal new messages and on <a href=\"https://chrichri.ween.de/t/pureos\" class=\"mention hashtag\" rel=\"tag\">#<span>PureOS</span></a> <a href=\"https://chrichri.ween.de/t/byzantium\" class=\"mention hashtag\" rel=\"tag\">#<span>Byzantium</span></a> there&#x27;s no way to define different sounds for different notification events.</p>\n<p>So I started testing a small script to read notifications and trigger feedback for messages coming from an account containing some string:</p>\n<pre><code>\n#!/usr/bin/python3\r\n\r\nimport gi\r\nimport time\r\ngi.require_version('Lfb', '0.0')\r\nfrom gi.repository import Lfb\r\nfrom gi.repository import GLib\r\nimport dbus\r\nfrom dbus.mainloop.glib import DBusGMainLoop\r\n\r\ndef print_notification(bus, message):\r\n keys = [\"app_name\", \"replaces_id\", \"app_icon\", \"summary\",\r\n \"body\", \"actions\", \"hints\", \"expire_timeout\"]\r\n args = message.get_args_list()\r\n if len(args) == 8:\r\n notification = dict([(keys[i], args[i]) for i in range(8)])\r\n if \"account_i_want_to_be_notified_for_like_it_would_be_sms\" in notification[\"summary\"]:\r\n print( notification[\"summary\"], ': ', notification[\"body\"] )\r\n event.trigger_feedback()\r\n\r\nLfb.init('org.sigxcpu.lfbexample')\r\nevent = Lfb.Event.new('message-new-sms')\r\nloop = DBusGMainLoop(set_as_default=True)\r\nsession_bus = dbus.SessionBus()\r\nsession_bus.add_match_string(\"type='method_call',interface='org.freedesktop.Notifications',member='Notify',eavesdrop=true\")\r\nsession_bus.add_message_filter(print_notification)\r\n\r\nGLib.MainLoop().run()\r\n\n</code></pre>\n", "to": [ "https://www.w3.org/ns/activitystreams#Public" ], "cc": [ "https://chrichri.ween.de/followers" ], "published": "2024-09-04T13:11:09Z", "context": "https://chrichri.ween.de/contexts/bc3d44913983491cb2551bc30670c9d3", "conversation": "https://chrichri.ween.de/contexts/bc3d44913983491cb2551bc30670c9d3", "url": "https://chrichri.ween.de/o/1044a9a212c8450789c20d3e422c339d", "tag": [ { "href": "https://chrichri.ween.de/t/librem5", "name": "#librem5", "type": "Hashtag" }, { "href": "https://chrichri.ween.de/t/matrix", "name": "#matrix", "type": "Hashtag" }, { "href": "https://chrichri.ween.de/t/fractal", "name": "#fractal", "type": "Hashtag" }, { "href": "https://chrichri.ween.de/t/feedbackd", "name": "#feedbackd", "type": "Hashtag" }, { "href": "https://chrichri.ween.de/t/pureos", "name": "#pureos", "type": "Hashtag" }, { "href": "https://chrichri.ween.de/t/byzantium", "name": "#byzantium", "type": "Hashtag" } ], "summary": null, "inReplyTo": null, "sensitive": false, "attachment": [] }