mirror of
https://github.com/aljazceru/ditto.git
synced 2025-12-23 08:14:25 +01:00
Sync the user on verify_credentials
Fixes https://gitlab.com/soapbox-pub/ditto/-/issues/11
This commit is contained in:
@@ -2,7 +2,7 @@ import { type AppController } from '@/app.ts';
|
||||
import { type Filter, findReplyTag, z } from '@/deps.ts';
|
||||
import * as mixer from '@/mixer.ts';
|
||||
import * as pipeline from '@/pipeline.ts';
|
||||
import { getAuthor, getFollows } from '@/queries.ts';
|
||||
import { getAuthor, getFollows, syncUser } from '@/queries.ts';
|
||||
import { booleanParamSchema } from '@/schema.ts';
|
||||
import { jsonMetaContentSchema } from '@/schemas/nostr.ts';
|
||||
import { signEvent } from '@/sign.ts';
|
||||
@@ -25,6 +25,8 @@ const createAccountController: AppController = (c) => {
|
||||
const verifyCredentialsController: AppController = async (c) => {
|
||||
const pubkey = c.get('pubkey')!;
|
||||
|
||||
await syncUser(pubkey);
|
||||
|
||||
const event = await getAuthor(pubkey);
|
||||
if (event) {
|
||||
return c.json(await toAccount(event, { withSource: true }));
|
||||
|
||||
Reference in New Issue
Block a user