Commit graph

116 commits

Author SHA1 Message Date
a6a79d9c7e Only transfer posts via mail 2019-11-27 21:59:11 +00:00
2dcf6d9e2b Now using the correct function call ... 2019-11-23 04:31:40 +00:00
37bdafcc96 Use the "reply-to" header of the original post when answering via mail 2019-11-22 22:15:04 +00:00
1997938ae7 Remove remaining Logger log level in explicit Logger::debug call 2019-10-16 22:39:31 -04:00
146646c4d4 Replace deprecated calls to defaults() by ?? and ?: in src/ 2019-10-16 08:38:52 -04:00
83f670e9e5 Test against the thread parent as well 2019-10-07 04:19:12 +00:00
9c6fd5fc35 Fix communication issues when a contact is able to speak AP, but uses Diaspora 2019-10-06 21:59:23 +00:00
52d8b618f0 Type hints 2019-09-03 03:59:46 +00:00
db16f1a106 Increment the "failed" value on failed relay delivery 2019-09-02 03:37:45 +00:00
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
5a1a5a54dc Delivery count now counts the failed delivery attempts as well 2019-08-20 07:39:13 +00:00
e556dfd475 Don't deliver nested comments to Diaspora if the previous comment wasn't from Diaspora 2019-07-28 19:13:17 +00:00
0a15222576 Collect data about used protocols for delivery 2019-06-28 09:03:58 +00:00
f41513f4ec Issue 7264: Count local delivery as well 2019-06-13 20:24:49 +00:00
41dc243186 Fix delivery counter for poking / unify delivery commands 2019-06-10 14:19:24 +00:00
44a49a8d7d Ensure that pokes are always send only via DFRN 2019-06-06 04:26:02 +00:00
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
ecf809c7ae The delivery counter now counts only successful deliveries 2019-06-01 06:54:47 +00:00
a6cf036db2 Sending contact suggestions does work again 2019-05-19 17:59:37 +00:00
e3caf0f4f5 Use deferred workers instead of the queue mechanism 2019-04-04 20:51:12 +00:00
4ff837488f Issue 6167: Don't publish non visible content 2019-03-15 20:31:07 +00:00
77a591e6e3 Fix namespace ambiguity about Model\Queue in Worker\Delivery 2019-03-06 23:17:58 -05:00
c897969589 Fix wrong variable name in Worker\Delivery 2019-01-23 09:07:00 -05:00
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
3282ce5389 Fix PHPDoc comments project-wide 2019-01-21 10:35:51 -05:00
ff1f6564f9 Remove delivery queue done incrementation for mail delivery 2019-01-21 09:39:14 -05:00
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
8a0e4e12e1 Replace item_id by target_id in multimode delivery workers 2019-01-21 09:32:41 -05:00
d813d72b1a Simplyfies AP relaying, fixes relaying of public contacts 2019-01-17 23:06:27 +00:00
acaee626f5 Remove include/ requires that are now done directly from Composer 2018-12-24 09:56:25 -05:00
ba1e385f86 Don't deliver to blocked domains 2018-11-22 22:09:22 +00:00
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
3dc0bb5c4b Fix a notice when sending relocation messages 2018-10-23 02:24:24 +00:00
e9c9eb9c66 Fix notice in Worker\Delivery 2018-10-16 18:26:43 -04:00
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
72c3a62e7f Profile update is now done via APDelivery 2018-10-01 05:44:56 +00:00
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