Commit Graph

185 Commits

Author SHA1 Message Date
Michael ca1b92bb34 Support unlisted public posts 2020-03-02 07:57:23 +00:00
nupplaPhil 85dc9bb96b
Add license info at Friendica PHP files 2020-02-09 16:18:46 +01:00
nupplaPhil ed9392469e
Remove unneeded Config namespace usages 2020-01-19 22:50:44 +01:00
nupplaPhil 6c36fd9e01
Move Config::get() to DI::config()->get() 2020-01-19 21:21:13 +01:00
nupplaPhil d6efc90194
cleanup namespace usages for L10n 2020-01-19 16:31:33 +01:00
nupplaPhil 5dfee31108
Move L10n::t() calls to DI::l10n()->t() calls 2020-01-19 16:31:16 +01:00
Michael 0a4119adaf @brief is removed completely 2020-01-19 06:05:23 +00:00
Michael e6a054696d Ensure that local delivery is done via DFRN 2020-01-11 18:25:48 +00:00
nupplaPhil 3f34229752
Move redundant System::baseUrl() to DI::baseUrl() calls 2019-12-30 23:00:08 +01:00
nupplaPhil 50be94aa5e
Remove deprecated App::getHostName() - process methods to DI::baseUrl()->getHostName() 2019-12-29 20:17:47 +01:00
nupplaPhil 388b963714
Replace BaseObject class with DI::* calls 2019-12-29 20:17:38 +01:00
nupplaPhil 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 Vogel eb4cfa65d8 Fixed warning 2019-12-14 06:42:40 +01:00
Michael b8f81d5e7d Relocate check for announce 2019-12-08 22:04:32 +00:00
Michael fb64010d7a Missing "use" 2019-12-08 21:40:06 +00:00
Michael aa047278cc Reversed annouce check to have priority for AP 2019-12-08 09:01:06 +00:00
Michael 7ccbe3ee29 Transmit reshares and announce natively via Diaspora and AP whenever possible 2019-12-08 08:59:21 +00:00
Michael 41f8796ffc Delivery of reshares 2019-12-06 06:39:50 +00:00
Michael 22b89df348 Removed test logging 2019-11-27 22:00:43 +00:00
Michael a6a79d9c7e Only transfer posts via mail 2019-11-27 21:59:11 +00:00
Michael 2dcf6d9e2b Now using the correct function call ... 2019-11-23 04:31:40 +00:00
Michael 37bdafcc96 Use the "reply-to" header of the original post when answering via mail 2019-11-22 22:15:04 +00:00
Hypolite Petovan 1997938ae7 Remove remaining Logger log level in explicit Logger::debug call 2019-10-16 22:39:31 -04:00
Hypolite Petovan 146646c4d4 Replace deprecated calls to defaults() by ?? and ?: in src/ 2019-10-16 08:38:52 -04:00
Michael 83f670e9e5 Test against the thread parent as well 2019-10-07 04:19:12 +00: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 52d8b618f0 Type hints 2019-09-03 03:59:46 +00:00
Michael db16f1a106 Increment the "failed" value on failed relay delivery 2019-09-02 03:37:45 +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
Michael 5a1a5a54dc Delivery count now counts the failed delivery attempts as well 2019-08-20 07:39:13 +00: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 0a15222576 Collect data about used protocols for delivery 2019-06-28 09:03:58 +00:00
Michael f41513f4ec Issue 7264: Count local delivery as well 2019-06-13 20:24:49 +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 9f026f1814 The only reason we don't defer is when it was a post to a relay 2019-06-01 11:28:37 +00:00
Michael ecf809c7ae The delivery counter now counts only successful deliveries 2019-06-01 06:54:47 +00:00
Michael a6cf036db2 Sending contact suggestions does work again 2019-05-19 17:59:37 +00:00
Michael e3caf0f4f5 Use deferred workers instead of the queue mechanism 2019-04-04 20:51:12 +00:00
Michael 4ff837488f Issue 6167: Don't publish non visible content 2019-03-15 20:31:07 +00:00
Hypolite Petovan 77a591e6e3 Fix namespace ambiguity about Model\Queue in Worker\Delivery 2019-03-06 23:17:58 -05:00
Hypolite Petovan c897969589 Fix wrong variable name in Worker\Delivery 2019-01-23 09:07:00 -05:00
Hypolite Petovan 3d839bb176 Move Contact::ACCOUNT_TYPE_* constants to User::ACCOUNT_TYPE_*
- Keep Contact::TYPE_* constants for comparison with contact.contact-type
2019-01-21 10:56:27 -05:00
Hypolite Petovan 3282ce5389 Fix PHPDoc comments project-wide 2019-01-21 10:35:51 -05:00
Hypolite Petovan ff1f6564f9 Remove delivery queue done incrementation for mail delivery 2019-01-21 09:39:14 -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 8a0e4e12e1 Replace item_id by target_id in multimode delivery workers 2019-01-21 09:32:41 -05: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 ba1e385f86 Don't deliver to blocked domains 2018-11-22 22:09:22 +00:00
Michael 7458d793ed Removing some notices again 2018-11-11 12:15:17 +00:00
Adam Magness ffc406d819 normalise_link calls
implement normaliseLink function
2018-11-08 11:28:29 -05:00
Adam Magness 5276c28a78 link_compare calls
implement compareLink function.
2018-11-08 10:46:50 -05: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 3dc0bb5c4b Fix a notice when sending relocation messages 2018-10-23 02:24:24 +00:00
Hypolite Petovan e9c9eb9c66 Fix notice in Worker\Delivery 2018-10-16 18:26:43 -04: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 72c3a62e7f Profile update is now done via APDelivery 2018-10-01 05:44:56 +00:00
Michael 0dbb6313a5 Hopefully fixes relocations that hadn't been executed 2018-09-22 06:47:35 +00:00
Roland Häder 61693419e8 Cleanups: isResult() more used, readability improved (#5608)
* [diaspora]: Maybe SimpleXMLElement is the right type-hint?

* Changes proposed + pre-renaming:
- pre-renamed $db -> $connection
- added TODOs for not allowing bad method invocations (there is a
  BadMethodCallException in SPL)

* If no record is found, below $r[0] will fail with a E_NOTICE and the code
doesn't behave as expected.

* Ops, one more left ...

* Continued:
- added documentation for Contact::updateSslPolicy() method
- added type-hint for $contact of same method
- empty lines added + TODO where the bug origins that $item has no element 'body'

* Added empty lines for better readability

* Cleaned up:
- no more x() (deprecated) usage but empty() instead
- fixed mixing of space/tab indending
- merged else/if block goether in elseif() (lesser nested code blocks)

* Re-fixed DBM -> DBA switch

* Fixes/rewrites:
- use empty()/isset() instead of deprecated x()
- merged 2 nested if() blocks into one
- avoided nested if() block inside else block by rewriting it to elseif()
- $contact_id is an integer, let's test on > 0 here
- added a lot spaces and some empty lines for better readability

* Rewrite:
- moved all CONTACT_* constants from boot.php to Contact class

* CR request:
- renamed Contact::CONTACT_IS_* -> Contact::* ;-)

* Rewrites:
- moved PAGE_* to Friendica\Model\Profile class
- fixed mixure with "Contact::* rewrite"

* Ops, one still there (return is no function)

* Rewrite to Proxy class:
- introduced new Friendica\Network\Proxy class for in exchange of proxy_*()
  functions
- moved also all PROXY_* constants there as Proxy::*
- removed now no longer needed mod/proxy.php loading as composer's auto-load
  will do this for us
- renamed those proxy_*() functions to better names:
  + proxy_init()           -> Proxy::init()         (public)
  + proxy_url()            -> Proxy::proxifyUrl()   (public)
  + proxy_parse_html()     -> Proxy::proxifyHtml()  (public)
  + proxy_is_local_image() -> Proxy::isLocalImage() (private)
  + proxy_parse_query()    -> Proxy::parseQuery()   (private)
  + proxy_img_cb()         -> Proxy::replaceUrl()   (private)

* CR request:
- moved all PAGE_* constants to Friendica\Model\Contact class
- fixed all references of both classes

* Ops, need to set $a here ...

* CR request:
- moved Proxy class to Friendica\Module
- extended BaseModule

* Ops, no need for own instance of $a when self::getApp() is around.

* Proxy-rewrite:
- proxy_url() and proxy_parse_html() are both non-module functions (now
  methods)
- so they must be splitted into a seperate class
- also the SIZE_* and DEFAULT_TIME constants are both not relevant to module

* No instances from utility classes

* Fixed error:
- proxify*() is now located in `Friendica\Util\ProxyUtils`

* Moved back to original place, ops? How did they move here? Well, it was not
intended by me.

* Removed duplicate (left-over from split) constants and static array. Thank to
MrPetovan finding it.

* Renamed ProxyUtils -> Proxy and aliased it back to ProxyUtils.

* Rewrite:
- stopped using deprecated NETWORK_* constants, now Protocol::* should be used
- still left them intact for slow/lazy developers ...

* Ops, was added accidentally ...

* Ops, why these wrong moves?

* Ops, one to much (thanks to MrPetovan)

* Ops, wrong moving ...

* moved back to original place ...

* spaces added

* empty lines add for better readability.

* convertered spaces -> tab for code indenting.

* CR request: Add space between if and brace.

* CR requests fixed + move reverted
- ops, src/Module/*.php has been moved to src/Network/ accidentally
- reverted some parts in src/Database/DBA.php as pointed out by Annando
- removed internal TODO items
- added some spaces for better readability
2018-08-24 01:05:49 -04:00
Michael Vogel c1da44b7dc We now use a central function to fetch the importer (#5636) 2018-08-19 13:37:56 +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
Michael Vogel 5e61caa34f Fix for not loading the translation / some more notice removed (#5569) 2018-08-06 12:11:17 +02:00
Michael Vogel b552b711ee And some more notices removed ... (#5533)
* Fix for vanishing notes

* The field needs to be part of the selected fields ...

* And some more notes ...
2018-07-31 07:54:25 +02:00
Roland Häder 4a22710b3b Moved global PAGE_* to Profile class (#5500)
* Rewrites:
- moved PAGE_* to Friendica\Model\Profile class

* Fixed more rewrites from plain (global namespace) PAGE_* to Friendica\Models\Profile class

* CR request:
- moved all PAGE_* constants to Friendica\Model\Contact class
- fixed all references of both classes

* CR request:
- moved ACCOUNT_TYPE_* constants from boot.php to Contact::ACCOUNT_TYPE_*

* Just copy-pasted this code from boot.php, needs to be changed to `const ACCOUNT_TYPE_FOO = x;`

* Ops, melting brain cells here ... :-/
2018-07-27 19:25:57 -04: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
Michael Vogel 69af69d1a0 Fallback to Diaspora if DFRN transmission fails (#5487) 2018-07-24 14:12:09 -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 f051ae1698 Rename DBA::fetch_first to DBA::fetchFirst 2018-07-22 19:27:34 -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
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 Vogel 0360f7197a Several more warnings ... (#5340)
* Some more warnings removed

* Even more warnings ...

* Will it ever end? ;-)

* Avoid warning in dbstructure

* Origin and OStatus ...

* There are more warnings solved ... yeah!

* And again ...

* We are not done yet

* And more ...

* And some new places ...

* And more in the feeds

* Avoid some more

* And some backend stuff

* Notifications cleared

* Some more stuff

* and again ...

* It's getting fewer ...

* Some warnings had been hidden in the notifications

* Fix the fix

* And another missing one ...

* We need the owner here, not the user

* Forgotten user

* And more ...

* And some more warnings disappeared ...

* Some more frontend warnings

* Some backend warnings removed

* Fixed sidebar for "vier"

* And more ...

* Some more ...

* And something for "remote self"

* Am I stuck in an endless loop?

* Fix: Clear tag and file field on update

* Preset page content
2018-07-10 08:27:56 -04:00
Michael 3e797547a3 Warnings fixed 2018-07-08 09:37:05 +00: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 1e0200884f Fixed private messaging/relaying is controlled by the parent 2018-05-01 06:37:12 +00:00
Michael a182dd3400 Improved logging, avoiding PHP warning 2018-04-30 16:46:49 +00:00
Michael 4909075321 Merge branch 'direct-dfrn' of github.com:annando/friendica into direct-dfrn 2018-04-30 13:09:11 +00:00
Michael 5588f0d2ae Improved logging 2018-04-30 13:08:48 +00:00
Michael b2b597288c Deliver with the new function when delivering to a "uid=0" contact 2018-04-30 13:07:40 +00:00
Michael bbbebb2b9c Don't spool relay deliveries 2018-04-30 05:56:40 +00:00
Michael 84909d9711 Standard stuff 2018-04-27 12:40:52 +00:00
Michael 9f5a6c05fb Preparation for relay posts with DFRN 2018-04-27 05:11:52 +00:00
Michael 4904be0d6f Better fallback on values > 299 as well 2018-04-27 04:55:46 +00:00
Michael e3c9d31088 Added header 2018-04-27 03:08:13 +00:00
Michael 488c6c9b68 Constants moved 2018-04-27 02:52:12 +00:00
Michael 66e34b9357 Improvements 2018-04-26 22:30:43 +00:00
Michael 8c23fea1df Added some explanation, beautified code 2018-04-26 21:16:16 +00:00
Michael a0c5a84ce8 Better way to fetch items 2018-04-26 07:11:18 +00:00
Michael b70b020490 Unneeded stuff removed, only fetch needed records 2018-04-26 06:23:01 +00:00
Michael 71d4c6e4a0 Cleaned up 2018-04-26 05:45:05 +00:00
Michael c437dac3a0 Delivery to non followers 2018-04-25 21:55:24 +00:00
Michael 3abd0b54cc Reworked delivery 2018-04-25 21:18:21 +00:00
Tobias Diekershoff 0cab448ba1 make it unreadable... almost 2018-04-11 14:12:53 +02:00
Tobias Diekershoff ef8e984c62 noreply should not be translate-able in email addresses 2018-04-11 08:17:44 +02:00