fix: deliver queue

This commit is contained in:
cutestnekoaqua 2023-01-15 02:24:56 +01:00
parent e6085b2385
commit 6b700b152c
2 changed files with 10 additions and 11 deletions

View file

@ -252,13 +252,12 @@ export default async (
let mentionedUsers = data.apMentions;
// Parse MFM if needed
if (!((tags && emojis ) && mentionedUsers)) {
if (!(tags && emojis && mentionedUsers)) {
const tokens = data.text ? mfm.parse(data.text)! : [];
const cwTokens = data.cw ? mfm.parse(data.cw)! : [];
const choiceTokens =
data.poll?.choices
? concat(data.poll.choices.map((choice) => mfm.parse(choice)!))
: [];
const choiceTokens = data.poll?.choices
? concat(data.poll.choices.map((choice) => mfm.parse(choice)!))
: [];
const combinedTokens = tokens.concat(cwTokens).concat(choiceTokens);
@ -534,13 +533,13 @@ export default async (
}
// 投稿がリプライかつ投稿者がローカルユーザーかつリプライ先の投稿の投稿者がリモートユーザーなら配送
if (data.reply?.userHost !== null) {
if (data.reply && data.reply.userHost !== null) {
const u = await Users.findOneBy({ id: data.reply.userId });
if (u && Users.isRemoteUser(u)) dm.addDirectRecipe(u);
}
// 投稿がRenoteかつ投稿者がローカルユーザーかつRenote元の投稿の投稿者がリモートユーザーなら配送
if (data.renote?.userHost !== null) {
if (data.renote && data.renote.userHost !== null) {
const u = await Users.findOneBy({ id: data.renote.userId });
if (u && Users.isRemoteUser(u)) dm.addDirectRecipe(u);
}

View file

@ -33,17 +33,17 @@
<script lang="ts" setup>
import { computed, ComputedRef, isRef, markRaw, onActivated, onDeactivated, Ref, ref, watch } from 'vue';
import * as misskey from 'calckey-js';
import * as calckey from 'calckey-js';
import * as os from '@/os';
import { onScrollTop, isTopVisible, getScrollPosition, getScrollContainer } from '@/scripts/scroll';
import MkButton from '@/components/MkButton.vue';
import { i18n } from '@/i18n';
import { ItemHolder } from 'photoswipe';
export type Paging<E extends keyof misskey.Endpoints = keyof misskey.Endpoints> = {
export type Paging<E extends keyof calckey.Endpoints = keyof calckey.Endpoints> = {
endpoint: E;
limit: number;
params?: misskey.Endpoints[E]['req'] | ComputedRef<misskey.Endpoints[E]['req']>;
params?: calckey.Endpoints[E]['req'] | ComputedRef<calckey.Endpoints[E]['req']>;
/**
* When using non-pageable endpoints, such as the search API
@ -363,7 +363,7 @@ defineExpose({
<style lang="scss" scoped>
.fade-enter-active,
.fade-leave-active {
transition: opacity 0.125s ease;
transition: opacity 0.15s ease;
}
.fade-enter-from,
.fade-leave-to {