drop group (#9942)

* drop group

* Update operations.ts
This commit is contained in:
syuilo 2023-02-15 13:37:18 +09:00 committed by GitHub
parent 8f2049bcd2
commit 8caf288ac1
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
52 changed files with 66 additions and 1585 deletions

View file

@ -32,18 +32,10 @@ export function openAntenna(antennaId: string, loginId: string) {
return openClient('push', `/timeline/antenna/${antennaId}`, loginId, { antennaId });
}
export async function openChat(body: any, loginId: string) {
if (body.groupId === null) {
return openClient('push', `/my/messaging/${getAcct(body.user)}`, loginId, { body });
} else {
return openClient('push', `/my/messaging/group/${body.groupId}`, loginId, { body });
}
}
// post-formのオプションから投稿フォームを開く
export async function openPost(options: any, loginId: string) {
// クエリを作成しておく
let url = `/share?`;
let url = '/share?';
if (options.initialText) url += `text=${options.initialText}&`;
if (options.reply) url += `replyId=${options.reply.id}&`;
if (options.renote) url += `renoteId=${options.renote.id}&`;
@ -64,7 +56,7 @@ export async function openClient(order: swMessageOrderType, url: string, loginId
export async function findClient() {
const clients = await self.clients.matchAll({
type: 'window'
type: 'window',
});
for (const c of clients) {
if (c.url.indexOf('?zen') < 0) return c;