GNU social JP
  • FAQ
  • Login
GNU social JPは日本のGNU socialサーバーです。
Usage/ToS/admin/test/Pleroma FE
  • Public

    • Public
    • Network
    • Groups
    • Featured
    • Popular
    • People

Conversation

Notices

  1. Embed this notice
    Ayo! (ayo@social.ayco.io)'s status on Saturday, 28-Jan-2023 18:21:36 JST Ayo! Ayo!

    Elk coding later :) How do people feel about cleaning up links at the end of the post when there's already a preview card?
    https://github.com/elk-zone/elk/pull/982

    In conversation Saturday, 28-Jan-2023 18:21:36 JST from social.ayco.io permalink

    Attachments

    1. Domain not in remote thumbnail source whitelist: opengraph.githubassets.com
      feat: remove link if matches preview url by ayoayco · Pull Request #982 · elk-zone/elk
      Resolves #981 Experimenting on removing link at the end of status content if it matches the PreviewCard.url
    • Embed this notice
      Ayo! (ayo@social.ayco.io)'s status on Sunday, 29-Jan-2023 05:16:11 JST Ayo! Ayo!
      in reply to
      • Elk

      ? trying to code live - come let's talk @elk and #opensource https://www.twitch.tv/ayoayco

      In conversation Sunday, 29-Jan-2023 05:16:11 JST permalink

      Attachments

      1. Domain not in remote thumbnail source whitelist: static-cdn.jtvnw.net
        ayoayco - Twitch
        figuring out twitch ?
    • Embed this notice
      Ayo! (ayo@social.ayco.io)'s status on Sunday, 29-Jan-2023 05:16:19 JST Ayo! Ayo!
      in reply to

      Here is the related issue I opened where I put the logic that will be applied, any ideas welcome!

      https://github.com/elk-zone/elk/issues/981

      In conversation Sunday, 29-Jan-2023 05:16:19 JST permalink
      Elk repeated this.
    • Embed this notice
      Ayo! (ayo@social.ayco.io)'s status on Sunday, 29-Jan-2023 05:16:23 JST Ayo! Ayo!
      in reply to

      This is gonna be a problem. ? HOW do we know when it is good for the context to leave it?

      In conversation Sunday, 29-Jan-2023 05:16:23 JST permalink

      Attachments


      1. https://social.ayco.io/system/media_attachments/files/109/766/384/966/125/530/original/7571118341e96c39.png
    • Embed this notice
      Ayo! (ayo@social.ayco.io)'s status on Sunday, 29-Jan-2023 05:16:26 JST Ayo! Ayo!
      in reply to

      Taking this on first, because I think it is relatively small

      In conversation Sunday, 29-Jan-2023 05:16:26 JST permalink
    • Embed this notice
      patak (patak@m.webtoo.ls)'s status on Sunday, 29-Jan-2023 19:25:02 JST patak patak
      in reply to

      @ayo Lovely ?

      In conversation Sunday, 29-Jan-2023 19:25:02 JST permalink
    • Embed this notice
      Ayo! (ayo@social.ayco.io)'s status on Sunday, 29-Jan-2023 19:25:06 JST Ayo! Ayo!
      in reply to

      a before and after

      In conversation Sunday, 29-Jan-2023 19:25:06 JST permalink

      Attachments


      1. https://social.ayco.io/system/media_attachments/files/109/771/839/062/145/732/original/28a269486f105ecb.jpeg
    • Embed this notice
      Ayo! (ayo@social.ayco.io)'s status on Sunday, 29-Jan-2023 19:25:09 JST Ayo! Ayo!
      in reply to

      Removed the protocol part `https://` - it looks cleaner

      In conversation Sunday, 29-Jan-2023 19:25:09 JST permalink
    • Embed this notice
      Ayo! (ayo@social.ayco.io)'s status on Sunday, 29-Jan-2023 19:25:12 JST Ayo! Ayo!
      in reply to

      Done. PR ready for review. Some screenshots

      In conversation Sunday, 29-Jan-2023 19:25:12 JST permalink

      Attachments


      1. https://social.ayco.io/system/media_attachments/files/109/769/509/061/142/883/original/8c6611efdfe90434.png

      2. https://social.ayco.io/system/media_attachments/files/109/769/509/139/374/700/original/98ed46feea6c38b8.png
    • Embed this notice
      Ayo! (ayo@social.ayco.io)'s status on Sunday, 29-Jan-2023 19:25:13 JST Ayo! Ayo!
      in reply to

      IT'S WORKING NOW, JUST NEED TO CLEAN THE CODE

      stuff to note:
      1. we check if preview card URL matches the shared link href attribute
      2. we don't need to check for multiple links, because the last link will never match the preview URL in this scenario
      3. we append the cleaned link to the preview card "provider name" so people will still find this info --> meaning, we don't actually remove anything, but instead move it into the preview card

      In conversation Sunday, 29-Jan-2023 19:25:13 JST permalink
    • Embed this notice
      Ayo! (ayo@social.ayco.io)'s status on Sunday, 29-Jan-2023 19:25:15 JST Ayo! Ayo!
      in reply to

      Found that the preview card object generated by Mastodon is ALWAYS for the first link if there are multiple links in a post. This saves us work ? because the last link is never going to match the preview URL, and won't trigger the clean up logic

      In conversation Sunday, 29-Jan-2023 19:25:15 JST permalink
    • Embed this notice
      Ayo! (ayo@social.ayco.io)'s status on Sunday, 29-Jan-2023 19:25:18 JST Ayo! Ayo!
      in reply to

      So close now... it's just that sometimes the preview card URL has a trailing `/` ?

      In conversation Sunday, 29-Jan-2023 19:25:18 JST permalink
    • Embed this notice
      Ayo! (ayo@social.ayco.io)'s status on Sunday, 29-Jan-2023 19:25:21 JST Ayo! Ayo!
      in reply to

      The parse function seems not the best place as it is recursively going through node children... and I'm only concerned about the "last" not invisible child. ?

      In conversation Sunday, 29-Jan-2023 19:25:21 JST permalink
    • Embed this notice
      Ayo! (ayo@social.ayco.io)'s status on Sunday, 29-Jan-2023 19:25:23 JST Ayo! Ayo!
      in reply to

      Uh, some invisible `<span>` elements are included at the end of the HTML content of a Status.... which means the link at the end of a post we see on Elk, is not the last child ?

      In conversation Sunday, 29-Jan-2023 19:25:23 JST permalink
    • Embed this notice
      Ayo! (ayo@social.ayco.io)'s status on Sunday, 29-Jan-2023 19:25:25 JST Ayo! Ayo!
      in reply to

      Found the function that parses HTML content from the Status object, and we're going to add one transformation when the cleanup logic is triggered ;)

      In conversation Sunday, 29-Jan-2023 19:25:25 JST permalink
    • Embed this notice
      Ayo! (ayo@social.ayco.io)'s status on Sunday, 29-Jan-2023 19:25:27 JST Ayo! Ayo!
      in reply to
      • Elk

      @elk Alright, I know we are cleaning up mentions somewhere... and I want to find and I'm going to do this link clean up beside that

      In conversation Sunday, 29-Jan-2023 19:25:27 JST permalink
    • Embed this notice
      Ayo! (ayo@social.ayco.io)'s status on Sunday, 29-Jan-2023 19:25:28 JST Ayo! Ayo!
      in reply to
      • Elk

      @elk Come watch if you want to see me try to understand the code base ?

      In conversation Sunday, 29-Jan-2023 19:25:28 JST permalink

Feeds

  • Activity Streams
  • RSS 2.0
  • Atom
  • Help
  • About
  • FAQ
  • TOS
  • Privacy
  • Source
  • Version
  • Contact

GNU social JP is a social network, courtesy of GNU social JP管理人. It runs on GNU social, version 2.0.2-dev, available under the GNU Affero General Public License.

Creative Commons Attribution 3.0 All GNU social JP content and data are available under the Creative Commons Attribution 3.0 license.