summaryrefslogtreecommitdiff
path: root/includes/external/matrix/node_modules/matrix-js-sdk/lib/models/room-member.js.map
diff options
context:
space:
mode:
Diffstat (limited to 'includes/external/matrix/node_modules/matrix-js-sdk/lib/models/room-member.js.map')
-rw-r--r--includes/external/matrix/node_modules/matrix-js-sdk/lib/models/room-member.js.map1
1 files changed, 1 insertions, 0 deletions
diff --git a/includes/external/matrix/node_modules/matrix-js-sdk/lib/models/room-member.js.map b/includes/external/matrix/node_modules/matrix-js-sdk/lib/models/room-member.js.map
new file mode 100644
index 0000000..003ae8a
--- /dev/null
+++ b/includes/external/matrix/node_modules/matrix-js-sdk/lib/models/room-member.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"room-member.js","names":["_contentRepo","require","utils","_interopRequireWildcard","_logger","_typedEventEmitter","_event","_getRequireWildcardCache","nodeInterop","WeakMap","cacheBabelInterop","cacheNodeInterop","obj","__esModule","default","cache","has","get","newObj","hasPropertyDescriptor","Object","defineProperty","getOwnPropertyDescriptor","key","prototype","hasOwnProperty","call","desc","set","RoomMemberEvent","exports","RoomMember","TypedEventEmitter","constructor","roomId","userId","_defineProperty2","name","rawDisplayName","updateModifiedTime","markOutOfBand","_isOutOfBand","isOutOfBand","setMembershipEvent","event","roomState","_event$getDirectional","_event$getDirectional2","displayName","getDirectionalContent","displayname","getType","EventType","events","member","oldMembership","membership","undefined","logger","trace","forwardLooking","getContent","getPrevContent","disambiguate","shouldDisambiguate","oldName","calculateDisplayName","removeDirectionOverrideChars","removeHiddenChars","emit","Membership","Name","setPowerLevelEvent","powerLevelEvent","RoomPowerLevels","getStateKey","evContent","maxLevel","users_default","users","values","forEach","lvl","Math","max","oldPowerLevel","powerLevel","oldPowerLevelNorm","powerLevelNorm","Number","isInteger","PowerLevel","setTypingEvent","oldTyping","typing","typingList","user_ids","Array","isArray","indexOf","Typing","modified","Date","now","getLastModifiedTime","isKicked","getSender","getDMInviter","memberEvent","memberContent","inviteSender","getUnsigned","prev_sender","is_direct","getAvatarUrl","baseUrl","width","height","resizeMethod","allowDefault","allowDirectLinks","rawUrl","getMxcAvatarUrl","httpUrl","getHttpUriForMxc","avatar_url","user","avatarUrl","MXID_PATTERN","LTR_RTL_PATTERN","selfUserId","test","userIds","getUserIdsWithDisplayName","some","u"],"sources":["../../src/models/room-member.ts"],"sourcesContent":["/*\nCopyright 2015 - 2021 The Matrix.org Foundation C.I.C.\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n*/\n\nimport { getHttpUriForMxc } from \"../content-repo\";\nimport * as utils from \"../utils\";\nimport { User } from \"./user\";\nimport { MatrixEvent } from \"./event\";\nimport { RoomState } from \"./room-state\";\nimport { logger } from \"../logger\";\nimport { TypedEventEmitter } from \"./typed-event-emitter\";\nimport { EventType } from \"../@types/event\";\n\nexport enum RoomMemberEvent {\n Membership = \"RoomMember.membership\",\n Name = \"RoomMember.name\",\n PowerLevel = \"RoomMember.powerLevel\",\n Typing = \"RoomMember.typing\",\n}\n\nexport type RoomMemberEventHandlerMap = {\n /**\n * Fires whenever any room member's membership state changes.\n * @param event - The matrix event which caused this event to fire.\n * @param member - The member whose RoomMember.membership changed.\n * @param oldMembership - The previous membership state. Null if it's a new member.\n * @example\n * ```\n * matrixClient.on(\"RoomMember.membership\", function(event, member, oldMembership){\n * var newState = member.membership;\n * });\n * ```\n */\n [RoomMemberEvent.Membership]: (event: MatrixEvent, member: RoomMember, oldMembership?: string) => void;\n /**\n * Fires whenever any room member's name changes.\n * @param event - The matrix event which caused this event to fire.\n * @param member - The member whose RoomMember.name changed.\n * @param oldName - The previous name. Null if the member didn't have a name previously.\n * @example\n * ```\n * matrixClient.on(\"RoomMember.name\", function(event, member){\n * var newName = member.name;\n * });\n * ```\n */\n [RoomMemberEvent.Name]: (event: MatrixEvent, member: RoomMember, oldName: string | null) => void;\n /**\n * Fires whenever any room member's power level changes.\n * @param event - The matrix event which caused this event to fire.\n * @param member - The member whose RoomMember.powerLevel changed.\n * @example\n * ```\n * matrixClient.on(\"RoomMember.powerLevel\", function(event, member){\n * var newPowerLevel = member.powerLevel;\n * var newNormPowerLevel = member.powerLevelNorm;\n * });\n * ```\n */\n [RoomMemberEvent.PowerLevel]: (event: MatrixEvent, member: RoomMember) => void;\n /**\n * Fires whenever any room member's typing state changes.\n * @param event - The matrix event which caused this event to fire.\n * @param member - The member whose RoomMember.typing changed.\n * @example\n * ```\n * matrixClient.on(\"RoomMember.typing\", function(event, member){\n * var isTyping = member.typing;\n * });\n * ```\n */\n [RoomMemberEvent.Typing]: (event: MatrixEvent, member: RoomMember) => void;\n};\n\nexport class RoomMember extends TypedEventEmitter<RoomMemberEvent, RoomMemberEventHandlerMap> {\n private _isOutOfBand = false;\n private modified = -1;\n public requestedProfileInfo = false; // used by sync.ts\n\n // XXX these should be read-only\n /**\n * True if the room member is currently typing.\n */\n public typing = false;\n /**\n * The human-readable name for this room member. This will be\n * disambiguated with a suffix of \" (\\@user_id:matrix.org)\" if another member shares the\n * same displayname.\n */\n public name: string;\n /**\n * The ambiguous displayname of this room member.\n */\n public rawDisplayName: string;\n /**\n * The power level for this room member.\n */\n public powerLevel = 0;\n /**\n * The normalised power level (0-100) for this room member.\n */\n public powerLevelNorm = 0;\n /**\n * The User object for this room member, if one exists.\n */\n public user?: User;\n /**\n * The membership state for this room member e.g. 'join'.\n */\n public membership?: string;\n /**\n * True if the member's name is disambiguated.\n */\n public disambiguate = false;\n /**\n * The events describing this RoomMember.\n */\n public events: {\n /**\n * The m.room.member event for this RoomMember.\n */\n member?: MatrixEvent;\n } = {};\n\n /**\n * Construct a new room member.\n *\n * @param roomId - The room ID of the member.\n * @param userId - The user ID of the member.\n */\n public constructor(public readonly roomId: string, public readonly userId: string) {\n super();\n\n this.name = userId;\n this.rawDisplayName = userId;\n this.updateModifiedTime();\n }\n\n /**\n * Mark the member as coming from a channel that is not sync\n */\n public markOutOfBand(): void {\n this._isOutOfBand = true;\n }\n\n /**\n * @returns does the member come from a channel that is not sync?\n * This is used to store the member seperately\n * from the sync state so it available across browser sessions.\n */\n public isOutOfBand(): boolean {\n return this._isOutOfBand;\n }\n\n /**\n * Update this room member's membership event. May fire \"RoomMember.name\" if\n * this event updates this member's name.\n * @param event - The `m.room.member` event\n * @param roomState - Optional. The room state to take into account\n * when calculating (e.g. for disambiguating users with the same name).\n *\n * @remarks\n * Fires {@link RoomMemberEvent.Name}\n * Fires {@link RoomMemberEvent.Membership}\n */\n public setMembershipEvent(event: MatrixEvent, roomState?: RoomState): void {\n const displayName = event.getDirectionalContent().displayname ?? \"\";\n\n if (event.getType() !== EventType.RoomMember) {\n return;\n }\n\n this._isOutOfBand = false;\n\n this.events.member = event;\n\n const oldMembership = this.membership;\n this.membership = event.getDirectionalContent().membership;\n if (this.membership === undefined) {\n // logging to diagnose https://github.com/vector-im/element-web/issues/20962\n // (logs event content, although only of membership events)\n logger.trace(\n `membership event with membership undefined (forwardLooking: ${event.forwardLooking})!`,\n event.getContent(),\n `prevcontent is `,\n event.getPrevContent(),\n );\n }\n\n this.disambiguate = shouldDisambiguate(this.userId, displayName, roomState);\n\n const oldName = this.name;\n this.name = calculateDisplayName(this.userId, displayName, this.disambiguate);\n\n // not quite raw: we strip direction override chars so it can safely be inserted into\n // blocks of text without breaking the text direction\n this.rawDisplayName = utils.removeDirectionOverrideChars(event.getDirectionalContent().displayname ?? \"\");\n if (!this.rawDisplayName || !utils.removeHiddenChars(this.rawDisplayName)) {\n this.rawDisplayName = this.userId;\n }\n\n if (oldMembership !== this.membership) {\n this.updateModifiedTime();\n this.emit(RoomMemberEvent.Membership, event, this, oldMembership);\n }\n if (oldName !== this.name) {\n this.updateModifiedTime();\n this.emit(RoomMemberEvent.Name, event, this, oldName);\n }\n }\n\n /**\n * Update this room member's power level event. May fire\n * \"RoomMember.powerLevel\" if this event updates this member's power levels.\n * @param powerLevelEvent - The `m.room.power_levels` event\n *\n * @remarks\n * Fires {@link RoomMemberEvent.PowerLevel}\n */\n public setPowerLevelEvent(powerLevelEvent: MatrixEvent): void {\n if (powerLevelEvent.getType() !== EventType.RoomPowerLevels || powerLevelEvent.getStateKey() !== \"\") {\n return;\n }\n\n const evContent = powerLevelEvent.getDirectionalContent();\n\n let maxLevel = evContent.users_default || 0;\n const users: { [userId: string]: number } = evContent.users || {};\n Object.values(users).forEach((lvl: number) => {\n maxLevel = Math.max(maxLevel, lvl);\n });\n const oldPowerLevel = this.powerLevel;\n const oldPowerLevelNorm = this.powerLevelNorm;\n\n if (users[this.userId] !== undefined && Number.isInteger(users[this.userId])) {\n this.powerLevel = users[this.userId];\n } else if (evContent.users_default !== undefined) {\n this.powerLevel = evContent.users_default;\n } else {\n this.powerLevel = 0;\n }\n this.powerLevelNorm = 0;\n if (maxLevel > 0) {\n this.powerLevelNorm = (this.powerLevel * 100) / maxLevel;\n }\n\n // emit for changes in powerLevelNorm as well (since the app will need to\n // redraw everyone's level if the max has changed)\n if (oldPowerLevel !== this.powerLevel || oldPowerLevelNorm !== this.powerLevelNorm) {\n this.updateModifiedTime();\n this.emit(RoomMemberEvent.PowerLevel, powerLevelEvent, this);\n }\n }\n\n /**\n * Update this room member's typing event. May fire \"RoomMember.typing\" if\n * this event changes this member's typing state.\n * @param event - The typing event\n *\n * @remarks\n * Fires {@link RoomMemberEvent.Typing}\n */\n public setTypingEvent(event: MatrixEvent): void {\n if (event.getType() !== \"m.typing\") {\n return;\n }\n const oldTyping = this.typing;\n this.typing = false;\n const typingList = event.getContent().user_ids;\n if (!Array.isArray(typingList)) {\n // malformed event :/ bail early. TODO: whine?\n return;\n }\n if (typingList.indexOf(this.userId) !== -1) {\n this.typing = true;\n }\n if (oldTyping !== this.typing) {\n this.updateModifiedTime();\n this.emit(RoomMemberEvent.Typing, event, this);\n }\n }\n\n /**\n * Update the last modified time to the current time.\n */\n private updateModifiedTime(): void {\n this.modified = Date.now();\n }\n\n /**\n * Get the timestamp when this RoomMember was last updated. This timestamp is\n * updated when properties on this RoomMember are updated.\n * It is updated <i>before</i> firing events.\n * @returns The timestamp\n */\n public getLastModifiedTime(): number {\n return this.modified;\n }\n\n public isKicked(): boolean {\n return (\n this.membership === \"leave\" &&\n this.events.member !== undefined &&\n this.events.member.getSender() !== this.events.member.getStateKey()\n );\n }\n\n /**\n * If this member was invited with the is_direct flag set, return\n * the user that invited this member\n * @returns user id of the inviter\n */\n public getDMInviter(): string | undefined {\n // when not available because that room state hasn't been loaded in,\n // we don't really know, but more likely to not be a direct chat\n if (this.events.member) {\n // TODO: persist the is_direct flag on the member as more member events\n // come in caused by displayName changes.\n\n // the is_direct flag is set on the invite member event.\n // This is copied on the prev_content section of the join member event\n // when the invite is accepted.\n\n const memberEvent = this.events.member;\n let memberContent = memberEvent.getContent();\n let inviteSender: string | undefined = memberEvent.getSender();\n\n if (memberContent.membership === \"join\") {\n memberContent = memberEvent.getPrevContent();\n inviteSender = memberEvent.getUnsigned().prev_sender;\n }\n\n if (memberContent.membership === \"invite\" && memberContent.is_direct) {\n return inviteSender;\n }\n }\n }\n\n /**\n * Get the avatar URL for a room member.\n * @param baseUrl - The base homeserver URL See\n * {@link MatrixClient#getHomeserverUrl}.\n * @param width - The desired width of the thumbnail.\n * @param height - The desired height of the thumbnail.\n * @param resizeMethod - The thumbnail resize method to use, either\n * \"crop\" or \"scale\".\n * @param allowDefault - (optional) Passing false causes this method to\n * return null if the user has no avatar image. Otherwise, a default image URL\n * will be returned. Default: true. (Deprecated)\n * @param allowDirectLinks - (optional) If true, the avatar URL will be\n * returned even if it is a direct hyperlink rather than a matrix content URL.\n * If false, any non-matrix content URLs will be ignored. Setting this option to\n * true will expose URLs that, if fetched, will leak information about the user\n * to anyone who they share a room with.\n * @returns the avatar URL or null.\n */\n public getAvatarUrl(\n baseUrl: string,\n width: number,\n height: number,\n resizeMethod: string,\n allowDefault = true,\n allowDirectLinks: boolean,\n ): string | null {\n const rawUrl = this.getMxcAvatarUrl();\n\n if (!rawUrl && !allowDefault) {\n return null;\n }\n const httpUrl = getHttpUriForMxc(baseUrl, rawUrl, width, height, resizeMethod, allowDirectLinks);\n if (httpUrl) {\n return httpUrl;\n }\n return null;\n }\n\n /**\n * get the mxc avatar url, either from a state event, or from a lazily loaded member\n * @returns the mxc avatar url\n */\n public getMxcAvatarUrl(): string | undefined {\n if (this.events.member) {\n return this.events.member.getDirectionalContent().avatar_url;\n } else if (this.user) {\n return this.user.avatarUrl;\n }\n }\n}\n\nconst MXID_PATTERN = /@.+:.+/;\nconst LTR_RTL_PATTERN = /[\\u200E\\u200F\\u202A-\\u202F]/;\n\nfunction shouldDisambiguate(selfUserId: string, displayName?: string, roomState?: RoomState): boolean {\n if (!displayName || displayName === selfUserId) return false;\n\n // First check if the displayname is something we consider truthy\n // after stripping it of zero width characters and padding spaces\n if (!utils.removeHiddenChars(displayName)) return false;\n\n if (!roomState) return false;\n\n // Next check if the name contains something that look like a mxid\n // If it does, it may be someone trying to impersonate someone else\n // Show full mxid in this case\n if (MXID_PATTERN.test(displayName)) return true;\n\n // Also show mxid if the display name contains any LTR/RTL characters as these\n // make it very difficult for us to find similar *looking* display names\n // E.g \"Mark\" could be cloned by writing \"kraM\" but in RTL.\n if (LTR_RTL_PATTERN.test(displayName)) return true;\n\n // Also show mxid if there are other people with the same or similar\n // displayname, after hidden character removal.\n const userIds = roomState.getUserIdsWithDisplayName(displayName);\n if (userIds.some((u) => u !== selfUserId)) return true;\n\n return false;\n}\n\nfunction calculateDisplayName(selfUserId: string, displayName: string | undefined, disambiguate: boolean): string {\n if (!displayName || displayName === selfUserId) return selfUserId;\n\n if (disambiguate) return utils.removeDirectionOverrideChars(displayName) + \" (\" + selfUserId + \")\";\n\n // First check if the displayname is something we consider truthy\n // after stripping it of zero width characters and padding spaces\n if (!utils.removeHiddenChars(displayName)) return selfUserId;\n\n // We always strip the direction override characters (LRO and RLO).\n // These override the text direction for all subsequent characters\n // in the paragraph so if display names contained these, they'd\n // need to be wrapped in something to prevent this from leaking out\n // (which we can do in HTML but not text) or we'd need to add\n // control characters to the string to reset any overrides (eg.\n // adding PDF characters at the end). As far as we can see,\n // there should be no reason these would be necessary - rtl display\n // names should flip into the correct direction automatically based on\n // the characters, and you can still embed rtl in ltr or vice versa\n // with the embed chars or marker chars.\n return utils.removeDirectionOverrideChars(displayName);\n}\n"],"mappings":";;;;;;;;AAgBA,IAAAA,YAAA,GAAAC,OAAA;AACA,IAAAC,KAAA,GAAAC,uBAAA,CAAAF,OAAA;AAIA,IAAAG,OAAA,GAAAH,OAAA;AACA,IAAAI,kBAAA,GAAAJ,OAAA;AACA,IAAAK,MAAA,GAAAL,OAAA;AAA4C,SAAAM,yBAAAC,WAAA,eAAAC,OAAA,kCAAAC,iBAAA,OAAAD,OAAA,QAAAE,gBAAA,OAAAF,OAAA,YAAAF,wBAAA,YAAAA,CAAAC,WAAA,WAAAA,WAAA,GAAAG,gBAAA,GAAAD,iBAAA,KAAAF,WAAA;AAAA,SAAAL,wBAAAS,GAAA,EAAAJ,WAAA,SAAAA,WAAA,IAAAI,GAAA,IAAAA,GAAA,CAAAC,UAAA,WAAAD,GAAA,QAAAA,GAAA,oBAAAA,GAAA,wBAAAA,GAAA,4BAAAE,OAAA,EAAAF,GAAA,UAAAG,KAAA,GAAAR,wBAAA,CAAAC,WAAA,OAAAO,KAAA,IAAAA,KAAA,CAAAC,GAAA,CAAAJ,GAAA,YAAAG,KAAA,CAAAE,GAAA,CAAAL,GAAA,SAAAM,MAAA,WAAAC,qBAAA,GAAAC,MAAA,CAAAC,cAAA,IAAAD,MAAA,CAAAE,wBAAA,WAAAC,GAAA,IAAAX,GAAA,QAAAW,GAAA,kBAAAH,MAAA,CAAAI,SAAA,CAAAC,cAAA,CAAAC,IAAA,CAAAd,GAAA,EAAAW,GAAA,SAAAI,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