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

How is "qvitter-delete-notice" working? #220

Closed annando closed 9 years ago

annando commented 9 years ago

Qvitter seems to have added the possibility to send delete notices via OStatus by sending messages with the verb "qvitter-delete-notice".

I want to implement that in Friendica's OStatus implementation as well. (in both directions) How exactly does Qvitter determine the notice that is expected to be deleted? I only saw that the content contains the message id. Is it fetched from that?

hannesmannerheim commented 9 years ago

if you want to implement it in friendica too, you should talk to the gnusocial developers and make a proper spec. the qvitter-delete-notice is more of a hack.

anyway, you are correct. it works by detecting the verb "qvitter-delete-notice" at the EndHandleFeedEntry event, then extracts the URI from between the double curly brackets, fetches the local entry for the notice, and that the sender of the qvitter-delete-notice is the same profile as the local entry that should be deleted, then deletes it.

you can see the code in QvitterPlugin.php at line 750