grouprise issueshttps://git.hack-hro.de/groups/grouprise/-/issues2024-03-21T19:21:21+01:00https://git.hack-hro.de/grouprise/grouprise/-/issues/813Code formatting/linting with ruff2024-03-21T19:21:21+01:00Konrad MohrfeldtCode formatting/linting with ruff[ruff](https://docs.astral.sh/ruff/) is the new **fast** kid on the block?
I’d like us to switch. Any objections?[ruff](https://docs.astral.sh/ruff/) is the new **fast** kid on the block?
I’d like us to switch. Any objections?https://git.hack-hro.de/grouprise/grouprise/-/issues/812Utilize RSS' pubDate to prevent RSS post flooding in common cases2024-03-27T00:03:42+01:00Konrad MohrfeldtUtilize RSS' pubDate to prevent RSS post flooding in common casesWe often see loads of posts for new groups in grouprise that recently added their website URL and activated the RSS-auto-import feature. It seems these posts are imported without taking their `pubDate` into account. Might it be a good id...We often see loads of posts for new groups in grouprise that recently added their website URL and activated the RSS-auto-import feature. It seems these posts are imported without taking their `pubDate` into account. Might it be a good idea to set `pubDate` as some sort of post date (I’m not sure if we even have that) or `time_created` in order to avoid spamming the front page?https://git.hack-hro.de/grouprise/grouprise/-/issues/810"Featured" tags einführen2024-03-18T08:51:31+01:00Robert"Featured" tags einführenFür Betreiber:innen soll es möglich sein, bestimmte Tags in den Settings als "besonders" zu markieren. Diese können dann in der Darstellung hervorgehoben werden und bevorzugt bei der Auswahl vorgeschlagen werden.
Ein Beispiel ist die Zu...Für Betreiber:innen soll es möglich sein, bestimmte Tags in den Settings als "besonders" zu markieren. Diese können dann in der Darstellung hervorgehoben werden und bevorzugt bei der Auswahl vorgeschlagen werden.
Ein Beispiel ist die Zukunftshandeln-MV-Plattform: Dort sollen die SDG-Tags besonders behandelt werden.
- [x] Featured Tags (FTs) in Sidebar-Kasten auf Startseite
- [ ] Kasten rutscht in mobiler Ansicht in Hauptschlauch
- [x] Minimale Anzahl von FTs in Gruppenbeschreibung erzwingen
- [x] FTs bei Tag-Feld zur Auswahl vorschlagenRobertRoberthttps://git.hack-hro.de/grouprise/grouprise/-/issues/809Loss of database connection: SSL connection has been closed unexpectedly2024-01-04T20:56:48+01:00Lars KruseLoss of database connection: SSL connection has been closed unexpectedlyBeim Senden einer Nachricht wurde folgende Exception ausgelöst:
```
[pid: 2879|app: 0|req: 191652/723115] 10.42.7.1 () {42 vars in 735 bytes} [Thu Jan 4 20:50:55 2024] GET /AndreasK/?month=11&year=2024 => generated 26820 bytes
in 91 m...Beim Senden einer Nachricht wurde folgende Exception ausgelöst:
```
[pid: 2879|app: 0|req: 191652/723115] 10.42.7.1 () {42 vars in 735 bytes} [Thu Jan 4 20:50:55 2024] GET /AndreasK/?month=11&year=2024 => generated 26820 bytes
in 91 msecs (HTTP/1.1 200) 9 headers in 646 bytes (1 switches on core 0)
ERROR:django.request:Internal Server Error: /stadt/gestalten/328/conversations/add/
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/peewee.py", line 3129, in execute_sql
cursor.execute(sql, params or ())
psycopg2.errors.AdminShutdown: terminating connection due to administrator command
SSL connection has been closed unexpectedly
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/django/core/handlers/exception.py", line 47, in inner
response = get_response(request)
File "/usr/lib/python3/dist-packages/django/core/handlers/base.py", line 181, in _get_response
response = wrapped_callback(request, *callback_args, **callback_kwargs)
File "/usr/share/grouprise/dependencies/sentry_sdk/integrations/django/views.py", line 84, in sentry_wrapped_callback
return callback(request, *args, **kwargs)
File "/usr/lib/python3/dist-packages/django/views/generic/base.py", line 70, in view
return self.dispatch(request, *args, **kwargs)
File "/usr/lib/python3/dist-packages/django/contrib/auth/mixins.py", line 104, in dispatch
return super().dispatch(request, *args, **kwargs)
File "/usr/lib/python3/dist-packages/django/views/generic/base.py", line 98, in dispatch
return handler(request, *args, **kwargs)
File "/usr/lib/python3/dist-packages/django/views/generic/edit.py", line 172, in post
return super().post(request, *args, **kwargs)
File "/usr/lib/python3/dist-packages/django/views/generic/edit.py", line 142, in post
return self.form_valid(form)
File "/usr/lib/python3/dist-packages/django/contrib/messages/views.py", line 11, in form_valid
response = super().form_valid(form)
File "/usr/lib/python3/dist-packages/django/views/generic/edit.py", line 125, in form_valid
self.object = form.save()
File "/usr/share/grouprise/python-lib/grouprise/features/conversations/forms.py", line 90, in save
grouprise.core.signals.post_create.send(
File "/usr/lib/python3/dist-packages/django/dispatch/dispatcher.py", line 180, in send
return [
File "/usr/lib/python3/dist-packages/django/dispatch/dispatcher.py", line 181, in <listcomp>
(receiver, receiver(signal=self, sender=sender, **named))
File "/usr/share/grouprise/dependencies/sentry_sdk/integrations/django/signals_handlers.py", line 76, in wrapper
return receiver(*args, **kwargs)
File "/usr/share/grouprise/python-lib/grouprise/features/notifications/signals.py", line 26, in send_notifications
_send_notifications(instance)
File "/usr/share/grouprise/dependencies/huey/api.py", line 866, in __call__
return self.huey.enqueue(self.s(*args, **kwargs))
File "/usr/share/grouprise/dependencies/huey/api.py", line 301, in enqueue
self.storage.enqueue(self.serialize_task(task), task.priority)
File "/usr/share/grouprise/dependencies/huey/contrib/sql_huey.py", line 92, in enqueue
self.Task.create(queue=self.name, data=data, priority=priority or 0)
File "/usr/lib/python3/dist-packages/peewee.py", line 6324, in create
inst.save(force_insert=True)
File "/usr/lib/python3/dist-packages/peewee.py", line 6534, in save
pk = self.insert(**field_dict).execute()
File "/usr/lib/python3/dist-packages/peewee.py", line 1898, in inner
return method(self, database, *args, **kwargs)
File "/usr/lib/python3/dist-packages/peewee.py", line 1969, in execute
return self._execute(database)
File "/usr/lib/python3/dist-packages/peewee.py", line 2730, in _execute
return super(Insert, self)._execute(database)
File "/usr/lib/python3/dist-packages/peewee.py", line 2463, in _execute
cursor = self.execute_returning(database)
File "/usr/lib/python3/dist-packages/peewee.py", line 2470, in execute_returning
cursor = database.execute(self)
File "/usr/lib/python3/dist-packages/peewee.py", line 3142, in execute
return self.execute_sql(sql, params, commit=commit)
File "/usr/lib/python3/dist-packages/peewee.py", line 3136, in execute_sql
self.commit()
File "/usr/lib/python3/dist-packages/peewee.py", line 2902, in __exit__
reraise(new_type, new_type(exc_value, *exc_args), traceback)
File "/usr/lib/python3/dist-packages/peewee.py", line 185, in reraise
raise value.with_traceback(tb)
File "/usr/lib/python3/dist-packages/peewee.py", line 3129, in execute_sql
cursor.execute(sql, params or ())
peewee.OperationalError: terminating connection due to administrator command
SSL connection has been closed unexpectedly
```
Irgendwie scheint die Datenbankverbindung des uwsgi-Prozess eingeschlafen zu sein.https://git.hack-hro.de/grouprise/grouprise/-/issues/802move away from `uwsgi`2023-02-26T16:43:03+01:00Lars Krusemove away from `uwsgi`[uwsgi](https://uwsgi-docs.readthedocs.io/) is a great tool and was happily used by `grouprise` for a long time.
But the uwsgi maintainers decided to focus on other projects and announced switch to [maintenance mode](https://github.com/...[uwsgi](https://uwsgi-docs.readthedocs.io/) is a great tool and was happily used by `grouprise` for a long time.
But the uwsgi maintainers decided to focus on other projects and announced switch to [maintenance mode](https://github.com/unbit/uwsgi/commit/5838086dd4490b8a55ff58fc0bf0f108caa4e079) (and [a few more words of explanation](https://github.com/unbit/uwsgi/issues/2407#issuecomment-1054547256).
Thus we should switch to another application server in the near future.
The [Django deployment documentation](https://docs.djangoproject.com/en/stable/howto/deployment/) references three options:
* [daphne](https://github.com/django/daphne/)
* [hypercorn](https://pgjones.gitlab.io/hypercorn/)
* [uvicorn](https://www.uvicorn.org/)
All of these look "healthy" from a Debian packaging perspective:
```
$ rmadison daphne python3-hypercorn python3-uvicorn
daphne | 2.2.5-1 | oldstable | all
daphne | 3.0.1-1 | stable | all
daphne | 4.0.0-1 | testing | all
daphne | 4.0.0-1 | unstable | all
python3-hypercorn | 0.11.2-1 | stable | all
python3-hypercorn | 0.13.2-3 | testing | all
python3-hypercorn | 0.13.2-3 | unstable | all
python3-uvicorn | 0.3.24-1 | oldstable | all
python3-uvicorn | 0.13.3-1 | stable | all
python3-uvicorn | 0.17.6-1 | testing | all
python3-uvicorn | 0.17.6-1 | unstable | all
```https://git.hack-hro.de/grouprise/grouprise/-/issues/799Matrix-Chat: future of room layout2023-01-02T14:15:02+01:00RobertMatrix-Chat: future of room layoutAt the moment there are two Matrix rooms per group. One is public and one private. Regarding this layout @robert wrote in #794:
> Besides, I have the feeling, that two rooms are one too much. Maybe we should think of using only one room...At the moment there are two Matrix rooms per group. One is public and one private. Regarding this layout @robert wrote in #794:
> Besides, I have the feeling, that two rooms are one too much. Maybe we should think of using only one room with configurable settings (public/ private).
And @lars replied:
> Yes, somehow I share this feeling. But maybe this issue will get fixed, when Matrix usage is more widespread?https://git.hack-hro.de/grouprise/grouprise/-/issues/797Respect permission handling when accessing cached files (e.g. thumbnails)2022-12-23T16:10:07+01:00Lars KruseRespect permission handling when accessing cached files (e.g. thumbnails)Currently we are still delivering the content of `/var/lib/media/CACHE/` directly via nginx. Thus we do not reject requests for internal (cached) files.
See the related issue #769.
We should try to verify the permission for accessing a...Currently we are still delivering the content of `/var/lib/media/CACHE/` directly via nginx. Thus we do not reject requests for internal (cached) files.
See the related issue #769.
We should try to verify the permission for accessing a cached item (maybe based on a part of its path?) and serve the file via Django.https://git.hack-hro.de/grouprise/grouprise/-/issues/794Matrix-Chat: connect to external telegram channels2023-01-01T19:01:00+01:00Lars KruseMatrix-Chat: connect to external telegram channelsCurrently the matrix-chat bot can do the following:
* create rooms (private/public) for each grouprise group
* create a public feed room for the whole site
* create a private room for every grouprise user
* send notifications to these ro...Currently the matrix-chat bot can do the following:
* create rooms (private/public) for each grouprise group
* create a public feed room for the whole site
* create a private room for every grouprise user
* send notifications to these rooms
Maybe we could combine these features with the [mautrix-telegram bot](https://github.com/mautrix/telegram) in some cool way?
# Proposal A
Users may enable the "bridge to telegram" setting for a group and specify a target telegram group (separate for the public and the private room).
Our matrix-chat bot configures the usual Matrix rooms for the group and (if the above setting is enabled) also invites a site-configured mautrix-telegram bot into the room. Afterwards it sends the telegram bot a suitable command (e.g. asking to join the target telegram room). When the bot is allowed to enter that telegram room, it will start to forward notifications (and other messsages) from the Matrix room to the telegram room (and in the reverse direction).
Requisites:
* grouprise site configuration refers to a mautrix-telegram bot (can be hosted by someone else)
* do we need to set up a special relationship with that bot?
* new group settings (each for the public and the private room): "target telegram room to be connected"
Alternatives:
* describe the procedure (invite bot, send a command to the bot) to the grouprise usershttps://git.hack-hro.de/grouprise/grouprise/-/issues/793Matrix chat: external matrix users are redirected to matrix.to instead of the...2023-01-02T19:32:22+01:00Lars KruseMatrix chat: external matrix users are redirected to matrix.to instead of their homeserver's web clientSince [synapse#11895](https://github.com/matrix-org/synapse/pull/11895) was merged and released (probably somewhere between v1.51 and v1.60), Matrix servers do not respond to the `/_matrix/client` path anymore. The path was changed to a ...Since [synapse#11895](https://github.com/matrix-org/synapse/pull/11895) was merged and released (probably somewhere between v1.51 and v1.60), Matrix servers do not respond to the `/_matrix/client` path anymore. The path was changed to a (from my point of view) unsuitable location, which will prevent many Matrix homeservers from adopting it (see the issue I openend: [synapse#14722](https://github.com/matrix-org/synapse/issues/14722)).
This broke our [discovery of the user's Matrix web client](https://git.hack-hro.de/grouprise/grouprise/-/blob/main/grouprise/features/matrix_chat/views.py#L49) for users with external Matrix accounts.
Now users with external Matrix accounts end up below `https://matrix.to/` (with the generic web client selection dialog) instead of opening the web client of their Matrix homeserver. This is rather confusing - especially for new users of Matrix.
What should we do now?
* A) run a quick survey of currently used external Matrix servers in our grouprise instances and provide a default list of mappings between Matrix homeservers and their web clients (e.g. as a configuration)
* B) instead of redircting to `matrix.to` we could respond with a helpful message like "now open your matrix client and switch to the room #<xyz>"
* C) adjust the Matrix homeserver setups within our reach in order to comply with the new discovery endpoint
Technically (C) would be appropriate, but personally I would not be willing to do that work (at least not before the Matrix people confirmed, that the new way will really stay here for a long time). Thus, from my point of view, (A) would be ugly, but preferable.
What do you think?https://git.hack-hro.de/grouprise/grouprise/-/issues/791Embedding calender in external websites?2024-03-27T21:31:07+01:00Lars KruseEmbedding calender in external websites?The local hackspace would like to embed "their" events (belonging to their group in the grouprise instance) into their external static website.
I could imagine the following approaches for achieving this:
* A) Maybe there is some js-bas...The local hackspace would like to embed "their" events (belonging to their group in the grouprise instance) into their external static website.
I could imagine the following approaches for achieving this:
* A) Maybe there is some js-based application/widget/something for displaying the content of an `.ical` file, which could be easily embedded into a static website?
* In this case we could describe an example in the documentation.
* B) `grouprise` could emit an `html` snippet (e.g. below `/GROUP/-/embed/calendar`), which is suitable for being included in an `iframe`
* maybe this is not a good idea anymore due to cross-site uglinesses?
* C) `grouprise` could provide a javascript snippet for visualizing a grouprise calender
* [gancio](https://gancio.org/usage/embed#webcomponents) refers to [webcomponents](https://www.webcomponents.org/)
* maybe this would use the `.ical` export or it would use a grouprise-specific API endpoint for accessing the data
What do you think?https://git.hack-hro.de/grouprise/grouprise/-/issues/789Mark builtin notifications as read/unread individually2022-09-01T11:17:14+02:00RobertMark builtin notifications as read/unread individuallySince !41 this should be possible. But we need UI suggestions, @kmohrf. :)Since !41 this should be possible. But we need UI suggestions, @kmohrf. :)https://git.hack-hro.de/grouprise/grouprise/-/issues/785Enable image uploads for conversations2022-07-17T19:25:15+02:00RobertEnable image uploads for conversationsIn a conversation people want to simply upload an image as a single contribution.In a conversation people want to simply upload an image as a single contribution.https://git.hack-hro.de/grouprise/grouprise/-/issues/784Django 4.1: 'defaulttags' is used for multiple template tag modules2022-06-20T13:10:34+02:00Lars KruseDjango 4.1: 'defaulttags' is used for multiple template tag modulesDjango beschwert sich ab Version 4.1 über folgendes:
```
1?: (templates.E003) 'defaulttags' is used for multiple template tag modules: 'grouprise.features.tags.templatetags.defaulttags', 'grouprise.core.templatetags.defaulttags'
```
Te...Django beschwert sich ab Version 4.1 über folgendes:
```
1?: (templates.E003) 'defaulttags' is used for multiple template tag modules: 'grouprise.features.tags.templatetags.defaulttags', 'grouprise.core.templatetags.defaulttags'
```
Template-Tags sind mir ein wenig unklar, also ich weiß nicht, was die Namen der Tag-Module zu sagen haben und warum das letzte Segment des Modulpfads neuerdings eindeutig sein müsste.
Die einzige Doku, die ich zu dem Test E003 finden konnte, ist [hier](https://django.readthedocs.io/en/latest/ref/checks.html#templates).
Habt ihr Gedanken dazu? Einfach die Module umbenennen?https://git.hack-hro.de/grouprise/grouprise/-/issues/783Bildkompression in Introgalerie2022-05-16T11:42:28+02:00Konrad MohrfeldtBildkompression in IntrogalerieEinige Menschen sind traurig, weil die Bildqualität in der Introgalerie ihrer Gruppe etwas zu wünschen übrig lässt. Wir sollten prüfen, ob wir konkret für die Anzeige dieser Galerie die Kompression etwas reduzieren können, auf das auch k...Einige Menschen sind traurig, weil die Bildqualität in der Introgalerie ihrer Gruppe etwas zu wünschen übrig lässt. Wir sollten prüfen, ob wir konkret für die Anzeige dieser Galerie die Kompression etwas reduzieren können, auf das auch kleinere Schrift in Bildern weiterhin gut lesbar ist.https://git.hack-hro.de/grouprise/grouprise/-/issues/782Zusätzliche Bildformate für Bildpreviews2022-05-16T11:40:44+02:00Konrad MohrfeldtZusätzliche Bildformate für BildpreviewsFür Previews von Bildern, insbesondere in der Introgallerie, wäre es schön, wenn wir moderne Bildformate wie WEBP und AVIF unterstützen würden. Damit wäre die Bildqualität bei gleichen Dateigrößen in vielen Fällen wahrscheinlich sehr vie...Für Previews von Bildern, insbesondere in der Introgallerie, wäre es schön, wenn wir moderne Bildformate wie WEBP und AVIF unterstützen würden. Damit wäre die Bildqualität bei gleichen Dateigrößen in vielen Fällen wahrscheinlich sehr viel besser.https://git.hack-hro.de/grouprise/grouprise/-/issues/781Reihenfolge im Galerieeditor2022-05-16T11:37:28+02:00Konrad MohrfeldtReihenfolge im GalerieeditorMenschen die eine Galerie bearbeiten legen manchmal Wert auf die Reihenfolge der Bilder, insbesondere wenn es sich um die Introgalerie handelt. Wir sollten ersichtlich machen, in welcher Reihenfolge die Bilder angezeigt werden und sie gg...Menschen die eine Galerie bearbeiten legen manchmal Wert auf die Reihenfolge der Bilder, insbesondere wenn es sich um die Introgalerie handelt. Wir sollten ersichtlich machen, in welcher Reihenfolge die Bilder angezeigt werden und sie ggf. auch sortierbar machen.https://git.hack-hro.de/grouprise/grouprise/-/issues/780Karte klaut auf kleinen Bildschirmgrößen (z.B. Smartphones) den Focus2022-05-11T11:29:20+02:00Konrad MohrfeldtKarte klaut auf kleinen Bildschirmgrößen (z.B. Smartphones) den FocusDas Kartenfeature, das wir für [treffpunkt.zukunftshandeln-mv.de](https://treffpunkt.zukunftshandeln-mv.de/) entwickelt haben und dort im Einsatz ist, klaut beim Scrollen auf Smartphones den Focus, da die Karte dort die volle Bildschirmb...Das Kartenfeature, das wir für [treffpunkt.zukunftshandeln-mv.de](https://treffpunkt.zukunftshandeln-mv.de/) entwickelt haben und dort im Einsatz ist, klaut beim Scrollen auf Smartphones den Focus, da die Karte dort die volle Bildschirmbreite einnimmt.
Eine mögliche Abhilfe wäre es, die Scrollposition der Karte nur mit zwei Fingern als Geste zu steuern, falls das Gerät auch Touch-Eingabe unterstützt, was bei der geringen Bildschirmbreite sicher nicht alle aber quasi alle relevanten Geräte umfassen sollte.https://git.hack-hro.de/grouprise/grouprise/-/issues/779matrix-chat: remove/ban external user from public matrix rooms2022-04-11T13:22:59+02:00Lars Krusematrix-chat: remove/ban external user from public matrix roomsRecently there appeared a bit of spam via Matrix on stadtgestalten.org. The spam bot did not create a grouprise account, but just joined two (or more?) public rooms and emitted a message.
It would be nice, if we could remove such users ...Recently there appeared a bit of spam via Matrix on stadtgestalten.org. The spam bot did not create a grouprise account, but just joined two (or more?) public rooms and emitted a message.
It would be nice, if we could remove such users from *all* matrix rooms, which were populated (and are administered) by grouprise's `matrix-chat` bot.
This could be an administration command, as well as a grouprise-commander bot command.
We need to decide, whether "remove" or "ban" would be the appropriate reaction. Probably "ban" is the way to go.https://git.hack-hro.de/grouprise/grouprise/-/issues/777"tab": automatically selected tab is not formatted as bold2022-03-25T04:51:38+01:00Lars Kruse"tab": automatically selected tab is not formatted as boldAfter loading a page containing a "tabbed" widget, the label of the currently active tab (the first) is not formatted as bold.
The active tab receives the proper CSS class (`tabbed-tab-current`), but the corresponding CSS selector seems...After loading a page containing a "tabbed" widget, the label of the currently active tab (the first) is not formatted as bold.
The active tab receives the proper CSS class (`tabbed-tab-current`), but the corresponding CSS selector seems to be wrong (see [tabbed.less#L52](https://git.hack-hro.de/grouprise/grouprise/-/blob/main/res/css/components/tabbed.less#L52)):
```css
.tabbed-tab.tabbed-tab-current &,
.tabs-component-tab.is-active & {
```
After editing the generated CSS manually, I think that the following changes are needed:
* `.tabbed-tab` needs to be removed from the first line
* the `&` needs to be removed from both lineshttps://git.hack-hro.de/grouprise/grouprise/-/issues/776Files uploaded as `ImageField` items may overwrite each other2023-02-10T10:22:33+01:00Lars KruseFiles uploaded as `ImageField` items may overwrite each otherCurrently files being uploaded into an `ImageField` element (e.g. `logo` or `avatar` for a `Gestalt`) are not checked for unique filenames. They are simply uploaded with their given filename.
This creates several problems:
* Multiple fi...Currently files being uploaded into an `ImageField` element (e.g. `logo` or `avatar` for a `Gestalt`) are not checked for unique filenames. They are simply uploaded with their given filename.
This creates several problems:
* Multiple files with the same name can be uploaded. They overwrite each other (e.g. `logo.png`).
* Since the storage for `ImageField` items is shared with the new generic file upload storage, it is possible to overwrite a specific existing files (on purpose) simply by uploading a file with exactly the wanted target filename (sixteen characters, ...).
Thus we should probably implement one of the following approaches:
* A) migrate the `ImageField` items to the new file storage infrastructure
* B) move the avatar and logo files (and all other uses of the `ImageField`) to separate subdirectories below the media directory (e.g. `media/avatar/`).
* This would at least solve the issue of overwriting files in the generic file storage. But it would still be possible to overwrite the logo/avatar images of other people or groups due to filename clashes.
(B) is probably out of question, since the problems are only partially fixed. (A) is probably the way to go.