mirror of
https://iceshrimp.dev/crimekillz/iceshrimp-161sh.git
synced 2024-11-22 20:23:49 +01:00
refactor: no url instantiation
This commit is contained in:
parent
389427af27
commit
64ddf35ae3
@ -461,16 +461,16 @@ export default async (
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (!dontFederateInitially) {
|
if (!dontFederateInitially) {
|
||||||
if (!note.userHost) {
|
if (Users.isLocalUser(user)) {
|
||||||
// Publish if the post is local
|
// Publish if the post is local
|
||||||
publishNotesStream(note);
|
publishNotesStream(note);
|
||||||
} else {
|
} else {
|
||||||
const relays = await getCachedRelays();
|
const relays = await getCachedRelays();
|
||||||
// Some relays (e.g., aode-relay) deliver posts by boosting them as
|
// Some relays (e.g., aode-relay) deliver posts by boosting them as
|
||||||
// Announce activities. In that case, user is the relay's actor.
|
// Announce activities. In that case, user is the relay's actor.
|
||||||
const boostedByRelay = relays
|
const boostedByRelay =
|
||||||
.map((relay) => new URL(relay.inbox).host)
|
!!user.inbox &&
|
||||||
.includes(note.userHost);
|
relays.map((relay) => relay.inbox).includes(user.inbox);
|
||||||
|
|
||||||
if (boostedByRelay && data.renote && data.renote.userHost) {
|
if (boostedByRelay && data.renote && data.renote.userHost) {
|
||||||
/* A relay boosted a remote post. */
|
/* A relay boosted a remote post. */
|
||||||
|
Loading…
Reference in New Issue
Block a user