This commit is contained in:
parent
7eb4421f74
commit
de4fe9fdba
@ -23,11 +23,11 @@ module.exports = (app, apex, client) => {
|
|||||||
&& msg.activity.type) {
|
&& msg.activity.type) {
|
||||||
const type = msg.activity.type.toLowerCase()
|
const type = msg.activity.type.toLowerCase()
|
||||||
if (type === 'follow' && msg.recipient.type.toLowerCase() === 'person') {
|
if (type === 'follow' && msg.recipient.type.toLowerCase() === 'person') {
|
||||||
const follow = await apex.acceptFollow(msg.recipient, msg.activity),
|
await apex.acceptFollow(msg.recipient, msg.activity)
|
||||||
act = await apex.buildActivity('Accept', apex.utils.usernameToIRI(constant.nick), ['https://www.w3.org/ns/activitystreams#Public'].concat([msg.actor.id]), {
|
const act = await apex.buildActivity('Accept', apex.utils.usernameToIRI(constant.nick), ['https://www.w3.org/ns/activitystreams#Public'].concat([msg.actor.id]), {
|
||||||
actor: msg.recipient,
|
actor: msg.recipient,
|
||||||
object: msg.activity
|
object: msg.activity
|
||||||
})
|
})
|
||||||
await apex.addToOutbox(await apex.store.getObject(apex.utils.usernameToIRI(constant.nick), true), act)
|
await apex.addToOutbox(await apex.store.getObject(apex.utils.usernameToIRI(constant.nick), true), act)
|
||||||
}
|
}
|
||||||
if (type === 'create' && msg.object.type.toLowerCase() === 'note' && msg.actor.preferredUsername && msg.object.content) {
|
if (type === 'create' && msg.object.type.toLowerCase() === 'note' && msg.actor.preferredUsername && msg.object.content) {
|
||||||
|
Loading…
Reference in New Issue
Block a user