Browse Source

add client tag

imwald
Silberengel 4 days ago
parent
commit
f9ba05374f
  1. 1
      Dockerfile
  2. 6
      assets/controllers/comment_reply_controller.js

1
Dockerfile

@ -93,6 +93,7 @@ COPY --link frankenphp/worker.Caddyfile /etc/caddy/worker.Caddyfile
# prevent the reinstallation of vendors at every changes in the source code # prevent the reinstallation of vendors at every changes in the source code
COPY --link composer.* symfony.* ./ COPY --link composer.* symfony.* ./
COPY --link patches ./patches
RUN set -eux; \ RUN set -eux; \
composer install --no-cache --prefer-dist --no-dev --no-autoloader --no-scripts --no-progress composer install --no-cache --prefer-dist --no-dev --no-autoloader --no-scripts --no-progress

6
assets/controllers/comment_reply_controller.js

@ -67,10 +67,14 @@ export default class extends Controller {
return; return;
} }
this.setHint('Preparing event…'); this.setHint('Preparing event…');
const tags = [...this._tags];
if (!tags.some((t) => Array.isArray(t) && t[0] === 'client')) {
tags.push(['client', 'Decent Newsroom']);
}
const unsigned = { const unsigned = {
kind: 1111, kind: 1111,
created_at: Math.floor(Date.now() / 1000), created_at: Math.floor(Date.now() / 1000),
tags: this._tags, tags,
// Keep user-authored content clean; reply context is encoded in NIP-22 tags. // Keep user-authored content clean; reply context is encoded in NIP-22 tags.
content: text, content: text,
}; };

Loading…
Cancel
Save