1
1
Fork 0

Merge remote-tracking branch 'upstream/develop' into conversation-moved

This commit is contained in:
Michael 2021-09-26 03:57:31 +00:00
commit 96055cafff
6 changed files with 59 additions and 32 deletions

View file

@ -410,6 +410,7 @@ steps:
- # calculate SHA256 checksum - # calculate SHA256 checksum
- cd ./build - cd ./build
- sha256sum "$ARTIFACT" > "$ARTIFACT.sum256" - sha256sum "$ARTIFACT" > "$ARTIFACT.sum256"
- chmod 664 ./*
- ls -lh - ls -lh
- # output the sha256 sum for checking - # output the sha256 sum for checking
- cat "$ARTIFACT.sum256" - cat "$ARTIFACT.sum256"
@ -518,6 +519,7 @@ steps:
- # calculate SHA256 checksum - # calculate SHA256 checksum
- cd ./build - cd ./build
- sha256sum "$ARTIFACT" > "$ARTIFACT.sum256" - sha256sum "$ARTIFACT" > "$ARTIFACT.sum256"
- chmod 664 ./*
- ls -lh - ls -lh
- # output the sha256 sum for checking - # output the sha256 sum for checking
- cat "$ARTIFACT.sum256" - cat "$ARTIFACT.sum256"

View file

@ -479,6 +479,23 @@ Hook data:
- **uid** (input): the user to return the contact data for (can be empty for public contacts). - **uid** (input): the user to return the contact data for (can be empty for public contacts).
- **result** (output): Set by the hook function to indicate a successful detection. - **result** (output): Set by the hook function to indicate a successful detection.
### follow
Called before adding a new contact for a user to handle non-native network remote contact (like Twitter).
Hook data:
- **url** (input): URL of the remote contact.
- **contact** (output): should be filled with the contact (with uid = user creating the contact) array if follow was successful.
### unfollow
Called when unfollowing a remote contact on a non-native network (like Twitter)
Hook data:
- **contact** (input): the remote contact (uid = local unfollowing user id) array.
- **dissolve** (input): whether to stop sharing with the remote contact as well.
## Complete list of hook callbacks ## Complete list of hook callbacks
Here is a complete list of all hook callbacks with file locations (as of 24-Sep-2018). Please see the source for details of any hooks not documented above. Here is a complete list of all hook callbacks with file locations (as of 24-Sep-2018). Please see the source for details of any hooks not documented above.
@ -648,6 +665,7 @@ Here is a complete list of all hook callbacks with file locations (as of 24-Sep-
Hook::callAll('contact_photo_menu', $args); Hook::callAll('contact_photo_menu', $args);
Hook::callAll('follow', $arr); Hook::callAll('follow', $arr);
Hook::callAll('unfollow', $hook_data);
### src/Model/Profile.php ### src/Model/Profile.php

View file

@ -356,6 +356,7 @@ Eine komplette Liste aller Hook-Callbacks mit den zugehörigen Dateien (am 01-Ap
Hook::callAll('contact_photo_menu', $args); Hook::callAll('contact_photo_menu', $args);
Hook::callAll('follow', $arr); Hook::callAll('follow', $arr);
Hook::callAll('unfollow', $hook_data);
### src/Model/Profile.php ### src/Model/Profile.php

View file

@ -144,7 +144,7 @@ function unfollow_process(string $url)
Contact::terminateFriendship($owner, $contact, $dissolve); Contact::terminateFriendship($owner, $contact, $dissolve);
} }
// Sharing-only contacts get deleted as there no relationship any more // Sharing-only contacts get deleted as there no relationship anymore
if ($dissolve) { if ($dissolve) {
Contact::remove($contact['id']); Contact::remove($contact['id']);
$return_path = $base_return_path; $return_path = $base_return_path;

View file

@ -845,6 +845,12 @@ class Contact
if ($dissolve) { if ($dissolve) {
ActivityPub\Transmitter::sendContactReject($contact['url'], $contact['hub-verify'], $user['uid']); ActivityPub\Transmitter::sendContactReject($contact['url'], $contact['hub-verify'], $user['uid']);
} }
} else {
$hook_data = [
'contact' => $contact,
'dissolve' => $dissolve,
];
Hook::callAll('unfollow', $hook_data);
} }
} }

View file

@ -8,7 +8,7 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: 2021.12-dev\n" "Project-Id-Version: 2021.12-dev\n"
"Report-Msgid-Bugs-To: \n" "Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2021-09-25 18:44+0000\n" "POT-Creation-Date: 2021-09-26 03:57+0000\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n" "Language-Team: LANGUAGE <LL@li.org>\n"
@ -717,7 +717,7 @@ msgid "OStatus support is disabled. Contact can't be added."
msgstr "" msgstr ""
#: mod/follow.php:138 src/Content/Item.php:463 src/Content/Widget.php:76 #: mod/follow.php:138 src/Content/Item.php:463 src/Content/Widget.php:76
#: src/Model/Contact.php:1045 src/Model/Contact.php:1058 #: src/Model/Contact.php:1051 src/Model/Contact.php:1064
#: view/theme/vier/theme.php:172 #: view/theme/vier/theme.php:172
msgid "Connect/Follow" msgid "Connect/Follow"
msgstr "" msgstr ""
@ -3001,31 +3001,31 @@ msgstr ""
msgid "Follow Thread" msgid "Follow Thread"
msgstr "" msgstr ""
#: src/Content/Item.php:443 src/Model/Contact.php:1050 #: src/Content/Item.php:443 src/Model/Contact.php:1056
msgid "View Status" msgid "View Status"
msgstr "" msgstr ""
#: src/Content/Item.php:444 src/Content/Item.php:466 src/Model/Contact.php:976 #: src/Content/Item.php:444 src/Content/Item.php:466 src/Model/Contact.php:982
#: src/Model/Contact.php:1042 src/Model/Contact.php:1051 #: src/Model/Contact.php:1048 src/Model/Contact.php:1057
#: src/Module/Directory.php:160 src/Module/Settings/Profile/Index.php:223 #: src/Module/Directory.php:160 src/Module/Settings/Profile/Index.php:223
msgid "View Profile" msgid "View Profile"
msgstr "" msgstr ""
#: src/Content/Item.php:445 src/Model/Contact.php:1052 #: src/Content/Item.php:445 src/Model/Contact.php:1058
msgid "View Photos" msgid "View Photos"
msgstr "" msgstr ""
#: src/Content/Item.php:446 src/Model/Contact.php:1043 #: src/Content/Item.php:446 src/Model/Contact.php:1049
#: src/Model/Contact.php:1053 #: src/Model/Contact.php:1059
msgid "Network Posts" msgid "Network Posts"
msgstr "" msgstr ""
#: src/Content/Item.php:447 src/Model/Contact.php:1044 #: src/Content/Item.php:447 src/Model/Contact.php:1050
#: src/Model/Contact.php:1054 #: src/Model/Contact.php:1060
msgid "View Contact" msgid "View Contact"
msgstr "" msgstr ""
#: src/Content/Item.php:448 src/Model/Contact.php:1056 #: src/Content/Item.php:448 src/Model/Contact.php:1062
msgid "Send PM" msgid "Send PM"
msgstr "" msgstr ""
@ -3048,7 +3048,7 @@ msgstr ""
msgid "Languages" msgid "Languages"
msgstr "" msgstr ""
#: src/Content/Item.php:458 src/Model/Contact.php:1057 #: src/Content/Item.php:458 src/Model/Contact.php:1063
msgid "Poke" msgid "Poke"
msgstr "" msgstr ""
@ -3498,7 +3498,7 @@ msgstr ""
msgid "Organisations" msgid "Organisations"
msgstr "" msgstr ""
#: src/Content/Widget.php:529 src/Model/Contact.php:1474 #: src/Content/Widget.php:529 src/Model/Contact.php:1480
msgid "News" msgid "News"
msgstr "" msgstr ""
@ -4362,85 +4362,85 @@ msgstr ""
msgid "Legacy module file not found: %s" msgid "Legacy module file not found: %s"
msgstr "" msgstr ""
#: src/Model/Contact.php:1046 src/Model/Contact.php:1059 #: src/Model/Contact.php:1052 src/Model/Contact.php:1065
msgid "UnFollow" msgid "UnFollow"
msgstr "" msgstr ""
#: src/Model/Contact.php:1055 #: src/Model/Contact.php:1061
msgid "Drop Contact" msgid "Drop Contact"
msgstr "" msgstr ""
#: src/Model/Contact.php:1065 src/Module/Admin/Users/Pending.php:107 #: src/Model/Contact.php:1071 src/Module/Admin/Users/Pending.php:107
#: src/Module/Notifications/Introductions.php:111 #: src/Module/Notifications/Introductions.php:111
#: src/Module/Notifications/Introductions.php:183 #: src/Module/Notifications/Introductions.php:183
msgid "Approve" msgid "Approve"
msgstr "" msgstr ""
#: src/Model/Contact.php:1470 #: src/Model/Contact.php:1476
msgid "Organisation" msgid "Organisation"
msgstr "" msgstr ""
#: src/Model/Contact.php:1478 #: src/Model/Contact.php:1484
msgid "Forum" msgid "Forum"
msgstr "" msgstr ""
#: src/Model/Contact.php:2334 #: src/Model/Contact.php:2340
msgid "Disallowed profile URL." msgid "Disallowed profile URL."
msgstr "" msgstr ""
#: src/Model/Contact.php:2339 src/Module/Friendica.php:81 #: src/Model/Contact.php:2345 src/Module/Friendica.php:81
msgid "Blocked domain" msgid "Blocked domain"
msgstr "" msgstr ""
#: src/Model/Contact.php:2344 #: src/Model/Contact.php:2350
msgid "Connect URL missing." msgid "Connect URL missing."
msgstr "" msgstr ""
#: src/Model/Contact.php:2353 #: src/Model/Contact.php:2359
msgid "" msgid ""
"The contact could not be added. Please check the relevant network " "The contact could not be added. Please check the relevant network "
"credentials in your Settings -> Social Networks page." "credentials in your Settings -> Social Networks page."
msgstr "" msgstr ""
#: src/Model/Contact.php:2390 #: src/Model/Contact.php:2396
msgid "The profile address specified does not provide adequate information." msgid "The profile address specified does not provide adequate information."
msgstr "" msgstr ""
#: src/Model/Contact.php:2392 #: src/Model/Contact.php:2398
msgid "No compatible communication protocols or feeds were discovered." msgid "No compatible communication protocols or feeds were discovered."
msgstr "" msgstr ""
#: src/Model/Contact.php:2395 #: src/Model/Contact.php:2401
msgid "An author or name was not found." msgid "An author or name was not found."
msgstr "" msgstr ""
#: src/Model/Contact.php:2398 #: src/Model/Contact.php:2404
msgid "No browser URL could be matched to this address." msgid "No browser URL could be matched to this address."
msgstr "" msgstr ""
#: src/Model/Contact.php:2401 #: src/Model/Contact.php:2407
msgid "" msgid ""
"Unable to match @-style Identity Address with a known protocol or email " "Unable to match @-style Identity Address with a known protocol or email "
"contact." "contact."
msgstr "" msgstr ""
#: src/Model/Contact.php:2402 #: src/Model/Contact.php:2408
msgid "Use mailto: in front of address to force email check." msgid "Use mailto: in front of address to force email check."
msgstr "" msgstr ""
#: src/Model/Contact.php:2408 #: src/Model/Contact.php:2414
msgid "" msgid ""
"The profile address specified belongs to a network which has been disabled " "The profile address specified belongs to a network which has been disabled "
"on this site." "on this site."
msgstr "" msgstr ""
#: src/Model/Contact.php:2413 #: src/Model/Contact.php:2419
msgid "" msgid ""
"Limited profile. This person will be unable to receive direct/personal " "Limited profile. This person will be unable to receive direct/personal "
"notifications from you." "notifications from you."
msgstr "" msgstr ""
#: src/Model/Contact.php:2472 #: src/Model/Contact.php:2478
msgid "Unable to retrieve contact information." msgid "Unable to retrieve contact information."
msgstr "" msgstr ""