You've already forked matrix-js-sdk
mirror of
https://github.com/matrix-org/matrix-js-sdk.git
synced 2025-08-19 16:42:09 +03:00
Add utils.inherits. Make User inherit EventEmitter.
utils.inherits is the Node.js impl but with the addition of a polyfill for Object.create().
This commit is contained in:
@@ -2,6 +2,8 @@
|
||||
/**
|
||||
* @module models/user
|
||||
*/
|
||||
var EventEmitter = require("events").EventEmitter;
|
||||
var utils = require("../utils");
|
||||
|
||||
/**
|
||||
* Construct a new User. A User must have an ID and can optionally have extra
|
||||
@@ -22,6 +24,7 @@ function User(userId) {
|
||||
this.avatarUrl = null;
|
||||
this.lastActiveAgo = 0;
|
||||
}
|
||||
utils.inherits(User, EventEmitter);
|
||||
|
||||
/**
|
||||
* Update this User with the given presence event. May fire "User.presence",
|
||||
|
Reference in New Issue
Block a user