Commit graph

186 commits

Author SHA1 Message Date
Philipp Holzer ed9392469e
Remove unneeded Config namespace usages 2020-01-19 22:50:44 +01:00
Philipp Holzer 6c36fd9e01
Move Config::get() to DI::config()->get() 2020-01-19 21:21:13 +01:00
Michael 28c54242a5 The value has to be assigned, not compared :-) 2020-01-11 18:28:04 +00:00
Michael e6a054696d Ensure that local delivery is done via DFRN 2020-01-11 18:25:48 +00:00
Philipp Holzer 50be94aa5e
Remove deprecated App::getHostName() - process methods to DI::baseUrl()->getHostName() 2019-12-29 20:17:47 +01:00
Philipp Holzer 388b963714
Replace BaseObject class with DI::* calls 2019-12-29 20:17:38 +01:00
Philipp Holzer 1de3f186d7
Introduce new DI container
- Adding Friendica\DI class for getting dynamic classes
- Replacing BaseObject::getApp() with this class
2019-12-29 20:16:55 +01:00
Michael b8f81d5e7d Relocate check for announce 2019-12-08 22:04:32 +00:00
Michael d8da580869 Fix mail delivery via AP when the contact is hidden 2019-11-22 08:01:23 +00:00
Philipp Holzer aa7be41728
Fix ACLFormatterTest
- Add nullable to expand() function again
- Add angle bracket support to toString()
2019-11-01 14:13:29 +01:00
Michael 44cc750f79 Some more warnings removed 2019-10-31 07:33:25 +00:00
Michael 422f0cbdbc Solve warning 2019-10-30 09:44:07 +00:00
Michael dc065eed42 Fix several warnings and errors 2019-10-30 06:50:20 +00:00
Philipp Holzer 3eda62bfa6
Check null for acl-fields 2019-10-28 18:16:10 +01:00
Philipp Holzer f65f7f11c3
Move expand_acl to ACLFormatter::expand()
- including tests
2019-10-23 00:40:14 +02:00
Michael 9c6fd5fc35 Fix communication issues when a contact is able to speak AP, but uses Diaspora 2019-10-06 21:59:23 +00:00
Michael cf569425c6 Avoid a notice 2019-09-21 13:00:53 +00:00
Michael c364a77d63 Always use direct DFRN transport on local contacts 2019-09-21 12:39:07 +00:00
Michael 16a0afbbae Fixes the delivery counter for edits 2019-09-04 21:06:25 +00:00
Michael 6af4c90dff Fix delivery counter / archive relay contacts 2019-09-02 03:25:05 +00:00
Michael Vogel 9b7432781b Don't transmit content to already archived contacts 2019-08-27 21:01:11 +02:00
Hypolite Petovan 0579252362 Add user meta-groups for followers and mutual contacts
- Both Group::expand and Item::enumeratePermissions now have a user id parameter to expand meta-groups
2019-07-29 20:31:46 -04:00
Michael e556dfd475 Don't deliver nested comments to Diaspora if the previous comment wasn't from Diaspora 2019-07-28 19:13:17 +00:00
Michael 379a1a52e0 Avoid a warning 2019-07-16 19:58:47 +00:00
Michael 143566b853 Missing word 2019-07-15 04:36:55 +00:00
Michael 6170ddf58d Issue 7367: Only skip DFRN delivery when both author and owner of the post support AP 2019-07-15 04:33:00 +00:00
Michael 0a15222576 Collect data about used protocols for delivery 2019-06-28 09:03:58 +00:00
Michael 16b9d9f199 Fix pixture posts to connectors / fix delivery counter for connector posts 2019-06-11 19:35:03 +00:00
Michael 41dc243186 Fix delivery counter for poking / unify delivery commands 2019-06-10 14:19:24 +00:00
Michael 44a49a8d7d Ensure that pokes are always send only via DFRN 2019-06-06 04:26:02 +00:00
Michael Vogel f3c2eb5b11 Fix receiver list for mails / only deliver mail via DFRN to legacy contacts 2019-05-18 11:09:13 +02:00
Michael 87b98b8249 Sending direct messages via AP does work now - receiving is pending 2019-05-14 17:50:45 +00:00
Michael 55557a8f18 Contacts with protocol = AP are now delivered only via AP 2019-05-11 05:58:22 +00:00
Hypolite Petovan 66df8d6bc6 Fix wrong variable name in Worker\Notifier 2019-03-23 00:05:47 -04:00
Michael 4ff837488f Issue 6167: Don't publish non visible content 2019-03-15 20:31:07 +00:00
Michael 80c2c5479a Issue 6167: Don't distribute uploaded pictures 2019-03-15 06:05:52 +00:00
Michael cd0d6cb626 Forums now are working with AP as well 2019-03-14 18:44:41 +00:00
Michael d87abe9563 Worker: Don't spawn without jobs 2019-03-08 05:53:36 +00:00
Roland Häder 9fa812b35d
Rewrites:
- converted single-line if() block to multi-line and with curly braces
- "imported" SPL classes to have unified code style
- always initialize your variables ... :-/
- added some empty lines/spaces for better readability

Signed-off-by: Roland Häder <roland@mxchange.org>
2019-02-19 01:56:41 +01:00
Michael 6fd8b5f365 Don't send single item delete commands to protocols that support account removal 2019-02-11 20:30:08 +00:00
Michael fc0acd7b1f AP: Debug option to deliver via AP first 2019-01-30 19:33:08 +00:00
Michael 030c0b5dc6 Another preparation for forum posts via AP 2019-01-28 06:23:06 +00:00
Michael 3392c7a8be Fixed "created" origin 2019-01-24 00:34:14 +00:00
Michael 0fdab4ed10 Fix for several fatal errors 2019-01-23 21:54:20 +00:00
Hypolite Petovan 5d4bafb116 Fix two additional uses of uid in Worker\Notifier 2019-01-22 08:31:39 -05:00
Hypolite Petovan 282bc01994 Fix using wrong uid for APDelivery in Worker\Notifier 2019-01-22 01:59:30 -05:00
Hypolite Petovan 3282ce5389 Fix PHPDoc comments project-wide 2019-01-21 10:35:51 -05:00
Hypolite Petovan 1696ad962e Add delivery queue number manipulation
- Add new ItemDeliveryData model class
- Add queue_count initialization in Notifier
- Add queue_done incrementation in various Delivery tasks
2019-01-21 09:36:51 -05:00
Hypolite Petovan 1e6193a14e Refactor Worker/Notifier part 4
- Remove redundant $normal_mode flag
- Moved public message email recipient loop
- Simplify OStatus delivery
2019-01-21 09:31:57 -05:00
Hypolite Petovan 774609dd38 Refactor Worker/Notifier part 3
- Replace deprecated q() calls
2019-01-21 09:31:56 -05:00
Hypolite Petovan d0228b9b97 Refactor Worker/Notifier part 2
- Move self-removal in a sub-method in Worker/Notifier
2019-01-21 09:27:06 -05:00
Hypolite Petovan 507c215c76 Refactor Worker/Notifier part 1
- Rename variables
- Remove orphan, duplicate and one-use intermediary variables
- Initialize potentially missing variables
- Replace obsolete Addon::callHooks call
- Simplify Notifier::activityPubDelivery() signature
2019-01-21 09:27:05 -05:00
Michael 103b92fc48 Avoid that forum posts are received via the Diaspora protocol first 2019-01-19 12:30:16 +00:00
Michael d813d72b1a Simplyfies AP relaying, fixes relaying of public contacts 2019-01-17 23:06:27 +00:00
Hypolite Petovan acaee626f5 Remove include/ requires that are now done directly from Composer 2018-12-24 09:56:25 -05:00
Michael a041c7c0fa Issue 6236: Handle account removal messages with very low priority 2018-12-06 10:04:16 +00:00
Michael 3b565e80b6 Improved logger text 2018-11-05 20:35:17 +00:00
Michael ef205878b6 Cleaned up the notifier 2018-11-04 23:17:41 +00:00
Michael bd97215147 Merge remote-tracking branch 'upstream/develop' into diasppora-delivery 2018-11-04 18:54:49 +00:00
Michael f7f96e971a Avoid duplicated delivery to Diaspora 2018-10-30 17:34:18 +00:00
Adam Magness 50da89d861 Logger Levels
update logger levels in calls
2018-10-30 09:58:45 -04:00
Adam Magness 14fde5dc9b Log function
implement log() function.
2018-10-30 09:57:14 -04:00
Michael 73f596cc46 Fixes duplicated transmissions and not working undo of like/dislike 2018-10-27 11:09:23 +00:00
Hypolite Petovan ca9cad3491 Move hook-related methods from Core\Addon to Core\Hook 2018-10-22 16:50:54 -04:00
Michael fea48fa85e AP: Transmitting and receiving with non AP contacts 2018-10-20 07:53:45 +00:00
Philipp Holzer 5a02e39a65
Rename App Methods
- renamed a lot of App methods to CamelCase
- replaced direct public variables with get-/set-Methods
2018-10-10 00:16:06 +02:00
Michael b5d73f840c AP fixes: LD-signature, wrong owner for completed thres, account removal 2018-10-09 05:04:24 +00:00
Michael 6b374c32a2 Improved AP distribution / Only process trusted content 2018-10-06 13:16:52 +00:00
Michael f69c80b9e2 AP delivery is relocated to the top of the notifier 2018-10-06 03:16:38 +00:00
Michael 51dbffd396 Cache the AP delivery process 2018-10-05 21:00:40 +00:00
Michael 3ab837f3c7 Functionality is now split 2018-10-03 09:15:38 +00:00
Michael 6020605d5c Account deletion could work now. 2018-10-01 19:22:13 +00:00
Michael 214407bdc8 Improve communication 2018-09-22 14:12:54 +00:00
Michael 4c224fbddd Deliver everything to all receivers in the thread 2018-09-21 12:06:36 +00:00
Michael 59cd6611ec Direkt delivery is done 2018-09-21 05:41:18 +00:00
Michael f772ece86f New delivery module for ap 2018-09-17 21:13:08 +00:00
Michael e4d28629e4 First posting tests 2018-09-16 17:47:00 +00:00
Michael 61e2c7d20d Added AP to many network conditions / enabling inbox processing 2018-09-14 16:51:32 +00:00
Michael 9ef1d827f3 Restore the behaviour to remove the remote contact upon termination 2018-09-05 05:02:06 +00:00
Michael 4fcae18289 Issue 5262: Comments to a forum post aren't distributed via push 2018-09-01 03:23:12 +00:00
Roland Häder e06fc2aa69 Stopped using deprecated constants NETWORK_* (#5537)
* Rewrite:
- stopped using deprecated NETWORK_* constants, now Protocol::* should be used
- still left them intact for slow/lazy developers ...

* Removed deprecated NETWORK_* constants as per code reviewer's request.
2018-08-11 22:40:44 +02:00
Roland Häder 37253656e3 Moved CONTACT_* constants to Friendica\Model\Contact class, lesser in global namespace (#5490)
* Rewrite:
- moved all CONTACT_* constants from boot.php to Contact class

* CR request:
- renamed Contact::CONTACT_IS_* -> Contact::* ;-)
2018-07-24 22:53:46 -04:00
Hypolite Petovan a6fb3568f9 Rename dbesc to DBA::escape 2018-07-23 15:30:54 -04:00
Hypolite Petovan ecea7425f8 Rename DBA::is_result to DBA::isResult 2018-07-23 11:04:14 -04:00
Hypolite Petovan 0ec44f3e8a Rename DBM method calls to DBA method calls 2018-07-23 11:02:24 -04:00
Hypolite Petovan 4db98eb43d Rename DBA::inArray to DBA::toArray 2018-07-22 19:27:35 -04:00
Hypolite Petovan af6dbc654f Rename Friendica\Database\dba to Friendica\Database\DBA 2018-07-20 08:19:26 -04:00
Hypolite Petovan daa1177e3a Update use statement lists with new Friendica\Database\dba class
- Remove unused use statement
- Remove superfluous use statements (classes in the same namespace)
- Add missing use statements
2018-07-19 22:15:21 -04:00
Hypolite Petovan 820afa2284 Replace global $a with BaseObject::getApp() 2018-07-16 19:38:17 -04:00
Michael Vogel d3a2ed85fe Next item structure works (#5380)
* Use "LEFT JOIN" to always fetch the item. Needed for update routines.

* New conversion routine that now covers every item

* Post update is now activated

* We now use a hash based upon RIPEMD-320 for content and activity

* The hash doesn't contain the plink anymore

* Legacy item fields are now "null"able

* New hash function for a server unique item hash

* Introduction of the legacy mode (usage of old item fields)

* Code simplification

* We don't need the "uri" fields anymore in item-activity and item-content

* Use the "created" and not the "received" date for the hash

* Avoiding several notices

* Some more warnings removed

* Improved uri-hash / Likes on Diaspora are now getting a creation date

* Corrected the post update version

* Ensure an unique uri-hash

* Don't delete orhaned item data at the moment

* Partly reworked, due to strange behaviour

* Some more parts reworked

* Using the uri currently seems to be more reliable

* Using the uri here as well

* Use the hash values again

* Grouped item fields in different categories

* Notices again

* use the gravity (we always should)

* Added hint for disabled post updates

* Notices ...

* Issue #5337: Personal notes are displayed again

* Use the gravity again
2018-07-15 14:36:20 -04:00
Michael 4d35e228c4 More item abstraction / making remote deletion work again 2018-07-07 18:14:16 +00:00
Michael d643e00d33 Standards and a new function to fetch content 2018-06-21 15:14:01 +00:00
Michael 23aa9dffa0 New item functions are now used in the delivery process as well 2018-06-17 21:35:33 +00:00
Michael d7c477d0f4 Don't probe anymore, but ensure that we got good contact data 2018-06-03 08:36:05 +00:00
Michael e9848d7b8f End subscription for unreachable subscribers 2018-05-19 03:56:29 +00:00
Michael 61824119e4 Moved functionality in new model class 2018-05-17 23:30:49 +00:00
Michael 5a1e1c1ec9 Fix to OStatus delivery to be not so blocking to other tasks 2018-05-17 22:17:03 +00:00
Michael b333c7ae2e Bugfix: Only send a notifier when the item was really edited 2018-05-17 05:49:55 +00:00
Michael 1e0200884f Fixed private messaging/relaying is controlled by the parent 2018-05-01 06:37:12 +00:00
Michael edcf1466a7 Relay: Avoid sending relay posts to servers that already received content 2018-04-11 19:01:25 +00:00