Greg Ross

Results 193 comments of Greg Ross

@akirk I've converted to terms for this PR, however I've left the favourite count as a post_meta, as there seems to be no easy way to count terms over multiple...

Just for reference, here's the SQL required to do the count: ``` $raw_sql = "SELECT count(*) FROM {$wpdb->term_taxonomy} INNER JOIN {$wpdb->term_relationships} ON {$wpdb->term_taxonomy}.term_taxonomy_id = {$wpdb->term_relationships}.term_taxonomy_id WHERE {$wpdb->term_taxonomy}.taxonomy LIKE %s AND...

As tags and categories are taxonomies already, we can't use a taxonomy to track them, so instead use a user meta value.

Converted to terms.

> To be honest, it's been a while since I touched this part of the code but when the user has a token they should be logged in, no? I...

Ok, I double checked it and no, during a token auth session the wp user is not set: https://github.com/akirk/enable-mastodon-apps/blob/fafa41334772e7c5d45fd03f0467c46856f7c829/includes/class-mastodon-api.php#L777-L787 I think it should be though, so I'll change the PR...

In fact, looking a little deeper, `have_token_permission()` is _**only**_ used for search, not anywhere else and adding the login code makes it identical to `logged_in_permission()`, so I think we should...

> Thank you! I'd be cautious about looping over the categories and terms (what if there are many). As this is only done when submitting a post, the overhead hit...

Yes > Interesting, so in your opinion there should be support for specifying a category or tag like this `#category with space in it` vs. the slug notation like `#category-with-space-in-it`?...

> Yes, most users don't know what a slug is, so letting them simply type in "#category name I always see" makes more sense here I think. In fact I...