From 75455d4370a08b0cba83345272d5e73340a71bd8 Mon Sep 17 00:00:00 2001

From: =?UTF-8?q?Jaakko=20Kera=CC=88nen?= jaakko.keranen@iki.fi

Date: Mon, 6 Nov 2023 19:21:51 +0200

Subject: [PATCH 1/1] Support for multiple Antenna URLs for sharing posts


50_bubble.py | 12 +++++++++++-

example.ini | 3 ++-

feeds.py | 8 +++++---

3 files changed, 18 insertions(+), 5 deletions(-)

diff --git a/50_bubble.py b/50_bubble.py

index b2dc785..e5d0d1c 100644

--- a/50_bubble.py

+++ b/50_bubble.py

@@ -2,6 +2,7 @@

import os

import re

+import shlex

import sys

import urllib.parse as urlparse

@@ -41,7 +42,10 @@ class Bubble:

     self.rate_register = max(1, cfg.getint('rate.register', 20)) # per hour, any remote

     self.rate_post = max(1, cfg.getint('rate.post', 10)) # per hour, per remote

     self.admin_certpass = cfg.get('admin.certpass', '')

     self.version = __version__

     # TODO: Could just check capsule Config's titan.upload_limit?

@@ -52,6 +56,12 @@ class Bubble:

     db.create_tables(self.admin_certpass)

     db.close()

 def is_feedback_enabled(self):

     return len(self.user_reactions) or self.thanks_enabled or self.likes_enabled

diff --git a/example.ini b/example.ini

index 9d66b8c..ea1a3a0 100644

--- a/example.ini

+++ b/example.ini

@@ -59,4 +59,5 @@ admin.certpass = password

repo.cachedir = /home/username/.bubble-cache/

; URL for broadcasting Gemini feed entries.

-; antenna.url = gemini://warmedal.se/~antenna/submit

+antenna.url = gemini://warmedal.se/~antenna/submit gemini://gemini.smallweb.space/antenna/submit

+antenna.label = "📡 Antenna" "DSN Antenna"

diff --git a/feeds.py b/feeds.py

index 26b8033..a08d3e3 100644

--- a/feeds.py

+++ b/feeds.py

@@ -257,9 +257,9 @@ def make_post_page_or_configure_feed(session):

                 actions.append(f'=> /mute/post/{post.id} 🔇 Mute {kind}\n')

         if session.is_antenna_enabled() and session.user.id == post.user and post.sub_owner == post.user:

             actions.append('\n')

         if session.is_deletable(post) and not session.is_editable(post):

             actions.append('\n')

@@ -856,7 +856,9 @@ def make_feed_page(session):

             if session.is_antenna_enabled() and c_user and user.id == c_user.id:

                 antenna_feed = f"{session.server_root()}{session.path}u/{user.name}/antenna"

             # Following and muting.

             if c_user and user.id != c_user.id:

--

2.25.1

Proxy Information
Original URL
gemini://git.skyjake.fi/bubble/main/patch/75455d4370a08b0cba83345272d5e73340a71bd8.patch
Status Code
Success (20)
Meta
text/plain
Capsule Response Time
96.59509 milliseconds
Gemini-to-HTML Time
1.920685 milliseconds

This content has been proxied by September (ba2dc).