mbin icon indicating copy to clipboard operation
mbin copied to clipboard

Add peertube support

Open BentiGorlich opened this issue 9 months ago ā€¢ 1 comments

To be able to handle the activities peertube sends these things needed to be added:

  • extract the target magazine / group from the attributedTo property. It is an array with both the user and the channel (group) in it. This is necessary, because the channel is not mentioned in the To or Cc field
  • handle array as url property
  • add Video as a supported entry type
Example activites pulled from TilVids

Create Activity (https://tilvids.com/videos/watch/1c97fd94-5fb3-45e5-ad65-b52b722a64f6)

{
  "@context": [
    "https://www.w3.org/ns/activitystreams",
    "https://w3id.org/security/v1",
    {
      "RsaSignature2017": "https://w3id.org/security#RsaSignature2017"
    },
    {
      "pt": "https://joinpeertube.org/ns#",
      "sc": "http://schema.org/",
      "Hashtag": "as:Hashtag",
      "uuid": "sc:identifier",
      "category": "sc:category",
      "licence": "sc:license",
      "subtitleLanguage": "sc:subtitleLanguage",
      "sensitive": "as:sensitive",
      "language": "sc:inLanguage",
      "identifier": "sc:identifier",
      "icons": "as:icon",
      "isLiveBroadcast": "sc:isLiveBroadcast",
      "liveSaveReplay": {
        "@type": "sc:Boolean",
        "@id": "pt:liveSaveReplay"
      },
      "permanentLive": {
        "@type": "sc:Boolean",
        "@id": "pt:permanentLive"
      },
      "latencyMode": {
        "@type": "sc:Number",
        "@id": "pt:latencyMode"
      },
      "Infohash": "pt:Infohash",
      "originallyPublishedAt": "sc:datePublished",
      "views": {
        "@type": "sc:Number",
        "@id": "pt:views"
      },
      "state": {
        "@type": "sc:Number",
        "@id": "pt:state"
      },
      "size": {
        "@type": "sc:Number",
        "@id": "pt:size"
      },
      "fps": {
        "@type": "sc:Number",
        "@id": "pt:fps"
      },
      "commentsEnabled": {
        "@type": "sc:Boolean",
        "@id": "pt:commentsEnabled"
      },
      "downloadEnabled": {
        "@type": "sc:Boolean",
        "@id": "pt:downloadEnabled"
      },
      "waitTranscoding": {
        "@type": "sc:Boolean",
        "@id": "pt:waitTranscoding"
      },
      "support": {
        "@type": "sc:Text",
        "@id": "pt:support"
      },
      "likes": {
        "@id": "as:likes",
        "@type": "@id"
      },
      "dislikes": {
        "@id": "as:dislikes",
        "@type": "@id"
      },
      "shares": {
        "@id": "as:shares",
        "@type": "@id"
      },
      "comments": {
        "@id": "as:comments",
        "@type": "@id"
      }
    }
  ],
  "to": [
    "https://www.w3.org/ns/activitystreams#Public"
  ],
  "cc": [
    "https://tilvids.com/accounts/thelinuxexperiment/followers"
  ],
  "type": "Video",
  "id": "https://tilvids.com/videos/watch/1c97fd94-5fb3-45e5-ad65-b52b722a64f6",
  "name": "Fedora wants AI, Nvidia + Wayland fixed, Proton buys Standard Notes: Linux & Open Source News",
  "duration": "PT1048S",
  "uuid": "1c97fd94-5fb3-45e5-ad65-b52b722a64f6",
  "tag": [
    {
      "type": "Hashtag",
      "name": "distro"
    },
    {
      "type": "Hashtag",
      "name": "linux"
    },
    {
      "type": "Hashtag",
      "name": "linux for beginners 2023"
    },
    {
      "type": "Hashtag",
      "name": "linux tips"
    },
    {
      "type": "Hashtag",
      "name": "opensource"
    }
  ],
  "category": {
    "identifier": "15",
    "name": "Science & Technology"
  },
  "language": {
    "identifier": "en",
    "name": "English"
  },
  "views": 371,
  "sensitive": false,
  "waitTranscoding": true,
  "state": 1,
  "commentsEnabled": true,
  "downloadEnabled": true,
  "published": "2024-04-13T16:09:11.988Z",
  "originallyPublishedAt": "2024-04-12T22:00:00.000Z",
  "updated": "2024-05-11T01:18:00.879Z",
  "mediaType": "text/markdown",
  "content": "Head to https://squarespace.com/thelinuxexperiment to save 10% off your first purchase of a website or domain using code thelinuxexperiment\n\nGrab a brand new laptop or desktop running Linux: https://www.tuxedocomputers.com/en#\n\n\nšŸ‘ SUPPORT THE CHANNEL:\nGet access to:\n- a Daily Linux News show\n- a weekly patroncast for more personal thoughts\n- polls on the next topics I cover,\n- your name in the credits\n\nYouTube: https://www.youtube.com/@thelinuxexp/join\nPatreon: https://www.patreon.com/thelinuxexperiment\n\nOr, you can donate whatever you want:\nhttps://paypal.me/thelinuxexp\nLiberapay: https://liberapay.com/TheLinuxExperiment/\n\nšŸ‘• GET TLE MERCH\nSupport the channel AND get cool new gear: https://the-linux-experiment.creator-spring.com/\n\nšŸŽ™ļø LINUX AND OPEN SOURCE NEWS PODCAST:\nListen to the latest Linux and open source news, with more in depth coverage, and ad-free!  https://podcast.thelinuxexp.com\n\nšŸ† FOLLOW ME ELSEWHERE:\nWebsite: https://thelinuxexp.com\nMastodon: https://mastodon.social/web/@thelinuxEXP\nPixelfed: https://pixelfed.social/TLENick\nPeerTube: https://tilvids.com/c/thelinuxexperiment_channel/videos\nDiscord: https://discord.gg/mdnHftjkja\n\n#linux #opensource #technews #linuxdesktop #linuxdistro \n\nTimecodes:\n00:00 Intro\n00:39 Sponsor: Squarespace\n01:40 Fedora wants to go all in on AI\n04:25 Ubuntu 24.04 LTS beta\n06:04 Explicit sync will fix Wayland on nvidia\n08:20 Proton buys Standard Notes\n09:43 DE updates to GNOME, KDE, elementary OS\n12:05 Gaming: League of Legends is gone\n15:09 Sponsor: Tuxedo Computers\n16:22 Support the channel\n \nFedora wants to go all in on AI\n\nhttps://communityblog.fedoraproject.org/strategy-2028-april-2024-update/\n \nUbuntu 24.04 LTS beta\n\nhttps://www.omgubuntu.co.uk/2024/04/ubuntu-24-04-beta-released\n\nExplicit sync will fix Wayland on nvidia\n\nhttps://zamundaaa.github.io/wayland/2024/04/05/explicit-sync.html\n\nhttps://www.phoronix.com/news/Explicit-GPU-Sync-XWayland-Go\n\nProton buys Standard Notes\n\nhttps://www.zdnet.com/home-and-office/work-life/proton-acquires-standard-notes-to-add-another-tool-to-its-growing-portfolio/\n\nDE updates to GNOME, KDE\n\nhttps://pointieststick.com/2024/04/05/this-week-in-kde-real-modifier-only-shortcuts-and-cropping-in-spectacle/\n\nhttps://thisweek.gnome.org/posts/2024/04/twig-142/\n\nGaming: League of Legends is gone\n\nhttps://www.gamingonlinux.com/2024/04/riot-games-talk-vanguard-anti-cheat-for-league-of-legends-and-why-its-a-no-for-linux/\n\nhttps://www.theverge.com/2024/4/11/24127545/discord-suyu-sudachi-server-shutdown-account-ban",
  "support": null,
  "subtitleLanguage": [],
  "icon": [
    {
      "type": "Image",
      "url": "https://tilvids.com/static/thumbnails/6182657f-d143-4889-9434-27fb0e1ceef8.jpg",
      "mediaType": "image/jpeg",
      "width": 280,
      "height": 157
    },
    {
      "type": "Image",
      "url": "https://tilvids.com/lazy-static/previews/c2af3c5a-9ec6-4a2b-8ff2-c574e5e56e4e.jpg",
      "mediaType": "image/jpeg",
      "width": 850,
      "height": 480
    }
  ],
  "url": [
    {
      "type": "Link",
      "mediaType": "text/html",
      "href": "https://tilvids.com/videos/watch/1c97fd94-5fb3-45e5-ad65-b52b722a64f6"
    },
    {
      "type": "Link",
      "mediaType": "application/x-mpegURL",
      "href": "https://tilvids.com/static/streaming-playlists/hls/1c97fd94-5fb3-45e5-ad65-b52b722a64f6/c188f9cf-3b66-4b79-8bc8-72708979b71e-master.m3u8",
      "tag": [
        {
          "type": "Infohash",
          "name": "5514512fd7204cd1c6af6c02da33ae5c9a83cab2"
        },
        {
          "type": "Infohash",
          "name": "4bcba22af8a6b99e262da33bf027128476828c43"
        },
        {
          "type": "Infohash",
          "name": "353819b7605c291d79c8cb5dab21fcdd8d3d3ace"
        },
        {
          "type": "Link",
          "name": "sha256",
          "mediaType": "application/json",
          "href": "https://tilvids.com/static/streaming-playlists/hls/1c97fd94-5fb3-45e5-ad65-b52b722a64f6/60874769-1abe-4d38-966f-32675c965890-segments-sha256.json"
        },
        {
          "type": "Link",
          "mediaType": "video/mp4",
          "href": "https://tilvids.com/static/streaming-playlists/hls/1c97fd94-5fb3-45e5-ad65-b52b722a64f6/952a67c5-29eb-4fa0-a2d7-32781509d479-1080-fragmented.mp4",
          "height": 1080,
          "size": 180928284,
          "fps": 50
        },
        {
          "type": "Link",
          "rel": [
            "metadata",
            "video/mp4"
          ],
          "mediaType": "application/json",
          "href": "https://tilvids.com/api/v1/videos/1c97fd94-5fb3-45e5-ad65-b52b722a64f6/metadata/562493",
          "height": 1080,
          "fps": 50
        },
        {
          "type": "Link",
          "mediaType": "application/x-bittorrent",
          "href": "https://tilvids.com/lazy-static/torrents/e2a9de50-0d3f-46bd-b326-0e4c8cd7a8be-1080-hls.torrent",
          "height": 1080
        },
        {
          "type": "Link",
          "mediaType": "application/x-bittorrent;x-scheme-handler/magnet",
          "href": "magnet:?xs=https%3A%2F%2Ftilvids.com%2Flazy-static%2Ftorrents%2Fe2a9de50-0d3f-46bd-b326-0e4c8cd7a8be-1080-hls.torrent&xt=urn:btih:196bd2d8758e1212ebfa9d3f43eb66a1a6f65643&dn=Fedora+wants+AI%2C+Nvidia+%2B+Wayland+fixed%2C+Proton+buys+Standard+Notes%3A+Linux+%26+Open+Source+News&tr=https%3A%2F%2Ftilvids.com%2Ftracker%2Fannounce&tr=wss%3A%2F%2Ftilvids.com%3A443%2Ftracker%2Fsocket&ws=https%3A%2F%2Ftilvids.com%2Fstatic%2Fstreaming-playlists%2Fhls%2F1c97fd94-5fb3-45e5-ad65-b52b722a64f6%2F952a67c5-29eb-4fa0-a2d7-32781509d479-1080-fragmented.mp4",
          "height": 1080
        },
        {
          "type": "Link",
          "mediaType": "video/mp4",
          "href": "https://tilvids.com/static/streaming-playlists/hls/1c97fd94-5fb3-45e5-ad65-b52b722a64f6/75a91130-7efe-4e34-b343-e11e1a0803db-360-fragmented.mp4",
          "height": 360,
          "size": 56365565,
          "fps": 25
        },
        {
          "type": "Link",
          "rel": [
            "metadata",
            "video/mp4"
          ],
          "mediaType": "application/json",
          "href": "https://tilvids.com/api/v1/videos/1c97fd94-5fb3-45e5-ad65-b52b722a64f6/metadata/562503",
          "height": 360,
          "fps": 25
        },
        {
          "type": "Link",
          "mediaType": "application/x-bittorrent",
          "href": "https://tilvids.com/lazy-static/torrents/8b9685dd-7485-4d5a-95fe-34bb024587a0-360-hls.torrent",
          "height": 360
        },
        {
          "type": "Link",
          "mediaType": "application/x-bittorrent;x-scheme-handler/magnet",
          "href": "magnet:?xs=https%3A%2F%2Ftilvids.com%2Flazy-static%2Ftorrents%2F8b9685dd-7485-4d5a-95fe-34bb024587a0-360-hls.torrent&xt=urn:btih:d6a58d28ffd09b9ce12a7a54094020ab4b228b2b&dn=Fedora+wants+AI%2C+Nvidia+%2B+Wayland+fixed%2C+Proton+buys+Standard+Notes%3A+Linux+%26+Open+Source+News&tr=https%3A%2F%2Ftilvids.com%2Ftracker%2Fannounce&tr=wss%3A%2F%2Ftilvids.com%3A443%2Ftracker%2Fsocket&ws=https%3A%2F%2Ftilvids.com%2Fstatic%2Fstreaming-playlists%2Fhls%2F1c97fd94-5fb3-45e5-ad65-b52b722a64f6%2F75a91130-7efe-4e34-b343-e11e1a0803db-360-fragmented.mp4",
          "height": 360
        },
        {
          "type": "Link",
          "mediaType": "video/mp4",
          "href": "https://tilvids.com/static/streaming-playlists/hls/1c97fd94-5fb3-45e5-ad65-b52b722a64f6/89b4b150-d894-42ed-a02d-f6296bf7e63b-144-fragmented.mp4",
          "height": 144,
          "size": 27060941,
          "fps": 25
        },
        {
          "type": "Link",
          "rel": [
            "metadata",
            "video/mp4"
          ],
          "mediaType": "application/json",
          "href": "https://tilvids.com/api/v1/videos/1c97fd94-5fb3-45e5-ad65-b52b722a64f6/metadata/562502",
          "height": 144,
          "fps": 25
        },
        {
          "type": "Link",
          "mediaType": "application/x-bittorrent",
          "href": "https://tilvids.com/lazy-static/torrents/78480b6e-28e2-43fb-8b76-3c3a1d30fe00-144-hls.torrent",
          "height": 144
        },
        {
          "type": "Link",
          "mediaType": "application/x-bittorrent;x-scheme-handler/magnet",
          "href": "magnet:?xs=https%3A%2F%2Ftilvids.com%2Flazy-static%2Ftorrents%2F78480b6e-28e2-43fb-8b76-3c3a1d30fe00-144-hls.torrent&xt=urn:btih:205e02f04302b581e8e2a3a11ae77da887f27ca1&dn=Fedora+wants+AI%2C+Nvidia+%2B+Wayland+fixed%2C+Proton+buys+Standard+Notes%3A+Linux+%26+Open+Source+News&tr=https%3A%2F%2Ftilvids.com%2Ftracker%2Fannounce&tr=wss%3A%2F%2Ftilvids.com%3A443%2Ftracker%2Fsocket&ws=https%3A%2F%2Ftilvids.com%2Fstatic%2Fstreaming-playlists%2Fhls%2F1c97fd94-5fb3-45e5-ad65-b52b722a64f6%2F89b4b150-d894-42ed-a02d-f6296bf7e63b-144-fragmented.mp4",
          "height": 144
        }
      ]
    },
    {
      "type": "Link",
      "name": "tracker-http",
      "rel": [
        "tracker",
        "http"
      ],
      "href": "https://tilvids.com/tracker/announce"
    },
    {
      "type": "Link",
      "name": "tracker-websocket",
      "rel": [
        "tracker",
        "websocket"
      ],
      "href": "wss://tilvids.com:443/tracker/socket"
    }
  ],
  "likes": "https://tilvids.com/videos/watch/1c97fd94-5fb3-45e5-ad65-b52b722a64f6/likes",
  "dislikes": "https://tilvids.com/videos/watch/1c97fd94-5fb3-45e5-ad65-b52b722a64f6/dislikes",
  "shares": "https://tilvids.com/videos/watch/1c97fd94-5fb3-45e5-ad65-b52b722a64f6/announces",
  "comments": "https://tilvids.com/videos/watch/1c97fd94-5fb3-45e5-ad65-b52b722a64f6/comments",
  "attributedTo": [
    {
      "type": "Person",
      "id": "https://tilvids.com/accounts/thelinuxexperiment"
    },
    {
      "type": "Group",
      "id": "https://tilvids.com/video-channels/thelinuxexperiment_channel"
    }
  ],
  "isLiveBroadcast": false,
  "liveSaveReplay": null,
  "permanentLive": null,
  "latencyMode": null,
  "peertubeLiveChat": false
}

Channel Actor (Group) (https://tilvids.com/video-channels/thelinuxexperiment_channel)

{
  "@context": [
    "https://www.w3.org/ns/activitystreams",
    "https://w3id.org/security/v1",
    {
      "RsaSignature2017": "https://w3id.org/security#RsaSignature2017"
    },
    {
      "pt": "https://joinpeertube.org/ns#",
      "sc": "http://schema.org/",
      "playlists": {
        "@id": "pt:playlists",
        "@type": "@id"
      },
      "support": {
        "@type": "sc:Text",
        "@id": "pt:support"
      },
      "icons": "as:icon"
    }
  ],
  "type": "Group",
  "id": "https://tilvids.com/video-channels/thelinuxexperiment_channel",
  "following": "https://tilvids.com/video-channels/thelinuxexperiment_channel/following",
  "followers": "https://tilvids.com/video-channels/thelinuxexperiment_channel/followers",
  "playlists": "https://tilvids.com/video-channels/thelinuxexperiment_channel/playlists",
  "inbox": "https://tilvids.com/video-channels/thelinuxexperiment_channel/inbox",
  "outbox": "https://tilvids.com/video-channels/thelinuxexperiment_channel/outbox",
  "preferredUsername": "thelinuxexperiment_channel",
  "url": "https://tilvids.com/video-channels/thelinuxexperiment_channel",
  "name": "The Linux Experiment",
  "endpoints": {
    "sharedInbox": "https://tilvids.com/inbox"
  },
  "publicKey": {
    "id": "https://tilvids.com/video-channels/thelinuxexperiment_channel#main-key",
    "owner": "https://tilvids.com/video-channels/thelinuxexperiment_channel",
    "publicKeyPem": "-----BEGIN PUBLIC KEY-----\nMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA7mWF3Il0lE+nWiArDK4B\n8Z9rUCYR/C9651CcqPFIpHFLkJgoAkYxeMqfCo7lbXil1abaQERjgAYAJtdfObvY\neqUrHejEHAClFIO5BilyTP8b02RVZX6xxtTNF7jUEePFI0xOtPtt3Yz+YP0c6rz6\noyCCpqTy8LRfDkD9RATQrYfFxZCQ2yo2SlCoymNrDjoVwPI0XMZWHyMthKcaVwAq\ni+dYd0pmNUxdY9V042tIg+YwR3mOYvkXCNqy1SDygcIY6N5kdqioFoKxMK3MFApK\nY7tkfZkZXLlBdzHjjtYGHictaZzNYl4HV6onx//A21w0A7dGimlYd5bYLwz/BteD\nTwIDAQAB\n-----END PUBLIC KEY-----"
  },
  "published": "2020-06-30T13:45:17.984Z",
  "icon": {
    "type": "Image",
    "mediaType": "image/jpeg",
    "height": 120,
    "width": 120,
    "url": "https://tilvids.com/lazy-static/avatars/13b0214b-edc0-4c5b-a04d-be648a3a370a.jpg"
  },
  "icons": [
    {
      "type": "Image",
      "mediaType": "image/jpeg",
      "height": 48,
      "width": 48,
      "url": "https://tilvids.com/lazy-static/avatars/1bbe97f1-d283-4db4-8bdd-e5320564aff9.jpg"
    },
    {
      "type": "Image",
      "mediaType": "image/jpeg",
      "height": 120,
      "width": 120,
      "url": "https://tilvids.com/lazy-static/avatars/13b0214b-edc0-4c5b-a04d-be648a3a370a.jpg"
    }
  ],
  "image": {
    "type": "Image",
    "mediaType": "image/jpeg",
    "height": 317,
    "width": 1920,
    "url": "https://tilvids.com/lazy-static/banners/1a8d6881-30c8-47cb-8576-7af62d869c45.jpg"
  },
  "summary": "I'm Nick, and I like to tinker with Linux stuff. I'll bumble through distro reviews, tutorials, and general helpful tidbits and impressions on Linux desktop environments, applications, and news. \n\nYou might see a bit of Linux gaming here and there, and some more personal opinion pieces, but in the end, it's more or less all about Linux and FOSS !\n\nIf you want to stay up to snuff, follow me on Mastodon: https://mastodon.social/@thelinuxEXP \n\nIf you can, consider supporting the channel here: \nhttps://www.patreon.com/thelinuxexperiment",
  "support": "Support the channel on Patreon: \nhttps://www.patreon.com/thelinuxexperiment\n\nSupport on Liberapay:\nhttps://liberapay.com/TheLinuxExperiment/",
  "attributedTo": [
    {
      "type": "Person",
      "id": "https://tilvids.com/accounts/thelinuxexperiment"
    }
  ]
}

To test this you can just insert the url in the search field. That will trigger mbin to process the activity as if it was sent to us.

Closes #162

BentiGorlich avatar May 15 '24 10:05 BentiGorlich

I noticed that there are a lot of weird issues with the header signature from tilvids on my server (activities that are sent by them) and I want to investigate what the exact issue is there

BentiGorlich avatar May 15 '24 14:05 BentiGorlich

As far as I can see the signature problems only occur, because tilvids has their cdn on another subdomain, but sends stuff as if it would come from the original domain. That could of course be a problem and something we should look at in another issue/PR, but I don't think that it will be problematic for the general PeerTube support, as it only uses the cdn to deliver updates on CacheFiles which is an AP entity that we do not support anyways and do not care about it either. That is a PeerTube <-> PeerTube thing

BentiGorlich avatar May 16 '24 16:05 BentiGorlich

As you can see it is working on GehirnEimer:

But I have to switch branches there

BentiGorlich avatar May 29 '24 07:05 BentiGorlich

I asked for a better way to sync like/dislikes Chocobozzz/PeerTube#6400 SO far no result. My goto would be to introduce a new field for entries and posts: remote_like_count, remote_dislike_count and remote_boost_count. So only one request has to be made after getting an update activity

BentiGorlich avatar Jun 06 '24 10:06 BentiGorlich

thanks man. I think I'll give the others a few days to have a look at it

BentiGorlich avatar Jun 14 '24 22:06 BentiGorlich

That means however that we do not know who voted, which is not necessarily a bad thing

I could be mistaken but it looks like when asking the collection for pagination you get back that information.

Taking for example https://tilvids.com/videos/watch/f0d4f295-6c5c-46ae-a903-6e2411503658 when asking for /likes it says

  "totalItems": 56,
  "first": "https://tilvids.com/videos/watch/f0d4f295-6c5c-46ae-a903-6e2411503658/likes?page=1"

then when asking for /likes?page=1 it returns (removing the usernames just in case they don't want to be posted / delete their account in the future)

  "id": "https://tilvids.com/videos/watch/f0d4f295-6c5c-46ae-a903-6e2411503658/likes?page=1",
  "type": "OrderedCollectionPage",
  "next": "https://tilvids.com/videos/watch/f0d4f295-6c5c-46ae-a903-6e2411503658/likes?page=2",
  "partOf": "https://tilvids.com/videos/watch/f0d4f295-6c5c-46ae-a903-6e2411503658/likes",
  "orderedItems": [
    "https://mstdn.io/users/<username>",
    "https://ravenation.club/users/<username>,
    "https://social.librem.one/users/<username>,
    "https://mas.to/users/<username>,
    "https://mastodon.social/users/<username>,
    "https://mastodon.social/users/<username>,
    "https://fosstodon.org/users/<username>,
    "https://mastodon.social/users/<username>",
    "https://fosstodon.org/users/<username>,
    "https://tilvids.com/accounts/<username>"
  ],
  "totalItems": 56
}

I guess you would have to make a bunch of calls for all pages. Not completely familiar with the current tech on whether that's a lot of calls to make considering, or if we usually do that anyways on all lemmy/mbin posts

e-five256 avatar Jun 19 '24 12:06 e-five256

Yeah I know. The problem is that for each like I have to make a bunch of calls again, because it sometimes does not include the user, but their like activity. And since each like to a video triggers PeerTube to send out an update activity. And since the information who liked the video are kinda useless for our servers I decided on the "just user the number" approach

BentiGorlich avatar Jun 19 '24 12:06 BentiGorlich

I guess it isn't technically the user, it just happens to be for mastodon and tilvids, or we're doing something odd? I just liked a video and it added https://kbin.run/f/object/72a25451-e6b9-4705-9caa-725d68c312b0 to the like results rather than my user (is that related to https://github.com/MbinOrg/mbin/issues/772 ?)

e-five256 avatar Jun 19 '24 12:06 e-five256

I'm having trouble in the code determining what I'm seeing:

  1. entry exists with 3 likes and 0 dislikes
  2. click dislike, it now shows 2 likes and 1 dislike, even though I wasn't one of the likes
  3. refresh page, it now shows 3 likes and 1 dislike

image

this repros every time for a tilvid, but doesn't repro for lemmy entries (if I didn't like something, on dislike the like count stays the same). it makes me think it's subtracting aplikecount on dislike even if you weren't one of the likes

e-five256 avatar Jun 19 '24 13:06 e-five256

I just liked a video and it added https://kbin.run/f/object/72a25451-e6b9-4705-9caa-725d68c312b0 to the like results rather than my user (is that related to https://github.com/MbinOrg/mbin/issues/772 ?)

Maybe it is, yeah. However even if we solved that other software might still produce such entries. I think just using the counts is absolutely fine

it makes me think it's subtracting aplikecount on dislike even if you weren't one of the likes

Yeah that seems to be the problem. I'll look into that

BentiGorlich avatar Jun 19 '24 13:06 BentiGorlich

@e-five256 i have @BentiGorlich latest update to the branch loaded on kbin.run

ghost avatar Jun 25 '24 18:06 ghost

I'm having trouble in the code determining what I'm seeing:

  1. entry exists with 3 likes and 0 dislikes
  2. click dislike, it now shows 2 likes and 1 dislike, even though I wasn't one of the likes
  3. refresh page, it now shows 3 likes and 1 dislike

image

this repros every time for a tilvid, but doesn't repro for lemmy entries (if I didn't like something, on dislike the like count stays the same). it makes me think it's subtracting aplikecount on dislike even if you weren't one of the likes

Looks fixed to me:

image

image

ghost avatar Jun 26 '24 13:06 ghost

we might want to think of some kind of wording eventually to allay fears like "Not all software makes user favorites public, counts may not match" when the number of likes and length of users doesn't match, or something similar

Sure thing, can you make an issue for that?
I think that just having the numbers is actually a good, privacy preserving way of having the numbers still right. Of course PeerTube publishes the numbers and the users, so my argument makes no sense regarding that, but when looking at Mastodon this might be a suggestion worth mentioning.

BentiGorlich avatar Jun 28 '24 18:06 BentiGorlich

Seems like the workflow is hanging...

BentiGorlich avatar Jun 28 '24 18:06 BentiGorlich

Github issues https://www.githubstatus.com/

e-five256 avatar Jun 28 '24 18:06 e-five256

ahh

BentiGorlich avatar Jun 28 '24 18:06 BentiGorlich

Github issues https://www.githubstatus.com/

wth... they say actions are working now, but obviously not. @BentiGorlich you might have to push an empty commit or close and reopen the PR to trigger the checks... at least that's what I've had to do with that contributor bot thing since for whatever reason it ignores PRs from that action.

or it should work/trigger after an update to this branch once it becomes outdated with the latest main, which is an option too...either way

ghost avatar Jun 28 '24 22:06 ghost