~petersanchez

Los Angeles, CA

https://www.petersanchez.com

LA, CA USA - Managua, Nicaragua

~petersanchez/public-inbox

Last active 1 year, 8 days ago

~petersanchez/blog-discussion

Last active 1 year, 4 months ago
View more

Recent activity

Re: [PATCH links] Fix issue when parsing base url metadata 2 days ago

From Peter Sanchez to ~netlandish/links-dev

Applied.

To git@git.code.netlandish.com:~netlandish/links
   4c28f35..23918f3  master -> master

[PATCH links] Fix issue when parsing base url metadata 2 days ago

From Peter Sanchez to ~netlandish/links-dev

---
 models/base_url.go | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/models/base_url.go b/models/base_url.go
index 5b1b484..5585804 100644
--- a/models/base_url.go
+++ b/models/base_url.go
@@ -161,14 +161,14 @@ func (b *BaseURL) Store(ctx context.Context) error {
				   ON     CONFLICT (url) DO UPDATE
				   SET    url = NULL
				   WHERE  FALSE
				   RETURNING id, url, public_ready, created_on
				   RETURNING id, url, public_ready, visibility, created_on
[message trimmed]

[PATCH links] Adding a new `visibility` flag for organizations and specific base urls. This is to hide the obvious spam or SEO farms from the recent or popular pages. 4 days ago

From Peter Sanchez to ~netlandish/links-dev

Changelog-added: Ability to hide spammers or seo farms from the recent
  or popular pages.
Changelog-updated: API version (minor bump) to account for new
  visibility variable and update to (admin only) organization update
  mutation.
---
 admin/input.go                                |    4 +-
 admin/routes.go                               |   35 +-
 api/graph/generated.go                        |  404 ++-
 api/graph/model/models_gen.go                 |   47 +
 api/graph/schema.graphqls                     |   14 +-
 api/graph/schema.resolvers.go                 |   74 +-
 api/loaders/loaders.go                        |    3 +
 client.go                                     |    2 +-
[message trimmed]

Re: [PATCH links] Only show save count when it's been saved more than once. 5 days ago

From Peter Sanchez to ~netlandish/links-dev

Applied.

To git@git.code.netlandish.com:~netlandish/links
   3aff1c0..e0fbbee  master -> master

[PATCH links] Only show save count when it's been saved more than once. 5 days ago

From Peter Sanchez to ~netlandish/links-dev

Changelog-changed: Only show save count when the URL has been publicly
  saved more than once.
---
 models/utils.go | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)

diff --git a/models/utils.go b/models/utils.go
index f8d787e..d4a6dfc 100644
--- a/models/utils.go
+++ b/models/utils.go
@@ -88,12 +88,14 @@ func TagsToString(t []Tag) string {
// ShowLinkCounter says whether or not to show a link counter
func ShowLinkCounter(obj any) bool {
	switch v := any(obj).(type) {
[message trimmed]

Re: [PATCH links] Strip leading pound (hash) symbols in tag names. 5 days ago

From Peter Sanchez to ~netlandish/links-dev

Applied.

To git@git.code.netlandish.com:~netlandish/links
   9ed99a4..3aff1c0  master -> master

[PATCH links] Strip leading pound (hash) symbols in tag names. 5 days ago

From Peter Sanchez to ~netlandish/links-dev

Changelog-changed: No more leading hash marks in tag names
---
 helpers.go | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/helpers.go b/helpers.go
index 7d30e3f..53dd36f 100644
--- a/helpers.go
+++ b/helpers.go
@@ -745,6 +745,10 @@ func ProcessTags(ctx context.Context, tags []string) ([]int, error) {
	tagIDs := make([]int, 0)
	for _, tag := range tags {
		tag := strings.TrimSpace(tag)
		if strings.HasPrefix(tag, "#") {
[message trimmed]

Re: [PATCH links] Fixing bug where tag issues would fail due to stupid use of regexp. Instead we now parse the valid JSON and strip out null entries. 8 days ago

From Peter Sanchez to ~netlandish/links-dev

Applied.

To git@git.code.netlandish.com:~netlandish/links
   dbf83fe..9ed99a4  master -> master

[PATCH links] Fixing bug where tag issues would fail due to stupid use of regexp. Instead we now parse the valid JSON and strip out null entries. 8 days ago

From Peter Sanchez to ~netlandish/links-dev

I don't really remember what lead us to use the regexp pattern to strip
out null entries initially but it was a dumb decision.

Changelog-fixed: No longer using regexp to parse null entries from json
  (no clue wtf we were thinking there)
---
 models/base_url.go   | 13 +++++--------
 models/link_short.go | 24 +++++++++---------------
 models/listing.go    | 34 ++++++++++++----------------------
 models/org_link.go   | 24 ++++++++----------------
 models/utils.go      | 23 +++++++++++++++++++++++
 5 files changed, 57 insertions(+), 61 deletions(-)

diff --git a/models/base_url.go b/models/base_url.go
[message trimmed]