mirror of
https://git.joinsharkey.org/Sharkey/Sharkey.git
synced 2024-11-13 07:43:09 +02:00
0868c3517f
Resolve #4104 Resolve #1966 Resolve #1937
20 lines
415 B
TypeScript
20 lines
415 B
TypeScript
import http from './processors/http';
|
|
import { ILocalUser } from '../models/user';
|
|
import Logger from '../misc/logger';
|
|
|
|
export function createHttpJob(data: any) {
|
|
return http({ data }, () => {});
|
|
}
|
|
|
|
export function deliver(user: ILocalUser, content: any, to: any) {
|
|
if (content == null) return;
|
|
|
|
createHttpJob({
|
|
type: 'deliver',
|
|
user,
|
|
content,
|
|
to
|
|
});
|
|
}
|
|
|
|
export const queueLogger = new Logger('queue');
|