Something went wrong. Try again.
[READ-ONLY] Mirror of https://github.com/improsocial/impro
An extensible Bluesky client for web impro.social
Something went wrong. Try again.
JavaScript
12345678910111213141516171819202122232425262728293031323334353637import { PostInteractionHandler } from "/js/postInteractionHandler.js";import { ProfileInteractionHandler } from "/js/profileInteractionHandler.js";import { FeedInteractionHandler } from "/js/feedInteractionHandler.js";import { ListInteractionHandler } from "/js/listInteractionHandler.js";
function loggedOutHandler(name) { return new Proxy( {}, { get(_target, prop) { throw new Error(`${name}.${String(prop)} called while logged out`); }, }, );}
export class InteractionHandlers { constructor({ session, dataLayer, postComposerService, reportService }) { this.postInteractionHandler = session ? new PostInteractionHandler( dataLayer, postComposerService, reportService, ) : loggedOutHandler("postInteractionHandler"); this.profileInteractionHandler = session ? new ProfileInteractionHandler(dataLayer, reportService) : loggedOutHandler("profileInteractionHandler"); this.feedInteractionHandler = session ? new FeedInteractionHandler(dataLayer) : loggedOutHandler("feedInteractionHandler"); this.listInteractionHandler = session ? new ListInteractionHandler(dataLayer) : loggedOutHandler("listInteractionHandler"); }}