2018-08-30 03:03:12 +01:00
|
|
|
import { database } from '../_database/database'
|
2018-02-17 03:38:21 +00:00
|
|
|
|
|
|
|
export async function getIdThatThisStatusReblogged (instanceName, statusId) {
|
2018-08-30 03:03:12 +01:00
|
|
|
let status = await database.getStatus(instanceName, statusId)
|
2018-02-17 03:38:21 +00:00
|
|
|
return status.reblog && status.reblog.id
|
|
|
|
}
|
|
|
|
|
|
|
|
export async function getIdsThatTheseStatusesReblogged (instanceName, statusIds) {
|
|
|
|
let reblogIds = await Promise.all(statusIds.map(async statusId => {
|
|
|
|
return getIdThatThisStatusReblogged(instanceName, statusId)
|
|
|
|
}))
|
2018-03-04 21:52:35 +00:00
|
|
|
return reblogIds.filter(Boolean)
|
2018-02-17 03:38:21 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
export async function getIdsThatRebloggedThisStatus (instanceName, statusId) {
|
2018-08-30 03:03:12 +01:00
|
|
|
return database.getReblogsForStatus(instanceName, statusId)
|
2018-02-17 03:38:21 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
export async function getNotificationIdsForStatuses (instanceName, statusIds) {
|
2018-08-30 03:03:12 +01:00
|
|
|
return database.getNotificationIdsForStatuses(instanceName, statusIds)
|
2018-02-17 03:38:21 +00:00
|
|
|
}
|