Merge branch 'develop' into future-2024-05-31
This commit is contained in:
commit
5dc8c2827c
32 changed files with 415 additions and 222 deletions
|
|
@ -627,6 +627,14 @@ export class NoteCreateService implements OnApplicationShutdown {
|
|||
userHost: user.host,
|
||||
});
|
||||
|
||||
// should really not happen, but better safe than sorry
|
||||
if (data.reply?.id === insert.id) {
|
||||
throw new Error("A note can't reply to itself");
|
||||
}
|
||||
if (data.renote?.id === insert.id) {
|
||||
throw new Error("A note can't renote itself");
|
||||
}
|
||||
|
||||
if (data.uri != null) insert.uri = data.uri;
|
||||
if (data.url != null) insert.url = data.url;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue