mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-11-12 17:05:51 +01:00
feat: mentions support
This commit is contained in:
@@ -111,11 +111,8 @@ User.getUidByUserslug = async function (userslug) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
// fix this! Forces a remote call, this is bad. Should be done in actors.assert
|
||||
// then mentions. should return actor uri or url or something to parsePost.
|
||||
if (userslug.includes('@')) {
|
||||
const { actorUri } = await activitypub.helpers.query(userslug);
|
||||
return actorUri;
|
||||
return (await db.getObjectField('handle:uid', userslug)) || 0;
|
||||
}
|
||||
|
||||
return await db.sortedSetScore('userslug:uid', userslug);
|
||||
|
||||
Reference in New Issue
Block a user