Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 8 additions & 4 deletions chat.js
Original file line number Diff line number Diff line change
Expand Up @@ -877,10 +877,14 @@ function wrapMessageEmojis(node, force) {
}

const screenshotPattern = /\[(t?)(\w{16})(?::(\d+))?\]/;
/** Decodes the message constructed by {@linkcode chatInputActionFired}
Currently disabled. */
/** Decodes the message constructed by {@linkcode chatInputActionFired} */
function tryEmbedScreenshot(node, uuid) {
return false;
const isLocal = uuid == playerData?.uuid;
const isFriend = playerFriendsCache?.find(friend => friend.uuid == uuid)?.accepted;
if (!isLocal && !isFriend) {
return false;
}

if (node.childNodes.length) {
for (let childNode of node.childNodes) {
if (childNode.nodeType === Node.TEXT_NODE) {
Expand Down Expand Up @@ -992,4 +996,4 @@ function tryEmbedScreenshot(node, uuid) {
if (Object.prototype.hasOwnProperty.call(fd, 'raf')) delete fd.raf;
}
})();
})();
})();