import type { Request , Response } from "express" ; import type { Main } from "../../Main" ; import type { Bridge } from "../../bridging" ; import type { MxEvents } from "../../minecraft" ; import { LogService } from "matrix-bot-sdk" ; param { Request } req param { Response } res export function getEvents ( req , res ) { const main = req [ 'main' ] ; const bridge = req [ 'bridge' ] ; const id = req [ 'id' ] ; const events = main . getNewMxMessages ( bridge ) ; const chat = { events : events } ; res . status ( 200 ) ; res . send ( chat ) ; res . end ( ) ; LogService . info ( 'WebInterface' , `[Request ${ id }]: Finished.` ) ; }