iceshrimp/packages/backend/src/server/api/stream/channels/messaging-index.ts
syuilo 94228778c9 refactor: Use ESM (#8358)
* wip

* wip

* fix

* clean up

* Update tsconfig.json

* Update activitypub.ts

* wip
2022-02-27 11:07:39 +09:00

15 lines
373 B
TypeScript

import Channel from '../channel.js';
export default class extends Channel {
public readonly chName = 'messagingIndex';
public static shouldShare = true;
public static requireCredential = true;
public async init(params: any) {
// Subscribe messaging index stream
this.subscriber.on(`messagingIndexStream:${this.user!.id}`, data => {
this.send(data);
});
}
}