You've already forked matrix-js-sdk
mirror of
https://github.com/matrix-org/matrix-js-sdk.git
synced 2025-08-06 12:02:40 +03:00
Lint pass 1
This commit is contained in:
@@ -15,7 +15,7 @@ limitations under the License.
|
||||
*/
|
||||
|
||||
import { MatrixClient } from "./client";
|
||||
import {MatrixEvent} from "./models/event";
|
||||
import { MatrixEvent } from "./models/event";
|
||||
|
||||
export type EventMapper = (obj: any) => MatrixEvent;
|
||||
|
||||
@@ -27,6 +27,7 @@ export interface MapperOpts {
|
||||
export function eventMapperFor(client: MatrixClient, options: MapperOpts): EventMapper {
|
||||
const preventReEmit = Boolean(options.preventReEmit);
|
||||
const decrypt = options.decrypt !== false;
|
||||
|
||||
function mapper(plainOldJsObject) {
|
||||
const event = new MatrixEvent(plainOldJsObject);
|
||||
if (event.isEncrypted()) {
|
||||
@@ -44,5 +45,6 @@ export function eventMapperFor(client: MatrixClient, options: MapperOpts): Event
|
||||
}
|
||||
return event;
|
||||
}
|
||||
|
||||
return mapper;
|
||||
}
|
||||
|
Reference in New Issue
Block a user