From d316f7a470c7c2daaf319542d7ade8c6b2bb5422 Mon Sep 17 00:00:00 2001 From: Mike Macgirvin Date: Mon, 27 May 2024 08:01:19 +1000 Subject: [PATCH 01/11] remove ancient video bbcode link from event and comment templates --- src/Lib/ThreadItem.php | 1 - view/tpl/event_form.tpl | 3 --- 2 files changed, 4 deletions(-) diff --git a/src/Lib/ThreadItem.php b/src/Lib/ThreadItem.php index d2ab141e9..f3bdf1fad 100644 --- a/src/Lib/ThreadItem.php +++ b/src/Lib/ThreadItem.php @@ -988,7 +988,6 @@ class ThreadItem '$edupload' => t('Attach file from your device'), '$edembed' => t('Attach file from your personal cloud'), '$edurl' => t('Insert Link'), - '$edvideo' => t('Video'), '$preview' => t('Preview'), '$reset' => t('Reset'), '$indent' => $indent, diff --git a/view/tpl/event_form.tpl b/view/tpl/event_form.tpl index b385ae339..cc1940e1e 100755 --- a/view/tpl/event_form.tpl +++ b/view/tpl/event_form.tpl @@ -62,9 +62,6 @@ - From f30f94e6c0f5978216e617ac825234720bf28fbb Mon Sep 17 00:00:00 2001 From: Mike Macgirvin Date: Mon, 27 May 2024 08:26:07 +1000 Subject: [PATCH 02/11] change lock text on item_restrict & 1 to reflect reality more accurately --- src/Lib/ThreadItem.php | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/src/Lib/ThreadItem.php b/src/Lib/ThreadItem.php index f3bdf1fad..cca1ab3b8 100644 --- a/src/Lib/ThreadItem.php +++ b/src/Lib/ThreadItem.php @@ -135,7 +135,7 @@ class ThreadItem if ($item['item_restrict'] & 1) { $privacy_warning = true; - $lock = t('This comment was sent as a direct (private) message but the conversation has a different privacy expectation and any replies to it may be seen by others. Discretion advised.'); + $lock = t('This comment was sent as a protected or private message but the conversation has a different privacy expectation and any replies to it may be seen by others. Discretion advised.'); } @@ -961,7 +961,15 @@ class ThreadItem $feature_auto_save_draft = ((Features::enabled($conv->get_profile_owner(), 'auto_save_draft')) ? "true" : "false"); $permanent_draft = ((intval($conv->get_profile_owner()) === intval(local_channel()) && Apps::system_app_installed($conv->get_profile_owner(), 'Drafts')) ? t('Save draft') : EMPTY_STR); - + /* + $isContained = str_contains($parent_item['tgt_type'], 'Collection') || ($parent_item['item_restrict'] & 4); + $is_moderated = their_perms_contains($parent_item['uid'], (is_array($sendto) ? $sendto[0] : $sendto), 'moderated'); + if ($relay_to_owner && $thread_is_public && (! $is_moderated) && (! $question) && (! Channel::is_group($parent_item['uid']))) { + if (get_pconfig($target_item['uid'], 'system', 'hyperdrive', true) || !$isContained) { + // + } + } +*/ $comment_box = replace_macros($template, [ '$return_path' => '', From 95b6f0b43531642feb0b0430d74058b62a0be0d3 Mon Sep 17 00:00:00 2001 From: Mike Macgirvin Date: Sun, 26 May 2024 15:28:17 -0700 Subject: [PATCH 03/11] version+strings --- util/messages.po | 925 +++++++++++++++++++++++------------------------ version.php | 2 +- 2 files changed, 461 insertions(+), 466 deletions(-) diff --git a/util/messages.po b/util/messages.po index 8013eac73..0bb1ac8cc 100644 --- a/util/messages.po +++ b/util/messages.po @@ -6,9 +6,9 @@ #, fuzzy msgid "" msgstr "" -"Project-Id-Version: 24.05.25\n" +"Project-Id-Version: 24.05.27\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-05-24 15:13-0700\n" +"POT-Creation-Date: 2024-05-26 15:28-0700\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -207,8 +207,8 @@ msgstr "" #: extend/addon/a/fuzzloc/Mod_Fuzzloc.php:58 #: extend/addon/a/logrot/logrot.php:38 extend/addon/a/nsfw/Mod_Nsfw.php:53 #: extend/addon/a/openstreetmap/openstreetmap.php:218 -#: extend/addon/a/zotpost/Mod_zotpost.php:83 src/Lib/AccessList.php:403 -#: src/Lib/ThreadItem.php:979 src/Lib/Stringsjs.php:27 +#: extend/addon/a/zotpost/Mod_zotpost.php:83 src/Lib/ThreadItem.php:987 +#: src/Lib/AccessList.php:403 src/Lib/Stringsjs.php:27 #: src/Module/Admin/Themes.php:160 src/Module/Admin/Site.php:276 #: src/Module/Admin/Profs.php:195 src/Module/Admin/Logs.php:87 #: src/Module/Admin/Customsql.php:38 src/Module/Admin/Channels.php:145 @@ -583,6 +583,82 @@ msgstr "" msgid "This API method requires authentication." msgstr "" +#: include/bbcode.php:259 include/bbcode.php:1177 include/bbcode.php:2077 +#: include/bbcode.php:2080 include/misc.php:1827 src/Module/Embedphotos.php:121 +msgid "Image/photo" +msgstr "" + +#: include/bbcode.php:325 +msgid "Encrypted content" +msgstr "" + +#: include/bbcode.php:362 +#, php-format +msgid "(Embedded app '%s' could not be displayed)." +msgstr "" + +#: include/bbcode.php:406 +#, php-format +msgid "Install %1$s element %2$s" +msgstr "" + +#: include/bbcode.php:409 +#, php-format +msgid "" +"This post contains an installable %s element, however you lack permissions " +"to install it on this site." +msgstr "" + +#: include/bbcode.php:420 src/Module/Impel.php:55 +msgid "webpage" +msgstr "" + +#: include/bbcode.php:423 src/Module/Impel.php:65 +msgid "layout" +msgstr "" + +#: include/bbcode.php:426 src/Module/Impel.php:60 +msgid "block" +msgstr "" + +#: include/bbcode.php:429 src/Module/Impel.php:72 +msgid "menu" +msgstr "" + +#: include/bbcode.php:680 +msgid "card" +msgstr "" + +#: include/bbcode.php:682 +msgid "article" +msgstr "" + +#: include/bbcode.php:684 include/conversation.php:91 include/misc.php:2377 +#: src/Lib/Markdown.php:220 src/Module/Tagger.php:93 +msgid "post" +msgstr "" + +#: include/bbcode.php:690 src/Lib/Markdown.php:218 +#, php-format +msgid "%1$s wrote the following %2$s %3$s" +msgstr "" + +#: include/bbcode.php:797 include/bbcode.php:806 +msgid "Click to open/close" +msgstr "" + +#: include/bbcode.php:806 +msgid "spoiler" +msgstr "" + +#: include/bbcode.php:1514 include/bbcode.php:1724 +msgid "Different viewers will see this text differently" +msgstr "" + +#: include/bbcode.php:2055 +msgid "$1 wrote:" +msgstr "" + #: include/auth.php:213 msgid "Delegation session ended." msgstr "" @@ -626,6 +702,92 @@ msgstr "" msgid "Cloned channel not found. Import failed." msgstr "" +#: include/connections.php:155 include/conversation.php:856 +#: src/Lib/Libprofile.php:309 src/Module/Directory.php:453 +#: src/Module/Fedi_id.php:55 src/Widget/Follow.php:41 +#: src/Widget/Suggestions.php:49 +msgid "Connect" +msgstr "" + +#: include/connections.php:183 include/conversation.php:876 +#: src/Lib/Libprofile.php:296 +msgid "Direct Message" +msgstr "" + +#: include/connections.php:200 +msgid "New window" +msgstr "" + +#: include/connections.php:201 +msgid "Open the selected location in a different window or browser tab" +msgstr "" + +#: include/connections.php:848 include/event.php:1482 +#: src/Module/Connedit.php:870 src/Module/Cdav.php:1380 +#: src/Module/Settings/Profile_edit.php:666 +msgid "Mobile" +msgstr "" + +#: include/connections.php:849 include/event.php:1483 +#: src/Module/Connedit.php:871 src/Module/Cdav.php:1381 +#: src/Module/Settings/Profile_edit.php:667 +msgid "Home" +msgstr "" + +#: include/connections.php:850 include/event.php:1484 +msgid "Home, Voice" +msgstr "" + +#: include/connections.php:851 include/event.php:1485 +msgid "Home, Fax" +msgstr "" + +#: include/connections.php:852 include/event.php:1486 +#: src/Module/Connedit.php:872 src/Module/Cdav.php:1382 +#: src/Module/Settings/Profile_edit.php:668 +msgid "Work" +msgstr "" + +#: include/connections.php:853 include/event.php:1487 +msgid "Work, Voice" +msgstr "" + +#: include/connections.php:854 include/event.php:1488 +msgid "Work, Fax" +msgstr "" + +#: include/connections.php:855 include/connections.php:861 +#: include/event.php:1489 include/event.php:1495 src/Module/Connedit.php:873 +#: src/Module/Cdav.php:1383 src/Module/Settings/Profile_edit.php:669 +#: src/Module/Settings/Profile_edit.php:790 +#: src/Module/Settings/Profile_edit.php:808 +#: src/Module/Settings/Profile_edit.php:858 +#: src/Module/Settings/Profile_edit.php:878 +#: src/Module/Settings/Profile_edit.php:915 +msgid "Other" +msgstr "" + +#: include/connections.php:958 +msgid "No connections" +msgstr "" + +#: include/connections.php:970 src/Lib/AccessList.php:387 src/Lib/Apps.php:400 +#: src/Lib/Libacl.php:87 src/Module/Affinity.php:68 src/Module/Connedit.php:699 +#: src/Module/Connections.php:419 src/Module/Lists.php:30 +#: src/Module/Stream.php:151 src/Widget/Affinity.php:33 +msgid "Connections" +msgstr "" + +#: include/connections.php:989 +#, php-format +msgid "View all %s connections" +msgstr "" + +#: include/connections.php:1026 +#, php-format +msgid "Network: %s" +msgstr "" + #: include/attach.php:162 include/attach.php:211 include/attach.php:289 #: include/attach.php:416 include/attach.php:431 include/attach.php:438 #: include/attach.php:517 include/attach.php:1133 include/attach.php:1448 @@ -654,7 +816,7 @@ msgstr "" #: src/Module/Lists.php:150 src/Module/Locs.php:105 src/Module/Register.php:101 #: src/Module/Menu.php:136 src/Module/Menu.php:147 src/Module/Mitem.php:143 #: src/Module/Moderate.php:24 src/Module/Mood.php:147 -#: src/Module/New_channel.php:123 src/Module/New_channel.php:146 +#: src/Module/New_channel.php:114 src/Module/New_channel.php:137 #: src/Module/Notifications.php:19 src/Module/Page.php:42 #: src/Module/Page.php:147 src/Module/Pdledit.php:37 src/Module/Photos.php:73 #: src/Module/Poke.php:118 src/Module/Profile.php:102 @@ -781,11 +943,6 @@ msgstr "" msgid "channel" msgstr "" -#: include/conversation.php:91 include/misc.php:2377 include/bbcode.php:684 -#: src/Lib/Markdown.php:220 src/Module/Tagger.php:93 -msgid "post" -msgstr "" - #: include/conversation.php:93 include/misc.php:2379 src/Module/Tagger.php:95 msgid "comment" msgstr "" @@ -1015,22 +1172,10 @@ msgstr "" msgid "Recent Activity" msgstr "" -#: include/conversation.php:856 include/connections.php:155 -#: src/Lib/Libprofile.php:309 src/Module/Directory.php:453 -#: src/Module/Fedi_id.php:55 src/Widget/Follow.php:41 -#: src/Widget/Suggestions.php:49 -msgid "Connect" -msgstr "" - #: include/conversation.php:866 msgid "Edit Connection" msgstr "" -#: include/conversation.php:876 include/connections.php:183 -#: src/Lib/Libprofile.php:296 -msgid "Direct Message" -msgstr "" - #: include/conversation.php:896 msgid "Block author's site" msgstr "" @@ -1053,7 +1198,7 @@ msgstr "" msgid "Insert web link" msgstr "" -#: include/conversation.php:1110 src/Lib/ThreadItem.php:989 +#: include/conversation.php:1110 src/Lib/ThreadItem.php:997 msgid "Attach file from your personal cloud" msgstr "" @@ -1117,7 +1262,7 @@ msgstr "" msgid "Delete this item?" msgstr "" -#: include/conversation.php:1176 src/Lib/ThreadItem.php:992 +#: include/conversation.php:1176 src/Lib/ThreadItem.php:999 #: src/Module/Events.php:513 src/Module/Photos.php:1193 #: src/Module/Webpages.php:277 msgid "Preview" @@ -1161,27 +1306,27 @@ msgstr "" msgid "Text styles" msgstr "" -#: include/conversation.php:1289 src/Lib/ThreadItem.php:981 +#: include/conversation.php:1289 src/Lib/ThreadItem.php:989 msgid "Bold" msgstr "" -#: include/conversation.php:1290 src/Lib/ThreadItem.php:982 +#: include/conversation.php:1290 src/Lib/ThreadItem.php:990 msgid "Italic" msgstr "" -#: include/conversation.php:1291 src/Lib/ThreadItem.php:983 +#: include/conversation.php:1291 src/Lib/ThreadItem.php:991 msgid "Underline" msgstr "" -#: include/conversation.php:1292 src/Lib/ThreadItem.php:984 +#: include/conversation.php:1292 src/Lib/ThreadItem.php:992 msgid "Quote" msgstr "" -#: include/conversation.php:1293 src/Lib/ThreadItem.php:985 +#: include/conversation.php:1293 src/Lib/ThreadItem.php:993 msgid "Code" msgstr "" -#: include/conversation.php:1294 src/Lib/ThreadItem.php:988 +#: include/conversation.php:1294 src/Lib/ThreadItem.php:996 msgid "Attach file from your device" msgstr "" @@ -1317,7 +1462,7 @@ msgstr "" msgid "Set publish date" msgstr "" -#: include/conversation.php:1375 src/Lib/ThreadItem.php:998 +#: include/conversation.php:1375 src/Lib/ThreadItem.php:1005 #: src/Module/Chat.php:222 msgid "Encrypt text" msgstr "" @@ -1475,51 +1620,6 @@ msgstr "" msgid "Cancelled" msgstr "" -#: include/event.php:1482 include/connections.php:848 -#: src/Module/Connedit.php:870 src/Module/Cdav.php:1380 -#: src/Module/Settings/Profile_edit.php:666 -msgid "Mobile" -msgstr "" - -#: include/event.php:1483 include/connections.php:849 -#: src/Module/Connedit.php:871 src/Module/Cdav.php:1381 -#: src/Module/Settings/Profile_edit.php:667 -msgid "Home" -msgstr "" - -#: include/event.php:1484 include/connections.php:850 -msgid "Home, Voice" -msgstr "" - -#: include/event.php:1485 include/connections.php:851 -msgid "Home, Fax" -msgstr "" - -#: include/event.php:1486 include/connections.php:852 -#: src/Module/Connedit.php:872 src/Module/Cdav.php:1382 -#: src/Module/Settings/Profile_edit.php:668 -msgid "Work" -msgstr "" - -#: include/event.php:1487 include/connections.php:853 -msgid "Work, Voice" -msgstr "" - -#: include/event.php:1488 include/connections.php:854 -msgid "Work, Fax" -msgstr "" - -#: include/event.php:1489 include/event.php:1495 include/connections.php:855 -#: include/connections.php:861 src/Module/Connedit.php:873 -#: src/Module/Cdav.php:1383 src/Module/Settings/Profile_edit.php:669 -#: src/Module/Settings/Profile_edit.php:790 -#: src/Module/Settings/Profile_edit.php:808 -#: src/Module/Settings/Profile_edit.php:858 -#: src/Module/Settings/Profile_edit.php:878 -#: src/Module/Settings/Profile_edit.php:915 -msgid "Other" -msgstr "" - #: include/misc.php:534 msgid "prev" msgstr "" @@ -1788,12 +1888,6 @@ msgstr "" msgid "remove from file" msgstr "" -#: include/misc.php:1827 include/bbcode.php:259 include/bbcode.php:1177 -#: include/bbcode.php:2077 include/bbcode.php:2080 -#: src/Module/Embedphotos.php:121 -msgid "Image/photo" -msgstr "" - #: include/misc.php:1866 msgid "Added to your calendar" msgstr "" @@ -1998,8 +2092,8 @@ msgstr "" #: include/taxonomy.php:479 include/taxonomy.php:573 include/taxonomy.php:595 #: include/taxonomy.php:618 src/Lib/Apps.php:391 src/Module/Cdav.php:1092 -#: src/Widget/Appcategories.php:52 src/Widget/Categories.php:87 -#: src/Widget/Categories.php:135 src/Widget/Categories.php:186 +#: src/Widget/Categories.php:87 src/Widget/Categories.php:135 +#: src/Widget/Categories.php:186 src/Widget/Appcategories.php:52 msgid "Categories" msgstr "" @@ -2039,6 +2133,10 @@ msgstr "" msgid "dislikes" msgstr "" +#: include/language.php:380 +msgid "Select an alternate language" +msgstr "" + #: include/zid.php:416 #, php-format msgid "OpenWebAuth: %1$s welcomes %2$s" @@ -2049,105 +2147,6 @@ msgstr "" msgid "Profile Photos" msgstr "" -#: include/bbcode.php:325 -msgid "Encrypted content" -msgstr "" - -#: include/bbcode.php:362 -#, php-format -msgid "(Embedded app '%s' could not be displayed)." -msgstr "" - -#: include/bbcode.php:406 -#, php-format -msgid "Install %1$s element %2$s" -msgstr "" - -#: include/bbcode.php:409 -#, php-format -msgid "" -"This post contains an installable %s element, however you lack permissions " -"to install it on this site." -msgstr "" - -#: include/bbcode.php:420 src/Module/Impel.php:55 -msgid "webpage" -msgstr "" - -#: include/bbcode.php:423 src/Module/Impel.php:65 -msgid "layout" -msgstr "" - -#: include/bbcode.php:426 src/Module/Impel.php:60 -msgid "block" -msgstr "" - -#: include/bbcode.php:429 src/Module/Impel.php:72 -msgid "menu" -msgstr "" - -#: include/bbcode.php:680 -msgid "card" -msgstr "" - -#: include/bbcode.php:682 -msgid "article" -msgstr "" - -#: include/bbcode.php:690 src/Lib/Markdown.php:218 -#, php-format -msgid "%1$s wrote the following %2$s %3$s" -msgstr "" - -#: include/bbcode.php:797 include/bbcode.php:806 -msgid "Click to open/close" -msgstr "" - -#: include/bbcode.php:806 -msgid "spoiler" -msgstr "" - -#: include/bbcode.php:1514 include/bbcode.php:1724 -msgid "Different viewers will see this text differently" -msgstr "" - -#: include/bbcode.php:2055 -msgid "$1 wrote:" -msgstr "" - -#: include/language.php:380 -msgid "Select an alternate language" -msgstr "" - -#: include/connections.php:200 -msgid "New window" -msgstr "" - -#: include/connections.php:201 -msgid "Open the selected location in a different window or browser tab" -msgstr "" - -#: include/connections.php:958 -msgid "No connections" -msgstr "" - -#: include/connections.php:970 src/Lib/AccessList.php:387 src/Lib/Apps.php:400 -#: src/Lib/Libacl.php:87 src/Module/Affinity.php:68 src/Module/Connedit.php:699 -#: src/Module/Connections.php:419 src/Module/Lists.php:30 -#: src/Module/Stream.php:151 src/Widget/Affinity.php:33 -msgid "Connections" -msgstr "" - -#: include/connections.php:989 -#, php-format -msgid "View all %s connections" -msgstr "" - -#: include/connections.php:1026 -#, php-format -msgid "Network: %s" -msgstr "" - #: include/photos.php:141 #, php-format msgid "Image exceeds website size limit of %lu bytes" @@ -2558,6 +2557,216 @@ msgstr "" msgid "Import complete." msgstr "" +#: src/Lib/ThreadItem.php:138 +msgid "" +"This comment was sent as a protected or private message but the conversation " +"has a different privacy expectation and any replies to it may be seen by " +"others. Discretion advised." +msgstr "" + +#: src/Lib/ThreadItem.php:144 +msgid "" +"This comment is part of a private conversation, yet was shared with the " +"public. Discretion advised." +msgstr "" + +#: src/Lib/ThreadItem.php:152 src/Lib/Libprofile.php:203 src/Lib/Apps.php:666 +#: src/Lib/Menu.php:142 src/Module/Admin/Profs.php:192 +#: src/Module/Blocks.php:173 src/Module/Card_edit.php:110 +#: src/Module/Connections.php:366 src/Module/Connections.php:409 +#: src/Module/Connections.php:430 src/Module/Editblock.php:129 +#: src/Module/Editlayout.php:127 src/Module/Editwebpage.php:160 +#: src/Module/Layouts.php:209 src/Module/Lists.php:364 src/Module/Menu.php:182 +#: src/Module/Settings/Oauth2.php:213 src/Module/Settings/Oauth.php:166 +#: src/Module/Settings/Identities.php:90 src/Module/Webpages.php:270 +#: src/Module/Thing.php:305 src/Storage/Browser.php:319 src/Widget/Cdav.php:149 +#: src/Widget/Cdav.php:184 +msgid "Edit" +msgstr "" + +#: src/Lib/ThreadItem.php:192 src/Storage/Browser.php:307 +msgid "Admin Delete" +msgstr "" + +#: src/Lib/ThreadItem.php:201 src/Module/Filer.php:63 +msgid "Save to Folder" +msgstr "" + +#: src/Lib/ThreadItem.php:223 +msgid "I will attend" +msgstr "" + +#: src/Lib/ThreadItem.php:223 +msgid "I will not attend" +msgstr "" + +#: src/Lib/ThreadItem.php:223 +msgid "I might attend" +msgstr "" + +#: src/Lib/ThreadItem.php:224 +msgid "Undo attendance" +msgstr "" + +#: src/Lib/ThreadItem.php:243 src/Lib/ThreadItem.php:263 +#: src/Lib/ThreadItem.php:273 src/Module/Photos.php:1225 +#: src/Module/Photos.php:1236 +msgid "View all" +msgstr "" + +#: src/Lib/ThreadItem.php:306 +msgid "Add Tag" +msgstr "" + +#: src/Lib/ThreadItem.php:340 src/Module/Photos.php:1166 +msgid "I like this" +msgstr "" + +#: src/Lib/ThreadItem.php:340 src/Module/Photos.php:1170 +msgid "Undo like" +msgstr "" + +#: src/Lib/ThreadItem.php:341 src/Module/Photos.php:1169 +msgid "I don't like this" +msgstr "" + +#: src/Lib/ThreadItem.php:341 src/Module/Photos.php:1171 +msgid "Undo dislike" +msgstr "" + +#: src/Lib/ThreadItem.php:347 +msgid "Share this" +msgstr "" + +#: src/Lib/ThreadItem.php:352 +msgid "Undo repeat" +msgstr "" + +#: src/Lib/ThreadItem.php:355 +msgid "Repeat this" +msgstr "" + +#: src/Lib/ThreadItem.php:367 +msgid "Delivery report" +msgstr "" + +#: src/Lib/ThreadItem.php:396 +#, php-format +msgid "%d comment" +msgid_plural "%d comments" +msgstr[0] "" +msgstr[1] "" + +#: src/Lib/ThreadItem.php:397 +#, php-format +msgid "%d unseen" +msgstr "" + +#: src/Lib/ThreadItem.php:457 src/Lib/ThreadItem.php:458 +#, php-format +msgid "View %s's profile - %s" +msgstr "" + +#: src/Lib/ThreadItem.php:461 +msgid "to" +msgstr "" + +#: src/Lib/ThreadItem.php:463 +msgid "Wall-to-Wall" +msgstr "" + +#: src/Lib/ThreadItem.php:464 +msgid "via Wall-To-Wall:" +msgstr "" + +#: src/Lib/ThreadItem.php:493 +msgid "Attend" +msgstr "" + +#: src/Lib/ThreadItem.php:494 +msgid "Attendance Options" +msgstr "" + +#: src/Lib/ThreadItem.php:496 +msgid "Voting Options" +msgstr "" + +#: src/Lib/ThreadItem.php:497 +msgid "Reply" +msgstr "" + +#: src/Lib/ThreadItem.php:527 +msgid "Saved draft" +msgstr "" + +#: src/Lib/ThreadItem.php:528 +msgid "Save Bookmarks" +msgstr "" + +#: src/Lib/ThreadItem.php:529 +msgid "Add to Calendar" +msgstr "" + +#: src/Lib/ThreadItem.php:540 src/Module/Notifications.php:75 +msgid "Mark all seen" +msgstr "" + +#: src/Lib/ThreadItem.php:568 +msgid "Reply to conversation" +msgstr "" + +#: src/Lib/ThreadItem.php:570 +msgid "Conversation" +msgstr "" + +#: src/Lib/ThreadItem.php:571 src/Module/Connedit.php:625 +msgid "Archive" +msgstr "" + +#: src/Lib/ThreadItem.php:631 src/Lib/Stringsjs.php:15 +#, php-format +msgid "%s show all" +msgstr "" + +#: src/Lib/ThreadItem.php:984 src/Module/Photos.php:1189 +#: src/Module/Photos.php:1295 +msgid "This is you" +msgstr "" + +#: src/Lib/ThreadItem.php:986 src/Lib/Stringsjs.php:14 +#: src/Module/Photos.php:1191 src/Module/Photos.php:1297 +msgid "Comment" +msgstr "" + +#: src/Lib/ThreadItem.php:994 +msgid "Image" +msgstr "" + +#: src/Lib/ThreadItem.php:995 +msgid "Attach/Embed File" +msgstr "" + +#: src/Lib/ThreadItem.php:998 +msgid "Insert Link" +msgstr "" + +#: src/Lib/ThreadItem.php:1000 src/Module/Lostpass.php:143 +#: src/Module/Pdledit.php:72 src/Module/Pdledit.php:80 +msgid "Reset" +msgstr "" + +#: src/Lib/ThreadItem.php:1010 +msgid "Your full name (required)" +msgstr "" + +#: src/Lib/ThreadItem.php:1011 +msgid "Your email address (required)" +msgstr "" + +#: src/Lib/ThreadItem.php:1012 +msgid "Your website URL (optional)" +msgstr "" + #: src/Lib/Permcat.php:77 msgctxt "permcat" msgid "default" @@ -2652,6 +2861,52 @@ msgstr "" msgid "Account '%s' deleted" msgstr "" +#: src/Lib/Channel.php:45 +msgid "Empty name" +msgstr "" + +#: src/Lib/Channel.php:49 +msgid "Name too long" +msgstr "" + +#: src/Lib/Channel.php:277 +msgid "No account identifier" +msgstr "" + +#: src/Lib/Channel.php:289 +msgid "Nickname is required." +msgstr "" + +#: src/Lib/Channel.php:303 src/Lib/Channel.php:778 src/Module/Changeaddr.php:73 +msgid "Reserved nickname. Please choose another." +msgstr "" + +#: src/Lib/Channel.php:308 src/Lib/Channel.php:783 src/Module/Changeaddr.php:78 +msgid "" +"Nickname has unsupported characters or is already being used on this site." +msgstr "" + +#: src/Lib/Channel.php:392 +msgid "Unable to retrieve created identity" +msgstr "" + +#: src/Lib/Channel.php:704 src/Lib/Channel.php:802 +msgid "Unable to retrieve modified identity" +msgstr "" + +#: src/Lib/Channel.php:1863 src/Module/Cover_photo.php:290 +#: src/Module/Cover_photo.php:292 src/Widget/Cover_photo.php:92 +msgid "cover photo" +msgstr "" + +#: src/Lib/Channel.php:2189 src/Module/Rmagic.php:89 +msgid "Enter your channel address (e.g. channel@example.com)" +msgstr "" + +#: src/Lib/Channel.php:2190 src/Module/Rmagic.php:92 +msgid "Authenticate" +msgstr "" + #: src/Lib/Features.php:62 msgid "General Features" msgstr "" @@ -3269,220 +3524,6 @@ msgstr "" msgid "add" msgstr "" -#: src/Lib/ThreadItem.php:138 -msgid "" -"This comment was sent as a direct (private) message but the conversation has " -"a different privacy expectation and any replies to it may be seen by others. " -"Discretion advised." -msgstr "" - -#: src/Lib/ThreadItem.php:144 -msgid "" -"This comment is part of a private conversation, yet was shared with the " -"public. Discretion advised." -msgstr "" - -#: src/Lib/ThreadItem.php:152 src/Lib/Libprofile.php:203 src/Lib/Apps.php:666 -#: src/Lib/Menu.php:142 src/Module/Admin/Profs.php:192 -#: src/Module/Blocks.php:173 src/Module/Card_edit.php:110 -#: src/Module/Connections.php:366 src/Module/Connections.php:409 -#: src/Module/Connections.php:430 src/Module/Editblock.php:129 -#: src/Module/Editlayout.php:127 src/Module/Editwebpage.php:160 -#: src/Module/Layouts.php:209 src/Module/Lists.php:364 src/Module/Menu.php:182 -#: src/Module/Settings/Oauth2.php:213 src/Module/Settings/Oauth.php:166 -#: src/Module/Settings/Identities.php:90 src/Module/Webpages.php:270 -#: src/Module/Thing.php:305 src/Storage/Browser.php:319 src/Widget/Cdav.php:149 -#: src/Widget/Cdav.php:184 -msgid "Edit" -msgstr "" - -#: src/Lib/ThreadItem.php:192 src/Storage/Browser.php:307 -msgid "Admin Delete" -msgstr "" - -#: src/Lib/ThreadItem.php:201 src/Module/Filer.php:63 -msgid "Save to Folder" -msgstr "" - -#: src/Lib/ThreadItem.php:223 -msgid "I will attend" -msgstr "" - -#: src/Lib/ThreadItem.php:223 -msgid "I will not attend" -msgstr "" - -#: src/Lib/ThreadItem.php:223 -msgid "I might attend" -msgstr "" - -#: src/Lib/ThreadItem.php:224 -msgid "Undo attendance" -msgstr "" - -#: src/Lib/ThreadItem.php:243 src/Lib/ThreadItem.php:263 -#: src/Lib/ThreadItem.php:273 src/Module/Photos.php:1225 -#: src/Module/Photos.php:1236 -msgid "View all" -msgstr "" - -#: src/Lib/ThreadItem.php:306 -msgid "Add Tag" -msgstr "" - -#: src/Lib/ThreadItem.php:340 src/Module/Photos.php:1166 -msgid "I like this" -msgstr "" - -#: src/Lib/ThreadItem.php:340 src/Module/Photos.php:1170 -msgid "Undo like" -msgstr "" - -#: src/Lib/ThreadItem.php:341 src/Module/Photos.php:1169 -msgid "I don't like this" -msgstr "" - -#: src/Lib/ThreadItem.php:341 src/Module/Photos.php:1171 -msgid "Undo dislike" -msgstr "" - -#: src/Lib/ThreadItem.php:347 -msgid "Share this" -msgstr "" - -#: src/Lib/ThreadItem.php:352 -msgid "Undo repeat" -msgstr "" - -#: src/Lib/ThreadItem.php:355 -msgid "Repeat this" -msgstr "" - -#: src/Lib/ThreadItem.php:367 -msgid "Delivery report" -msgstr "" - -#: src/Lib/ThreadItem.php:396 -#, php-format -msgid "%d comment" -msgid_plural "%d comments" -msgstr[0] "" -msgstr[1] "" - -#: src/Lib/ThreadItem.php:397 -#, php-format -msgid "%d unseen" -msgstr "" - -#: src/Lib/ThreadItem.php:457 src/Lib/ThreadItem.php:458 -#, php-format -msgid "View %s's profile - %s" -msgstr "" - -#: src/Lib/ThreadItem.php:461 -msgid "to" -msgstr "" - -#: src/Lib/ThreadItem.php:463 -msgid "Wall-to-Wall" -msgstr "" - -#: src/Lib/ThreadItem.php:464 -msgid "via Wall-To-Wall:" -msgstr "" - -#: src/Lib/ThreadItem.php:493 -msgid "Attend" -msgstr "" - -#: src/Lib/ThreadItem.php:494 -msgid "Attendance Options" -msgstr "" - -#: src/Lib/ThreadItem.php:496 -msgid "Voting Options" -msgstr "" - -#: src/Lib/ThreadItem.php:497 -msgid "Reply" -msgstr "" - -#: src/Lib/ThreadItem.php:527 -msgid "Saved draft" -msgstr "" - -#: src/Lib/ThreadItem.php:528 -msgid "Save Bookmarks" -msgstr "" - -#: src/Lib/ThreadItem.php:529 -msgid "Add to Calendar" -msgstr "" - -#: src/Lib/ThreadItem.php:540 src/Module/Notifications.php:75 -msgid "Mark all seen" -msgstr "" - -#: src/Lib/ThreadItem.php:568 -msgid "Reply to conversation" -msgstr "" - -#: src/Lib/ThreadItem.php:570 -msgid "Conversation" -msgstr "" - -#: src/Lib/ThreadItem.php:571 src/Module/Connedit.php:625 -msgid "Archive" -msgstr "" - -#: src/Lib/ThreadItem.php:631 src/Lib/Stringsjs.php:15 -#, php-format -msgid "%s show all" -msgstr "" - -#: src/Lib/ThreadItem.php:976 src/Module/Photos.php:1189 -#: src/Module/Photos.php:1295 -msgid "This is you" -msgstr "" - -#: src/Lib/ThreadItem.php:978 src/Lib/Stringsjs.php:14 -#: src/Module/Photos.php:1191 src/Module/Photos.php:1297 -msgid "Comment" -msgstr "" - -#: src/Lib/ThreadItem.php:986 -msgid "Image" -msgstr "" - -#: src/Lib/ThreadItem.php:987 -msgid "Attach/Embed File" -msgstr "" - -#: src/Lib/ThreadItem.php:990 -msgid "Insert Link" -msgstr "" - -#: src/Lib/ThreadItem.php:991 -msgid "Video" -msgstr "" - -#: src/Lib/ThreadItem.php:993 src/Module/Lostpass.php:143 -#: src/Module/Pdledit.php:72 src/Module/Pdledit.php:80 -msgid "Reset" -msgstr "" - -#: src/Lib/ThreadItem.php:1003 -msgid "Your full name (required)" -msgstr "" - -#: src/Lib/ThreadItem.php:1004 -msgid "Your email address (required)" -msgstr "" - -#: src/Lib/ThreadItem.php:1005 -msgid "Your website URL (optional)" -msgstr "" - #: src/Lib/Activity.php:498 msgid "Quoted post" msgstr "" @@ -3541,52 +3582,6 @@ msgstr "" msgid "📢 Repeated %1$s's %2$s" msgstr "" -#: src/Lib/Channel.php:45 -msgid "Empty name" -msgstr "" - -#: src/Lib/Channel.php:49 -msgid "Name too long" -msgstr "" - -#: src/Lib/Channel.php:277 -msgid "No account identifier" -msgstr "" - -#: src/Lib/Channel.php:289 -msgid "Nickname is required." -msgstr "" - -#: src/Lib/Channel.php:303 src/Lib/Channel.php:778 src/Module/Changeaddr.php:73 -msgid "Reserved nickname. Please choose another." -msgstr "" - -#: src/Lib/Channel.php:308 src/Lib/Channel.php:783 src/Module/Changeaddr.php:78 -msgid "" -"Nickname has unsupported characters or is already being used on this site." -msgstr "" - -#: src/Lib/Channel.php:392 -msgid "Unable to retrieve created identity" -msgstr "" - -#: src/Lib/Channel.php:704 src/Lib/Channel.php:802 -msgid "Unable to retrieve modified identity" -msgstr "" - -#: src/Lib/Channel.php:1863 src/Module/Cover_photo.php:290 -#: src/Module/Cover_photo.php:292 src/Widget/Cover_photo.php:92 -msgid "cover photo" -msgstr "" - -#: src/Lib/Channel.php:2189 src/Module/Rmagic.php:89 -msgid "Enter your channel address (e.g. channel@example.com)" -msgstr "" - -#: src/Lib/Channel.php:2190 src/Module/Rmagic.php:92 -msgid "Authenticate" -msgstr "" - #: src/Lib/Libprofile.php:39 msgid "Requested channel is not available." msgstr "" @@ -4232,8 +4227,8 @@ msgid "Site Setup and Configuration" msgstr "" #: src/Lib/Navbar.php:280 src/Module/Connedit.php:813 -#: src/Module/Defperms.php:246 src/Module/New_channel.php:170 -#: src/Module/New_channel.php:177 src/Widget/Notifications.php:171 +#: src/Module/Defperms.php:246 src/Module/New_channel.php:161 +#: src/Module/New_channel.php:168 src/Widget/Notifications.php:171 msgid "Loading" msgstr "" @@ -6499,7 +6494,7 @@ msgstr "" #: src/Module/Connedit.php:876 src/Module/Blocks.php:172 #: src/Module/Cards.php:110 src/Module/Cdav.php:1082 src/Module/Cdav.php:1386 #: src/Module/Layouts.php:201 src/Module/Menu.php:188 -#: src/Module/New_channel.php:201 src/Module/Settings/Profile_edit.php:672 +#: src/Module/New_channel.php:192 src/Module/Settings/Profile_edit.php:672 #: src/Module/Webpages.php:269 src/Storage/Browser.php:303 #: src/Storage/Browser.php:421 src/Widget/Cdav.php:151 src/Widget/Cdav.php:187 msgid "Create" @@ -8310,7 +8305,7 @@ msgstr "" msgid "System | Site Channel" msgstr "" -#: src/Module/Manage.php:157 src/Module/New_channel.php:164 +#: src/Module/Manage.php:157 src/Module/New_channel.php:155 #, php-format msgid "You have created %1$.0f of %2$.0f allowed channels." msgstr "" @@ -8664,7 +8659,7 @@ msgstr "" msgid "Real names are preferred." msgstr "" -#: src/Module/Register.php:292 src/Module/New_channel.php:189 +#: src/Module/Register.php:292 src/Module/New_channel.php:180 msgid "Choose a short nickname" msgstr "" @@ -8675,7 +8670,7 @@ msgid "" "g. nickname%s" msgstr "" -#: src/Module/Register.php:293 src/Module/New_channel.php:190 +#: src/Module/Register.php:293 src/Module/New_channel.php:181 msgid "Channel role and privacy" msgstr "" @@ -8932,52 +8927,52 @@ msgstr "" msgid "Set your current mood and tell your friends" msgstr "" -#: src/Module/New_channel.php:172 +#: src/Module/New_channel.php:163 msgid "Your real name is recommended." msgstr "" -#: src/Module/New_channel.php:173 +#: src/Module/New_channel.php:164 msgid "" "Examples: \"Bob Jameson\", \"Lisa and her Horses\", \"Soccer\", \"Aviation " "Group\"" msgstr "" -#: src/Module/New_channel.php:178 +#: src/Module/New_channel.php:169 msgid "" "This will be used to create a unique network address (like an email address)." msgstr "" -#: src/Module/New_channel.php:180 +#: src/Module/New_channel.php:171 msgid "Allowed characters are a-z 0-9, - and _" msgstr "" -#: src/Module/New_channel.php:188 +#: src/Module/New_channel.php:179 msgid "Channel name" msgstr "" -#: src/Module/New_channel.php:190 +#: src/Module/New_channel.php:181 msgid "" "Select a channel permission role compatible with your usage needs and " "privacy requirements." msgstr "" -#: src/Module/New_channel.php:193 +#: src/Module/New_channel.php:184 msgid "Create a Channel" msgstr "" -#: src/Module/New_channel.php:194 +#: src/Module/New_channel.php:185 msgid "" "A channel is a unique network identity. It can represent a person (social " "network profile), a forum (group), a business or celebrity page, a newsfeed, " "and many other things." msgstr "" -#: src/Module/New_channel.php:195 +#: src/Module/New_channel.php:186 msgid "" "or import an existing channel from another location." msgstr "" -#: src/Module/New_channel.php:200 +#: src/Module/New_channel.php:191 msgid "Validate" msgstr "" @@ -12104,12 +12099,6 @@ msgstr "" msgid "App Collections" msgstr "" -#: src/Widget/Appcategories.php:55 src/Widget/Filer.php:39 -#: src/Widget/Categories.php:90 src/Widget/Categories.php:138 -#: src/Widget/Categories.php:189 -msgid "Everything" -msgstr "" - #: src/Widget/Activity_filter.php:42 msgid "Direct Messages" msgstr "" @@ -12368,6 +12357,12 @@ msgstr "" msgid "New Member Links" msgstr "" +#: src/Widget/Filer.php:39 src/Widget/Categories.php:90 +#: src/Widget/Categories.php:138 src/Widget/Categories.php:189 +#: src/Widget/Appcategories.php:55 +msgid "Everything" +msgstr "" + #: src/Widget/Common_friends.php:47 msgid "Common Connections" msgstr "" diff --git a/version.php b/version.php index 09ba45e3f..0de57c6ec 100644 --- a/version.php +++ b/version.php @@ -1,2 +1,2 @@ Date: Mon, 27 May 2024 18:14:02 +1000 Subject: [PATCH 04/11] add audience to item post variables --- src/Module/Item.php | 1 + 1 file changed, 1 insertion(+) diff --git a/src/Module/Item.php b/src/Module/Item.php index 87af0ed29..f4998cf59 100644 --- a/src/Module/Item.php +++ b/src/Module/Item.php @@ -882,6 +882,7 @@ class Item extends Controller $location = ((isset($_REQUEST['location'])) ? notags(trim($_REQUEST['location'])) : EMPTY_STR); $lat = ((isset($_REQUEST['lat'])) ? floatval($_REQUEST['lat']) : 0.0); $lon = ((isset($_REQUEST['lon'])) ? floatval($_REQUEST['lon']) : 0.0); + $audience = ((isset($_REQUEST['audience'])) ? notags(trim($_REQUEST['audience'])) : EMPTY_STR); $verb = ((isset($_REQUEST['verb'])) ? notags(trim($_REQUEST['verb'])) : EMPTY_STR); $title = ((isset($_REQUEST['title'])) ? escape_tags(trim($_REQUEST['title'])) : EMPTY_STR); $summary = ((isset($_REQUEST['summary'])) ? trim($_REQUEST['summary']) : EMPTY_STR); From 8f6c1e16fef0c476e9e0547ab9c5ed4506054ea4 Mon Sep 17 00:00:00 2001 From: Mike Macgirvin Date: Tue, 28 May 2024 06:04:08 +1000 Subject: [PATCH 05/11] provide storage for reply audience in postopts array --- src/Module/Item.php | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/src/Module/Item.php b/src/Module/Item.php index f4998cf59..bc9e1225d 100644 --- a/src/Module/Item.php +++ b/src/Module/Item.php @@ -851,7 +851,7 @@ class Item extends Controller $item_blocked = $orig_post['item_blocked']; - $postopts = $orig_post['postopts']; + $postopts = explode(',', $orig_post['postopts']); $created = ((intval($orig_post['item_unpublished'])) ? $created : $orig_post['created']); $expires = ((intval($orig_post['item_unpublished'])) ? NULL_DATE : $orig_post['expires']); $mid = $orig_post['mid']; @@ -888,11 +888,16 @@ class Item extends Controller $summary = ((isset($_REQUEST['summary'])) ? trim($_REQUEST['summary']) : EMPTY_STR); $body = ((isset($_REQUEST['body'])) ? trim($_REQUEST['body']) : EMPTY_STR); $body .= ((isset($_REQUEST['attachment'])) ? trim($_REQUEST['attachment']) : EMPTY_STR); - $postopts = ''; + $postopts = []; $haslocation = $lat || $lon; $allow_empty = ((($checkin || $checkout) && $haslocation) || $_REQUEST['allow_empty']); $private = ((isset($private) && $private) ? $private : intval($acl->is_private() || ($public_policy))); + // preferred audience for replies + if ($audience && in_array($audience, ['sender', 'conversation', 'followers'])) { + $postopts[] = $audience; + } + // Normalise the line endings on multi-line fields. $summary = str_replace("\r\n", "\n", $summary); $body = str_replace("\r\n", "\n", $body); @@ -1502,7 +1507,7 @@ class Item extends Controller $datarray['deny_gid'] = $str_group_deny; $datarray['attach'] = $attachments; $datarray['thr_parent'] = $thr_parent; - $datarray['postopts'] = $postopts; + $datarray['postopts'] = implode(',', $postopts); $datarray['item_wall'] = intval($item_wall); $datarray['item_origin'] = intval($item_origin); $datarray['item_type'] = $webpage; From 4bd01fcc101a89de989b9d5488624361e8b7894e Mon Sep 17 00:00:00 2001 From: Mike Macgirvin Date: Tue, 28 May 2024 08:27:22 +1000 Subject: [PATCH 06/11] more work on reply audiences --- src/Daemon/Notifier.php | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/src/Daemon/Notifier.php b/src/Daemon/Notifier.php index 5da368ba1..9ce2e651e 100644 --- a/src/Daemon/Notifier.php +++ b/src/Daemon/Notifier.php @@ -84,6 +84,7 @@ class Notifier implements DaemonInterface public static $deliveries = []; public static $recipients = []; public static $env_recips = []; + public static $postopts = []; public static $packet_type = 'activity'; public static $encoding = 'activitystreams'; public static $encoded_item = null; @@ -363,6 +364,13 @@ class Notifier implements DaemonInterface $thread_is_public = !intval($parent_item['item_private']); $question = $parent_item['verb'] === 'Question'; } + $thread_parent = q("select * from item where mid = '%s' and uid = %d limit 1", + dbesc($target_item['thr_parent']), + intval($target_item['uid']) + ); + if ($thread_parent) { + $thread_parent = array_shift($thread_parent); + } // avoid looping of discover items 12/4/2014 @@ -412,6 +420,8 @@ class Notifier implements DaemonInterface self::$packet_type = 'response'; } + self::$postopts = explode(',', $target_item['postopts']; + if (($relay_to_owner || $uplink) && ($cmd !== 'relay')) { logger('followup relay (upstream delivery)', LOGGER_DEBUG); $sendto = ($uplink) ? $parent_item['source_xchan'] : $parent_item['owner_xchan']; @@ -438,6 +448,11 @@ class Notifier implements DaemonInterface self::$recipients = $sendto; } } + + if (in_array('sender', self::$postopts)) { + $sendto = [$thread_parent['author_xchan']]; + } + logger('replyto: upstream recipients ' . print_r($sendto, true), LOGGER_DEBUG); self::$private = true; From f241cac234260aca677c7194fba3389db238deb9 Mon Sep 17 00:00:00 2001 From: Mike Macgirvin Date: Tue, 28 May 2024 08:29:06 +1000 Subject: [PATCH 07/11] missing paren --- src/Daemon/Notifier.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Daemon/Notifier.php b/src/Daemon/Notifier.php index 9ce2e651e..3beb0439e 100644 --- a/src/Daemon/Notifier.php +++ b/src/Daemon/Notifier.php @@ -420,7 +420,7 @@ class Notifier implements DaemonInterface self::$packet_type = 'response'; } - self::$postopts = explode(',', $target_item['postopts']; + self::$postopts = explode(',', $target_item['postopts']); if (($relay_to_owner || $uplink) && ($cmd !== 'relay')) { logger('followup relay (upstream delivery)', LOGGER_DEBUG); From 05d6785afdd4c4387d5da4f9dd568d30a23be968 Mon Sep 17 00:00:00 2001 From: Mike Macgirvin Date: Tue, 28 May 2024 10:25:07 +1000 Subject: [PATCH 08/11] markdown compatibility --- doc/guide/en/markdown.mc | 2 -- include/bbcode.php | 4 ++-- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/doc/guide/en/markdown.mc b/doc/guide/en/markdown.mc index 736673a91..e22e5fe3b 100644 --- a/doc/guide/en/markdown.mc +++ b/doc/guide/en/markdown.mc @@ -93,8 +93,6 @@ This is an example of `inline code`. [h3]Lists[/h3] -In order to reduce "false positives", markdown lists are only rendered if they contain more than one list element within the entire content body. - As with bold and italic, the first character of an unordered list may be preceded by a backslash or wrapped in [nobb][nomd][/nomd][/nobb] tags to prevent normal text lines beginning with these characters from being interpreted as a list. diff --git a/include/bbcode.php b/include/bbcode.php index 0e05131fd..b757e6788 100644 --- a/include/bbcode.php +++ b/include/bbcode.php @@ -2209,11 +2209,11 @@ function bbcode($Text, $options = []) // unordered lists $matches = []; // Ignore if there is only one list element as it could be a false positive. - if (preg_match_all('#^(? 1) { + // if (preg_match_all('#^(? 1) { $Text = preg_replace('#^(?
  • $1
  • ', $Text); // strip the backslash escape if present $Text = preg_replace('#^(\\\)([*\-+]) #m', '$2', $Text); - } + // } // order lists $Text = preg_replace('#^(?
  • $2
  • ', $Text); $Text = preg_replace('#^(\\\)(\d+[\.\)])#m', '$2', $Text); From e98f0ddaf22ad9fe68659acd109f0f9bd1a47076 Mon Sep 17 00:00:00 2001 From: Mike Macgirvin Date: Wed, 29 May 2024 06:41:06 +1000 Subject: [PATCH 09/11] update FEDERATION.md --- FEDERATION.md | 66 ++++++++++++++++++++++++-------------------- src/Lib/Activity.php | 7 ++++- 2 files changed, 42 insertions(+), 31 deletions(-) diff --git a/FEDERATION.md b/FEDERATION.md index 69968a4b2..b5099c252 100644 --- a/FEDERATION.md +++ b/FEDERATION.md @@ -20,12 +20,36 @@ Supported activities: Many other activity combinations we've seen in the wild are partially supported. If you're looking for something specific which is not in this list, please ask (https://fediversity.site/channel/streams). +## Fediverse FEPs + +- ~~FEP-f1d5: Nodeinfo in FediverseSoftware~~ Take your trackers and MAUs and stick them where the sun don't shine. +- FEP-e232: Object links (aka quotedPosts) +- FEP-8b32: Object Integrity Proofs +- FEP-c390: Identity Proofs +- FEP-fb2a: Actor metadata +- FEP-612d: Identifying ActivityPub Objects through DNS +- FEP-2c59: Discovery of a Webfinger address from an ActivityPub actor +- FEP-61cf: The OpenWebAuth Protocol + +Please see [Conversation Containers](https://fediversity.site/help/develop/en/Containers), which builds on the following 2 FEPs. The same mechanism may be used for groups. +- FEP-400e: Publicly-appendable ActivityPub collections +- FEP-7888: Demystifying the context property + +Nomadic Identity: work in progress as of 29-May-2024 and is based on +- FEP-ef61: Portable Objects +- FEP-4adb: Dereferencing identifiers with webfinger + +Planned support: +- FEP-d556: Server-Level Actor Discovery Using WebFinger + ## C2S This project supports ActivityPub C2S. You may authenticate with HTTP basic-auth, OAuth2, or OpenWebAuth. There is no media upload endpoint since the (deprecated) specification of that service has no workarounds for working in memory-restricted environments and most mobile phone photos exceed PHP's default upload size limits. ## Client search interface +Please see [Federated Search](https://fediversity.site/help/develop/en/Federated_Search) + If public access is allowed to the content search interface (a site security setting), clients may search the content of public messages or tags and are returned an ActivityStreams Collection of search results. When authenticated via OpenWebAuth, the search results may contain their own content or private content which they are permitted to access. The URL endpoints for site search are: @@ -48,7 +72,9 @@ Direct Messages (DM) are differentiated from other private messaging using the n ## Events -Events and RSVP are supported per AS-vocabulary with the exception that a Create/Event is not transmitted. Invite/Event is the primary method of sharing events. For compatibility with some legacy applications, RSVP responses of Accept/Event, Reject/Event, TentativeAccept/Event and TentativeReject/Event are accepted as valid RSVP activities. By default, we send Accept/{Invite/Event} (and other RSVP responses) per AS-vocabulary. Events with no timezone (e.g. "all day events" or holidays) are sent with no 'Z' on the event times per RFC3339 Section 4.3. All event times are in UTC and timezone adjusted events are transmitted using Zulu time 'yyyy-mm-ddThh:mm:ssZ'. Event descriptions are sent using 'summary' and accepted using summary, name, and content in order of existence. These are converted internally to plaintext if they contain HTML. If 'location' contains coordinates, a map will typically be generated when rendered. +Events and RSVP are supported per AS-vocabulary with the exception that a Create/Event is not transmitted. Invite/Event is the primary method of sharing events. For compatibility with some legacy applications, RSVP responses of Accept/Event, Reject/Event, TentativeAccept/Event and TentativeReject/Event are accepted as valid RSVP activities. By default, we send Accept/{Invite/Event} (and other RSVP responses) per AS-vocabulary. Events with no timezone (e.g. "all day events" or holidays) are sent with no 'Z' on the event times per RFC3339 Section 4.3. All event times are in UTC and timezone adjusted events are transmitted using Zulu time 'yyyy-mm-ddThh:mm:ssZ'. Event descriptions are sent using 'summary' and accepted using summary, name, and content in order of existence. These are converted internally to plaintext if they contain HTML. + +If 'location' contains coordinates, a map will typically be generated when rendered. ## Nomadic Identity @@ -59,39 +85,20 @@ The actor record for nomadic accounts contains a 'copiedTo' property which is ot ## Groups -Groups may be public or private. The initial thread starting post to a group is sent using a DM to the group and should be the only DM recipient. This helps preserve the sanctity of private groups and is a posting method available to most ActivityPub software, as opposed to bang tags (!groupname) which lack widespread support and normal @mentions which can create privacy issues and their associated drama. It will be converted to an embedded post authored by the group Actor (and attributed to the original Actor) and resent to all members. Followups and replies to group posts use normal federation methods. The actor type is 'Group' and can be followed using Follow/Group *or* Join/Group, and unfollowed by Undo/Follow *or* Leave/Group. +Groups may be public or private. The initial thread starting post to a group is sent using a DM to the group and should be the only DM recipient. This helps preserve the sanctity of private groups and is a posting method available to most ActivityPub software. Bang tags (!groupname) may also be used if supported. @mentions may be used for public groups (only). The initial post will be converted to an embedded post authored by the group Actor (and attributed to the original Actor) and resent to all members. In the future this will be provided as Add/Remove from the group collection -- see also [Conversation Containers](https://fediversity.site/help/develop/en/Containers). Followups and replies to group posts use normal federation methods. -Update: as of June 2021 comments to a group are sent via normal methods, but an additional Announce activity is now sent to ActivityPub connections so that the comments will be seen in the home timeline on microblog sites (Mastodon, etc.). Conversational or macroblog sites with working conversation view should filter/hide this redundant post. +The actor type is 'Group' and can be followed using Follow/Group *or* Join/Group, and unfollowed by Undo/Follow *or* Leave/Group. Other software will see both a Follow/Group activity and a Join/Group activity when somebody using this software joins a group. Consume whatever works for your software and ignore the other. -Update: as of 2021-04-08 @mentions are now permitted for posting to public and moderated groups but are not permitted for posting to restricted or private groups. The group owner can over-ride this behaviour as desired based on the group's security and privacy expectations. DMs (and wall-to-wall posts) are still the recommended methods for posting to groups because they can be used for any groups without needing to remember which are public and which are private; and which may have allowed or disallowed posting via mentions. - -Update: as of 2021-04-30 We will support incoming group posts of the form Create/Note/Collection or Add/Note/Collection where the target Collection|orderedCollection is the group outbox or "wall". This should match the behaviour of the Smithereen project and is documented in Fediverse Enhancement Proposal FEP-400e. We also provide this structure automatically on outbound group posts if the actor record contains 'wall' (sm:wall); and add a mention tag in the activity to support group/relay implementations that only trigger on mentions. +Announce activities are sent alongside comments for the benefit of microblog projects. ## Comments -This project provides permission control and moderation of comments. By default comments are only accepted from existing connections. This can be changed by the individual. Other sites MAY use nomad:commentPolicy (string) as a guide if they do not wish to provide comment abilities where it is known in advance they will be rejected. A Reject/Note activity will be sent if the comment is not permitted. There is currently no response for moderated content, but will likely also be represented by Reject/Note. +This project provides permission control and moderation of comments. By default comments are only accepted from existing connections. This can be changed by the individual. The `canReply` field may be used as an indicator of general permission to comment by consuming software. This is an array of actors or collections which may be permitted to reply. If it is empty, replies will not be accepted. An `endDate` on a published Note (/Article/etc.) without a corresponding `startDate` indicates a time limit on replies. They will be rejected after that datetime. -'commentPolicy' can be any of - -'authenticated' - matches the typical ActivityPub permissions - -'contacts' - matches approved followers - -'any connections' - matches followers regardless of approval - -'site: foobar.com' - matches any actor or clone instance from 'foobar.com' - -'public' - matches anybody at all, may require moderation if the network isn't known - -'self' - matches the activity author only - -'until=2001-01-01T00:00Z' - comments are closed after the date given. This can be supplied on its own or appended to any other commentPolicy string by preceding with a space; for example 'contacts until=2001-01-01T00:00Z'. - -The 'canReply' field may also be used for comment control. This contains either an actor id, or an array of actor ids; which may include groups or other actor collections such as access lists. ## Expiring content -Activity objects may include an 'expires' field; after which time they are removed. The removal occurs with a federated Delete, but this is a best faith effort. We automatically delete any local objects we receive with an 'exires' field after it expires regardless of whether or not we receive a Delete activity. The expiration is specified as an ISO8601 date/time. +Activity objects may include an 'expires' field; after which time they are removed. The removal occurs with a federated Delete, but this is a best faith effort. We automatically delete any local objects we receive with an 'expires' field after it expires regardless of whether we receive a Delete activity. The expiration is specified as an ISO8601 date/time. ## Private Media @@ -100,12 +107,12 @@ Private media MAY be accessed using OCAP or OpenWebAuth. Bearcaps are supported ## Permission System -The Nomad permission system has years of historical use and is different than and the reverse of the typical ActivityPub project. We consider 'Follow' to be an anti-pattern which encourages pseudo anonymous stalking. A Follow activity by an actor on this project typically means the actor on this project will send activities to the recipient. It may also confer other permissions. Accept/Follow usually provides permission to receive content from the referenced actor, depending on their privacy settings. +The Nomad permission system has years of historical use and is different than the typical ActivityPub project. A Follow activity by an actor on this project typically means the actor on this project has changed the permissions associated with the followee. This could one of 15-30 different access controls and does not by itself indicate a follower relationship. It could provide permission for the target actor to upload to file storage for example. Future work will make the precise permission set available for access over ActivityPub to consuming applications. This is currently in progress as of 29-May-2024. ## Delivery model -This project uses the relay system pioneered by projects such as Friendica, Diaspora, and Hubzilla which attempts to keep entire conversations intact and keeps the conversation initiator in control of the privacy distribution. This is not guaranteed under ActivityPub where conversation members can cc: others who were not in the initial privacy group. We encourage projects to not allow additional recipients or not include their own followers in followups. Followups SHOULD have one recipient - the conversation owner or originator, and are relayed by the owner to the other conversation members. This normally requires the use of LD-Signatures but may also be accessible through authenticated fetch of the activity using HTTP signatures. +See [Conversation Containers](https://fediversity.site/help/develop/en/Containers) ## Content @@ -113,7 +120,7 @@ Content may be rich multi-media and renders nicely as HTML. Multicode is used an Mastodon 'summary' does not invoke any special handling so 'summary' can be used for its intended purpose as a content summary. Mastodon 'sensitive' is honoured and results in invoking whatever mechanisms the user has selected to deal with this type of content. By default images are obscured and are 'click to view'. Sensitive text is not treated specially, but may be obscured using the NSFW plugin or filtered per connection based on string match, tags, patterns, languages, or other criteria. -Mastodon "custom emojis" are supported for post content, but **not** in display names, which are restricted to UTF-8. + ## Edits @@ -123,11 +130,10 @@ Edited posts and comments are sent with Update/Note and an 'updated' timestamp a Announce and relay activities use two mechanisms. As well as the Announce activity, a new message is generated with an embedded rendering of the shared content as the message content. This message may (should) contain additional commentary in order to comply with the Fair Use provisions of copyright law. The other reason is our use of comment permissions. Comments to Announce activities are sent to the author (who typically accepts comments only from connections). Comment to embedded forwards are sent to the sender. This difference in behaviour allows groups to work correctly in the presence of comment permissions. -Discussion (2021-04-17): In the email world this type of conflict is resolved by the use of the reply-to header (e.g. in this case reply to the group rather than to the author) as well as the concept of a 'sender' which is different than 'from' (the author). We will soon be modelling the first one in ActivityPub with the use of 'replyTo'. If you see 'replyTo' in an activity it indicates that replies SHOULD go to that address rather than the author's inbox. We will implement this first and come up with a proposal for 'sender' if this gets any traction. If enough projects support these constructs we can eliminate the multiple relay mechanisms and in the process make ActivityPub much more versatile when it comes to organisational and group communications. Our primary use case for 'sender' is to provide an ActivityPub origin to a message that was imported from another system entirely (such as Diaspora or from RSS source). In this case we would set 'attributedTo' to the remote identity that authored the content, and 'sender' to the person that posted it in ActivityPub. ## Emoji Reactions -We consider a reply message containing exactly one emoji and no other text or markup to be an emoji reaction. We indicate this state internally on receipt but do nothing to identify it specifically to downstream recipients. +We consider a reply message containing exactly one emoji and no other text or markup to be an emoji reaction. We indicate this state internally on receipt but currently do nothing to identify it specifically to downstream recipients. ## Mastodon Custom Emojis diff --git a/src/Lib/Activity.php b/src/Lib/Activity.php index 9ffba6a8f..60d3cdcca 100644 --- a/src/Lib/Activity.php +++ b/src/Lib/Activity.php @@ -5063,7 +5063,6 @@ class Activity 'https://www.w3.org/ns/did/v1', 'https://w3id.org/security/multikey/v1', 'https://w3id.org/security/data-integrity/v1', - 'https://purl.archive.org/socialweb/webfinger', [ 'fep' => 'https://w3id.org/fep/ef61#', 'aliases' => 'fep:aliases' @@ -5078,6 +5077,12 @@ class Activity // a limited subset of the entire schema definition for particular activities. return [ + 'wf' => 'https://purl.archive.org/socialweb/webfinger', + 'xsd' => 'http://www.w3.org/2001/XMLSchema#', + 'webfinger' => [ + '@id' => 'wf:webfinger', + '@type' => 'xsd:string' + ], 'nomad' => z_root() . '/apschema#', 'toot' => 'http://joinmastodon.org/ns#', 'manuallyApprovesFollowers' => 'as:manuallyApprovesFollowers', From f6913bf10e926b0d77e7eea50462c5d625727fd7 Mon Sep 17 00:00:00 2001 From: Mike Macgirvin Date: Wed, 29 May 2024 07:29:37 +1000 Subject: [PATCH 10/11] support strike/del in markdown e.g. ~~strike~~ --- include/bbcode.php | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/include/bbcode.php b/include/bbcode.php index b757e6788..bd9ef3167 100644 --- a/include/bbcode.php +++ b/include/bbcode.php @@ -1325,6 +1325,11 @@ function md_italic($content) return '' . $content[1] . $content[3] . ''; } +function md_del($content) +{ + return '' . $content[1] . $content[3] . ''; +} + function md_bold($content) { @@ -2179,9 +2184,11 @@ function bbcode($Text, $options = []) $Text = preg_replace_callback('#(^|\n| )(? Date: Wed, 29 May 2024 07:33:05 +1000 Subject: [PATCH 11/11] update markdown docs --- doc/guide/en/markdown.mc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/guide/en/markdown.mc b/doc/guide/en/markdown.mc index e22e5fe3b..dad6b1dc5 100644 --- a/doc/guide/en/markdown.mc +++ b/doc/guide/en/markdown.mc @@ -16,7 +16,7 @@ If you wish to include the special characters ( \* or \_ ) without interpreting [tr][td][nomd] __bold text__ [/nomd][/td][td] __bold text__ [/td][/tr] [tr][td][nomd] ***bold and italic text*** [/nomd][/td][td] ***bold and italic text*** [/td][/tr] [tr][td][nomd] ___bold and italic text___ [/nomd][/td][td] ___bold and italic text___ [/td][/tr] - +[tr][td][nomd] ~~strike text~~ [/nomd][/td][td] ~~strike text~~ [/td][/tr] [/table] [h3]Headers[/h3]