Skip to content
Snippets Groups Projects
Commit 4955df39 authored by syuilo's avatar syuilo
Browse files

oops

parent 6785f50a
No related branches found
No related tags found
No related merge requests found
......@@ -6,6 +6,11 @@ import { createPerson } from './activitypub/models/person';
export default async (username, _host, option?): Promise<IUser> => {
const usernameLower = username.toLowerCase();
if (_host == null) {
return await User.findOne({ usernameLower });
}
const hostAscii = toASCII(_host).toLowerCase();
const host = toUnicode(hostAscii);
......
......@@ -30,7 +30,7 @@ class NotificationManager {
private list: Array<{
user: ILocalUser['_id'],
reason: Reason;
}>;
}> = [];
constructor(user, note) {
this.user = user;
......@@ -300,10 +300,10 @@ export default async (user: IUser, data: {
});
// Append mentions data
if (mentions.length > 0) {
if (mentionedUsers.length > 0) {
Note.update({ _id: note._id }, {
$set: {
mentions
mentions: mentionedUsers.map(u => u._id)
}
});
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment