parent
8f2049bcd2
commit
8caf288ac1
52 changed files with 66 additions and 1585 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue