activitypub | ActivityPub for Drupal | Content Management System library
kandi X-RAY | activitypub Summary
kandi X-RAY | activitypub Summary
Implements the ActivityPub protocol for your site. Readers will be able to follow content on Mastodon and other federated platforms that support ActivityPub. Responses are possible too (Like, Announce, Reply) with more to come. Check the README on drupal.org for all features, installation and configuration: Development of the lite version happens in the 1.0.x branch on The extended version will be developed at some point on GitHub at and will be synced back for bug fixes and releases.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
- Receive a user .
- Outbox event .
activitypub Key Features
activitypub Examples and Code Snippets
Community Discussions
Trending Discussions on activitypub
QUESTION
I'm working on an ActivityPub implimentation in c#, and sometimes links are "strings" like a url link, and sometimes links are objects with a Link sub-type. (Link : Entity)
I'm wondering if there's a possible way to use System.Text.Json to serialize a Link object as a string if a certain set of conditions are true (just write one string to the writer), and write the whole default object to the writer if the condition is not true.
I have tried following this solution: How to use default serialization in a custom System.Text.Json JsonConverter?, which still works on the code fiddle, but does not work for my implimentation and I'm not too sure why.
Does anyone know how I might debug this, or a better way to go about making sure Link : Entity
objects can serialize into strings on occasion?
With that I get the following error:
(in this case I have even tried to add the fetched default ctor to the modifiedOptions) Reguardless, it says that there's no data mapped for the Link class. I have also tried adding the JsonSerializeable attribute directly to the Link class.
The Error:
Metadata for type 'ActivityPub.Types.Link' was not provided to the serializer. The serializer method used does not support reflection-based creation of serialization-related type metadata. If using source generation, ensure that all root types passed to the serializer have been indicated with 'JsonSerializableAttribute', along with any types that might be serialized polymorphically.
My base code library: https://github.com/Meep-Tech/ActivityHub.Net/tree/collapse_links_during_serialization
The test code:
...ANSWER
Answered 2021-Dec-14 at 05:26In my original version of DefaultConverterFactory
, I cached the default converter because, in its documentation How to write custom converters for JSON serialization (marshalling) in .NET, Microsoft recommends, when serializing a complex object, to cache any required converters for performance reasons:
QUESTION
I want a URL, say /users/fred
, to serve different content based on the Accept
header. If the requested MIME type is application/activity+json
, I want to serve an ActivityPub representation of Fred's account; otherwise, I want to serve an HTML page.
The twist is that I want to implement the ActivityPub view and the HTML view in different Django apps. If they were at different URLs, this would be easily done with urls.py
, but that doesn't seem to allow filtering by Accept
.
Is there a standard way to do this? Do I need to implement something new in middleware?
...ANSWER
Answered 2020-Apr-29 at 19:16If you mean that you want that calculation done in the urls.py path itself, no you can't. A url path is linked to a single view function (or View.as_view()). These only apply pattern matching on the url itself.
However, you can certainly link it to a first view function which reads your header and dispatches it to the right app view based on its content.
e.g. In a urls.py
QUESTION
I have a setup similar to the one in this tutorial. How can I render JSON alone (no HTML) without having to specify the port number for the route specified in index.js
? Within my own setup, I can view JSON by visiting https://socialmaya.com/u/real but can't get an actual JSON response unless I visit http://socialmaya.com:5000/actors/real, which is what's being called by React.
Here is my code which is an attempt to implement an ActivityPub API for a social network built using the MERN stack. My Nginx configuration can be found here.
...ANSWER
Answered 2020-Apr-13 at 14:18Rewriting the URL before passing it upstream within Nginx solved my problem:
QUESTION
I have a relatively standard web application built with Sinatra. The application is running in Ruby 2.7.0 on Mac OS Catalina.
In one of the routes data is passed to the method get_activity_status
. The method takes two arguments: name
and status_id
.
I have the following output from Pry:
...ANSWER
Answered 2020-Jan-01 at 22:45Somehow app.rb is changing the value of status_id before it's passed to get_activity_status. Why is this occurring?
It doesn't. When you hit /:name/outbox
in fact this block is called https://github.com/nsuchy/TwitterPub/blob/master/app.rb#L152, not the last one as you might expect. It happens because /:name/:status_id
matches the /:name/outbox
too (in this case status_id
is resolved to outbox)
. Just reorder the routes' definitions (put the static above the dynamic one) and it should work...
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install activitypub
PHP requires the Visual C runtime (CRT). The Microsoft Visual C++ Redistributable for Visual Studio 2019 is suitable for all these PHP versions, see visualstudio.microsoft.com. You MUST download the x86 CRT for PHP x86 builds and the x64 CRT for PHP x64 builds. The CRT installer supports the /quiet and /norestart command-line switches, so you can also script it.
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page