Commit Graph

15300 Commits

Author SHA1 Message Date
Mikael Nordfeldth
2dfa0bfcee function delete in dataobjects now don't break strict syntax 2013-10-29 10:20:57 +01:00
Mikael Nordfeldth
23a6b4595f Reworked the ActivityContext->attention structure
Removing Evan's obscure attentionType solution and directly using the attention array
2013-10-28 22:21:14 +01:00
Mikael Nordfeldth
f99c4b7f07 More OOP-ish tests using instanceof 2013-10-28 22:18:00 +01:00
Mikael Nordfeldth
e4084d0f5a PEAR lib updated to 1.9.4 (seems only installation stuff changed) 2013-10-28 19:39:15 +01:00
Mikael Nordfeldth
3ba6374b9d Memcached_DataObject extensions got their update functions more consistent 2013-10-28 19:36:05 +01:00
Mikael Nordfeldth
fa91bc7132 Some getStaticProperty calls to PEAR globalized 2013-10-28 19:03:09 +01:00
Mikael Nordfeldth
fd0a16ba04 acct uri should be caseinsensitive (so let's do our reconstruction in lowercase) 2013-10-28 18:28:53 +01:00
Mikael Nordfeldth
74429835a1 Event handler StartGetProfileAcctUri for WebFinger 2013-10-28 18:26:00 +01:00
Mikael Nordfeldth
9ea57e5cb2 getAcctUri function added with related exception
Used in ActivityObject for Atom Title generation.

New events:
    * StartGetProfileAcctUri
    * EndGetProfileAcctUri
2013-10-28 18:21:10 +01:00
Mikael Nordfeldth
addd84aa22 Make Atom titles a bit more verbose 2013-10-28 17:54:34 +01:00
Mikael Nordfeldth
a5d8707658 Use getParent instead of manual reply_to lookup 2013-10-28 17:28:10 +01:00
Mikael Nordfeldth
fcba540a14 Removed legacy OMB. Use OStatus for remote profiles. 2013-10-28 16:22:09 +01:00
Mikael Nordfeldth
e7a4ccb7b5 Enable json-specified objects in queue_item frames 2013-10-28 12:44:06 +01:00
Mikael Nordfeldth
2ef9beb4b1 defines changed to GNU social names instead of StatusNet 2013-10-27 11:27:12 +01:00
Mikael Nordfeldth
362b6ad2fc ForceGroup and some qvitter API stuff still used staticGet 2013-10-25 13:20:53 +02:00
Mikael Nordfeldth
340740266c Notice class local cache fixes 2013-10-23 12:33:37 +02:00
Mikael Nordfeldth
a980f4ed33 Call memcache() as a static object (it's a static class) 2013-10-23 12:02:15 +02:00
Mikael Nordfeldth
a38ed0057a Moved jbfavre's Twitter card support to Twitter plugin
It was causing problems with an undefined TWITTER_SERVICE constant.
2013-10-22 20:35:03 +02:00
Mikael Nordfeldth
f54584c126 Don't disconnect a DB_Error, instead log for better understanding. 2013-10-22 18:56:56 +02:00
Mikael Nordfeldth
c423e84776 No need to know what DBQueueManager got if not debugging 2013-10-22 17:43:17 +02:00
Mikael Nordfeldth
aa36fecd0a Geonames now not a default plugin
In the name of privacy, let's not by default call a bunch of third
party services with our (users') geographical position.
2013-10-22 17:32:06 +02:00
Mikael Nordfeldth
e274f69634 Notice->getParent function fixes
NoResultException was the wrong choice in this case, because it was
not a DB_DataObject instance that performed the search, but a static
call to the Notice class.
2013-10-22 15:37:19 +02:00
Mikael Nordfeldth
b46c1746f2 Daisychaining bug with exceptions in PHP 2013-10-22 15:36:02 +02:00
Mikael Nordfeldth
a6c52c5ca7 Prepare the RepeatAction for modernisation (more OOP) 2013-10-21 23:27:09 +02:00
Mikael Nordfeldth
38da5ec7f7 Ostatus_profile->processShare now backwards compatible against federating StatusNet nodes
StatusNet was improperly defining the id (URI) of the shared object as a
TagURI, while it should've really been the object's URI of course.
2013-10-21 23:25:47 +02:00
Mikael Nordfeldth
ba46c3d360 SHARE activities would not be imported from federated instances for local notices
"[...] posts _local_ users (like you) make won't get data about "repeated by"
from federated users"

This was because the ActivityObject would processShare where the shared object
has a _local_ 'actor' URI. Ostatus_profile would complain this meant that a
"Local user cannot be referenced as remote.".

So we see if the shared activity object's id (URI) is in our Notice table, so
we don't have to processActivity - and can skip ensureActivityObjectProfile.
2013-10-21 23:25:43 +02:00
Mikael Nordfeldth
355c37bc3f Revert "Better ID for notice activity"
This reverts commit 8cc4660bd9.

This seems like something Evan only did to make pump.io import notices easier,
or maybe he just wanted to get rid of the identi.ca URLs?
2013-10-21 23:25:35 +02:00
Mikael Nordfeldth
f4c0cff032 Only use ActivityVerb::SHARE (forwardId is deprecated)
StatusNet >= 1.0 support it.
2013-10-21 22:25:19 +02:00
Mikael Nordfeldth
8004849305 Removing rel='ostatus:attention' in favor of Salmon's rel='mentioned'
This was introduced in StatusNet 0.9.x, which is the oldest branch
on the web today as far as I know.
2013-10-21 18:42:15 +02:00
Mikael Nordfeldth
2e3ef4cc07 Use pre-defined const instead of strings 2013-10-21 18:28:04 +02:00
Mikael Nordfeldth
3cab5b36c1 Replace common_good_random with common_random_hexstr 2013-10-21 13:20:30 +02:00
Mikael Nordfeldth
7233869298 Generate better salt for crypt() 2013-10-21 13:16:03 +02:00
Mikael Nordfeldth
db5df642ba common_good_rand was _not_ a "good rand", only hex
0-F isn't random enough to be called rand, so we rename the function
to avoid confusion with something that is actually good at random.
2013-10-21 13:09:40 +02:00
Mikael Nordfeldth
df5aa6f93a Exception wasn't thrown. How does PHP handle daisychained calls, really? 2013-10-21 09:09:32 +02:00
Florian Schmaus
c70a519555 plugins/Xmpp/README fixed typos 2013-10-20 21:05:09 +02:00
Florian Schmaus
b7d45e176b Improved plugins/Xmpp/README
Added the relevant section in INSTALL about queues and daemons to get
the plugin runnig.

Made resource required, as otherwise XMPPHP will send invalid from JIDs
in it's stanzas. For example when my configuration didn't had the
resource part, outbound stanzas looked like this:

<message
	from="gnusocial@example.de/"
	to="flow@example.de"
	type='chat'>
	<body>
	User &quot;flow&quot; on GNU Social has said that your
	XMPP/Jabber/GTalk screenname belongs to them.
	…
	</body>
</message>

Note the '/' at the end of the from attribute, without an actual
XMPP resource. But according to RFC6122 2.1 "every allowable portion of
a JID MUST NOT be zero bytes in length". Causing a jid-malformed
response from the server.

Also, it's nice to know that debug=true will print out all sent and
received stanzas, which helped me to debug the problem.

Furthermore I add a note that if the XMPP services uses DNS SRV records,
'host' has to be configured (in cases where service host != xmpp domain).
2013-10-20 21:05:04 +02:00
Mikael Nordfeldth
53b8412aae printv doesn't exist. Use echo to always print on errors. 2013-10-20 21:02:47 +02:00
Mikael Nordfeldth
a8804010c4 Profile creation always failed because we didn't COMMIT 2013-10-20 17:22:44 +02:00
Mikael Nordfeldth
2729c622ff Minor function definitions so they match Action parent 2013-10-20 17:21:56 +02:00
Mikael Nordfeldth
9811783f19 Strict type check against false in User_group 2013-10-20 17:15:46 +02:00
Mikael Nordfeldth
e868ebfe77 WebFingerResource introduced, instead of strict Profile object
This is the beginning of getting notice URI info via WebFinger

*XrdActionLinks is renamed *WebFingerProfileLinks, check EVENTS.txt
in WebFinger plugin for new events.
2013-10-20 15:48:14 +02:00
Mikael Nordfeldth
d632df320a Apparently only one atom:content is allowed 2013-10-20 13:15:37 +02:00
Mikael Nordfeldth
802734d07e Switch order of html/text for StatusNet backwards compatibility
StatusNet chooses the first content element in an Atom feed, while
it should really choose the 'html' representation for its 'rendered'
and 'text' representation for the (text-only) 'content'.

GNU social will implement a better algorithm for retrieving Atom
feeds, but that is yet to be done. So to avoid having link-less posts
on remote nodes, we'll just do the old switch-a-roo.

Other Atom readers, such as Mozilla Firefox, has the reverse priority
(choosing the last of the content elements).
2013-10-20 12:50:27 +02:00
Mikael Nordfeldth
0398741956 Core plugin list would not merge into $config 2013-10-19 15:25:59 +02:00
Mikael Nordfeldth
565e32aca3 Always generate local HTTPS links if ssl is 'always'
The isHTTPS call won't work in cli mode, so install_cli.php should
solve it some other way for initial profile url and User uri.
2013-10-19 14:59:02 +02:00
Mikael Nordfeldth
2a5ba1f74b Core and Default plugins separated, now loads on install
_flow_ reported on IRC that install.php had stopped working. This was
because default plugins had been put into two separate lists, and the
list with AuthCrypt was never loaded when performing an installation.

Core plugins cannot be disabled.

I also removed the Memcache autodetection thing since it should be
solved in a more elegant manner.
2013-10-19 14:38:15 +02:00
Mikael Nordfeldth
2f70866367 Installer redirects to HTTPS if ssl is set to 'always' 2013-10-18 18:17:37 +02:00
Mikael Nordfeldth
8b08a1e78f READ THIS UPGRADE SCRIPT. ON EVERY PULL. 2013-10-17 17:17:39 +02:00
Mikael Nordfeldth
145fbf1130 Move nick updating of User entry to Profile->update()
Also, timezone and language in User table weren't indexes. So no need
to do them separately.
2013-10-17 16:38:42 +02:00
Mikael Nordfeldth
e2c50d202f AuthCrypt now tidied up and enabled by default. 2013-10-17 16:36:15 +02:00