From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on gnuweeb.org X-Spam-Level: X-Spam-Status: No, score=-1.2 required=5.0 tests=ALL_TRUSTED,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gnuweeb.org; s=default; t=1687982315; bh=qcOoRcdBWGFC/GNBFf5dzc1IiHeeogLxRlnoD0C/PuM=; h=From:To:Cc:Subject:Date; b=c3/tYE1hiO5pFYM+FccEZB6KQop1vDsSyX977pc0InojA0xstSR9QspgkDiLAuBx5 G106ITuarTAdBWjugihXlIZ8WjHdSDJrVvG3/FVOGCYn1/G6JNhk3hWK+MubLbIzo9 344Ax09EhKFUFaqQrPFpUsc4QTgDj35Mr4Aom3qgfBUVyX8spq16+/vOlDuPl39VDs QZFkfsxPkA1G+F4niE98WAWyCgr4lUtVy3gXOEriEsK8WhWTuH3C07R2H+5qaAVq4E MdsjpqzQ4WBs6IaMeZW5XMDUMCnsj7dT8PY/yw3AU3vpnUt5Dn6X89KKJ7SSEZpwjw P6SdNN1nOme+A== Received: from integral2.. (unknown [68.183.184.174]) by gnuweeb.org (Postfix) with ESMTPSA id 2E1C92370C3; Thu, 29 Jun 2023 02:58:32 +0700 (WIB) From: Ammar Faizi To: GNU/Weeb Mailing List Cc: Ammar Faizi , Michael William Jonathan , Nicholas Rosenberg , GNU/Weeb Facebook Team , VNLX Kernel Department Subject: [PATCH fb v1 0/3] A small bug fix for the mbasic changes Date: Thu, 29 Jun 2023 02:58:25 +0700 Message-Id: <20230628195828.1657850-1-ammarfaizi2@gnuweeb.org> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit List-Id: Hi, Michael reports that using the recent API, photo contents in the HonkaiStarRail.ID timeline are detected as a "text". Using the current parser, it detects those contents as a text with a link preview (where the preview is the post to the photo). Let's just visit the photo link if there exists before continue trying to parse it as a photo. Also, make sure we try to parse as a photo first before text. There are 3 patches in this series. The first and the second patches are just a simple tweak and clean up. The third patch is the fix to the serious issue. Patch 1: The getCache() function doesn't take the expiration date into account. Make sure it does. Patch 2: I often generate patch files in the same directory with the project directory. I don't want to commit them. Add '*.patch' to .gitignore to avoid that. Patch 3: The fix that's explained in the introduction. Signed-off-by: Ammar Faizi --- The following changes since commit dbc3dfcc32af4b934c0ace3dd7efbfe9878f133f: Merge branch 'dev.fast_asset' (Facebook Onion assets optimization) (2023-05-13 02:01:05 +0700) are available in the Git repository at: https://gitlab.torproject.org/ammarfaizi2/Facebook.git dev for you to fetch changes up to 0a1c38b9315cad0c6149c17beffae514d0ab93d5: fb: Post: Fix the wrong content type detection (photo issue) (2023-06-25 13:58:47 +0700) ---------------------------------------------------------------- Ammar Faizi (3): fb: Fix `getCache()` expiration logic handling fb: .gitignore: Ignore *.patch files fb: Post: Fix the wrong content type detection (photo issue) .gitignore | 3 ++- src/Facebook/Facebook.php | 5 +++++ src/Facebook/Methods/Post.php | 9 +++++++-- 3 files changed, 14 insertions(+), 3 deletions(-) base-commit: dbc3dfcc32af4b934c0ace3dd7efbfe9878f133f -- Ammar Faizi