hannesmannerheim / qvitter

mirror. moved to https://git.gnu.io/h2p/Qvitter, send merge requests and issues there
https://git.gnu.io/h2p/Qvitter
GNU Affero General Public License v3.0
86 stars 26 forks source link

Disable qvitter-delete-notice if ActivityModeration plugin exists #281

Closed ghost closed 9 years ago

ghost commented 9 years ago

I think this won't cause any problems with older installations. If the GNU social instance is newer and has the ActivityModeration plugin, remote notice deletion is handled through that instead of Qvitter.

ghost commented 9 years ago

Hm, this doesn't seem to hide the delete verb notices though, so there are items like these listed: "<Mikael & Nordfeldth> deleted notice {{tag:social.umeahackerspace.se,2015-10-03:noticeId=280252:objectType=note}}."

hannesmannerheim commented 9 years ago

i'll check it out

hannesmannerheim commented 9 years ago

i updated from nightly, ran upgrade.php and added to config:

addPlugin('ActivityVerb'); addPlugin('ActivityModeration');

but i can't delete notices anymore. i click delete, confirm delete and then i get:

skarmavbild 2015-10-04 kl 13 03 33

and if i click yes i get

skarmavbild 2015-10-04 kl 13 03 47

the notice is not deleted, but a delete-activity notice is outputted

ghost commented 9 years ago

On 2015-10-04 13:06, Hannes Mannerheim wrote:

i updated from nightly, ran upgrade.php and added to config:

´ addPlugin('ActivityVerb'); addPlugin('ActivityModeration');

You shouldn't have to add those plugins manually, they are listed in lib/default.php in the $config['plugins']['core'] array.

but i can't delete notices anymore. i click delete, confirm delete and then i get: skarmavbild 2015-10-04 kl 13 03 33

Oh, interesting. Notice_location is in db/core.php so it should be checked and fixed when running upgrade.php

Do you have a notice_location table in that site's database?

Mikael Nordfeldth XMPP/mail: mmn@hethane.se OpenPGP fpr: AE68 9813 0B7C FCE3 B2FA 727B C7CE 635B B52E 9B31

hannesmannerheim commented 9 years ago

oh, ok, i thought it was an opt-in feature?

no, no notice_location table. maybe upgrade.php failed silently

ghost commented 9 years ago

On 2015-10-04 13:40, Hannes Mannerheim wrote:

oh, ok, i thought it was an opt-in feature?

no, no notice_location table. maybe upgrade.php failed silently

I don't think it can fail silently :)

Does scripts/upgrade.php say anything about "moving location data"?

Or maybe an even better question, if you in the mysql/mariadb CLI do:

DESCRIBE notice;

does it list columns like 'lat', 'lon, 'location_id' or 'location_ns'?

In that case, Notice::beforeSchemaUpdate() doesn't get run. Can you make sure that code is in Notice.php and have another look at the output of the upgrade script?

Mikael Nordfeldth XMPP/mail: mmn@hethane.se OpenPGP fpr: AE68 9813 0B7C FCE3 B2FA 727B C7CE 635B B52E 9B31

hannesmannerheim commented 9 years ago

there were errors in the log from upgrade.php, outdated extensions...... trying to fix it. but my consoleophobia is not helping

hannesmannerheim commented 9 years ago

finally got the upgrade script working again! now deleting of notices works :) i'll check why the activity notices are not hidden

hannesmannerheim commented 9 years ago

looks like the activity notice produced is saved with object type http://activitystrea.ms/schema/1.0/note

shoudn't it be http://activitystrea.ms/schema/1.0/activity ?

hannesmannerheim commented 9 years ago

i made qvitter consider the delete-"note":s to be activity notices (that are hidden)