Commit 7fde836a authored by jan.koester's avatar jan.koester
Browse files

Private messages

- conversations with up to 10 recipients (schema v5: pm_conversations,
  pm_participants, pm_messages, pm_blocks; users.pm_allow/pm_notify)
- /messages list with unread marks + count in the navigation,
  /messages/new (?to=name, from profiles and posts), /messages/<id> read and
  answer, remove from the own list (a new message brings it back, gone for
  good when nobody keeps it)
- fenrirds policy "Florium: Private Nachrichten" (default allow), banned
  members can read but not write; flood limits (10 s, 20 conversations/hour)
- control centre tab: receive on/off, mail notification, blocked members
  (blocking looks like "accepts none"; moderators are exempt). Moderators
  can't read other people's messages
- notification mail once per conversation until read, without the text,
  sent in the background
- [attach] in messages: only the participants see the image
- e2e 145/145, admin 54/54; upgrade 4 -> 5 checked with the 20261116 image

Co-Authored-By: default avatarClaude Opus 5.5 <noreply@anthropic.com>
parent 668a7e08
Loading
Loading
Loading
Loading
+1
Changes for CMakeLists.txt: 1 added line, 0 removed lines.
Original line number Diff line number Diff line
@@ -40,6 +40,7 @@ add_executable(florium
    src/forum.cpp
    src/admin.cpp
    src/ucp.cpp
    src/messages.cpp
    src/adminserver.cpp
    src/mail.cpp
    src/image.cpp
+7
Changes for share/florium.css: 7 added lines, 0 removed lines.
Original line number Diff line number Diff line
@@ -122,3 +122,10 @@ html[data-mode="dark"] .vb-html-value { color: #a8c7fa !important; } html[data-m
  table.list td.last, table.list th.last { display: none; }
  .ucp { grid-template-columns: 1fr; }
}

/* private messages */
.site-nav a.messages .count { display: inline-block; min-width: 1.4em; padding: 0 .4em; border-radius: 1em; background: var(--danger); color: #fff; font-size: .78em; font-weight: 700; text-align: center; line-height: 1.5; }
.pm-row.unread .thread-title { font-weight: 700; }
.pm-people { color: var(--muted); margin-top: -.4em; }
.post-author .pm-link { margin-top: .4em; font-size: .85em; }
article.post.pm .post-body { min-height: 2em; }
+44
Changes for share/i18n/en.tsv: 44 added lines, 0 removed lines.
Original line number Diff line number Diff line
@@ -461,3 +461,47 @@ Für diese Adresse läuft gerade schon eine Registrierung. Bitte versuche es gle
Es gibt schon ein Konto mit dieser Adresse. Melde dich damit an.	There is already an account with this address. Please log in with it.
Der Verzeichnisdienst ist nicht erreichbar.	The directory service is not reachable.
Die Registrierung ist gerade nicht möglich.	Registration is not possible right now.
{1} ungelesene Nachrichten	{1} unread messages
Private Nachrichten	Private messages
Nachrichten	Messages
Nachricht senden	Send message
Private Nachricht senden	Send a private message
Die Unterhaltung wurde aus deiner Liste entfernt.	The conversation was removed from your list.
Neue Nachricht	New message
Noch keine Nachrichten.	No messages yet.
neu	new
niemand mehr	nobody else
mit 	with 
Gelöschtes Mitglied	Deleted member
Du darfst keine privaten Nachrichten schreiben (Richtlinie „Florium: Private Nachrichten“).	You may not write private messages (policy “Florium: Private Nachrichten”).
Bitte mindestens einen Empfänger angeben.	Please enter at least one recipient.
Höchstens {1} Empfänger.	At most {1} recipients.
Das Mitglied „	The member “
“ gibt es nicht.	” does not exist.
Du kannst dir nicht selbst schreiben.	You cannot write to yourself.
 nimmt keine privaten Nachrichten an.	 does not accept private messages.
Bitte gib einen Betreff ein.	Please enter a subject.
Der Betreff ist zu lang (höchstens 200 Zeichen).	The subject is too long (at most 200 characters).
Bitte warte ein paar Sekunden vor der nächsten Nachricht.	Please wait a few seconds before the next message.
Du hast in der letzten Stunde zu viele Unterhaltungen begonnen.	You started too many conversations in the last hour.
Neue private Nachricht	New private message
Senden	Send
An (Benutzernamen, durch Komma getrennt)	To (user names, separated by commas)
Diese Unterhaltung gibt es nicht.	This conversation does not exist.
Du darfst keine privaten Nachrichten schreiben.	You may not write private messages.
In dieser Unterhaltung ist niemand mehr, der antworten könnte.	There is nobody left in this conversation who could answer.
Ein Teilnehmer nimmt keine Nachrichten von dir an.	A participant does not accept messages from you.
Teilnehmer: 	Participants: 
Unterhaltung aus deiner Liste entfernen?	Remove the conversation from your list?
Aus meiner Liste entfernen	Remove from my list
Diese Mitglieder gibt es nicht: 	These members do not exist: 
Zu viele blockierte Mitglieder.	Too many blocked members.
Einstellungen für Nachrichten gespeichert.	Message settings saved.
Zu deinen privaten Nachrichten	To your private messages
Private Nachrichten von anderen Mitgliedern empfangen	Receive private messages from other members
E-Mail bei neuen Nachrichten (einmal pro Unterhaltung, ohne den Text)	E-mail on new messages (once per conversation, without the text)
Für dein Konto ist im Forum keine E-Mail-Adresse hinterlegt, deshalb kommen keine Benachrichtigungen.	The forum has no e-mail address for your account, so no notifications are sent.
Dieses Forum verschickt keine E-Mails.	This forum does not send e-mails.
Blockierte Mitglieder (Benutzernamen, durch Komma getrennt)	Blocked members (user names, separated by commas)
Blockierte Mitglieder können dir keine Nachrichten schicken und in gemeinsamen Unterhaltungen nicht mehr antworten. Sie sehen nicht, dass du sie blockiert hast. Moderatoren sind davon ausgenommen.	Blocked members cannot send you messages and can no longer answer in shared conversations. They don't see that you blocked them. Moderators are exempt.
Betreff	Subject
+2
Changes for src/auth.cpp: 2 added lines, 0 removed lines.
Original line number Diff line number Diff line
@@ -860,6 +860,8 @@ std::vector<florium::PolicyDef> florium::globalPolicies(const SiteConfig &cfg) {
        {policy::UPLOAD, "Florium: Bilder hochladen", "May upload images and an avatar in florium", true, ""},
        {policy::PROFILE, "Florium: Profil und Signatur", "May edit the profile texts and the signature in florium",
         true, ""},
        {policy::MESSAGES, "Florium: Private Nachrichten", "May send private messages to other members in florium",
         true, ""},
        {policy::MODERATOR, "Florium: Moderation", "Moderator in florium (edit/delete/move/lock everything)", false,
         cfg.moderatorGroup},
        {policy::ADMIN, "Florium: Administration", "Administrator of florium (forums, themes, members)", false,
+1
Changes for src/auth.h: 1 added line, 0 removed lines.
Original line number Diff line number Diff line
@@ -24,6 +24,7 @@ namespace florium {
        inline constexpr const char *POST = "2d1bfebd-be10-414f-8ba9-44c609faa40a";       ///< default allow
        inline constexpr const char *UPLOAD = "ac998843-893d-4a70-aebc-77ab52b6bb34";     ///< default allow
        inline constexpr const char *PROFILE = "4ea75b8e-36f8-4847-a74e-6084d3699dc6";    ///< default allow
        inline constexpr const char *MESSAGES = "5b0f2c7e-8d41-4e9a-b6a3-1f7c2d9e4a60";   ///< default allow
        inline constexpr const char *MODERATOR = "6c5b61e2-4463-4753-837e-5f860f3db492";  ///< default deny
        inline constexpr const char *ADMIN = "80a4134b-7611-4e16-be87-3828bd8313f3";      ///< default deny
    }
Loading