From 344c97b34170a5bb9bcf381a80e0d905ef628271 Mon Sep 17 00:00:00 2001 From: Skitter Bot Date: Sun, 1 Mar 2026 05:10:48 -0600 Subject: [PATCH 1/3] Fix #3716: Guard Discord member nick access and fall back to author name Signed-off-by: Skitter Bot --- evennia/server/portal/discord.py | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/evennia/server/portal/discord.py b/evennia/server/portal/discord.py index 0e03ac6481..12f0cbb076 100644 --- a/evennia/server/portal/discord.py +++ b/evennia/server/portal/discord.py @@ -534,10 +534,17 @@ class DiscordClient(WebSocketClientProtocol, _BASE_SESSION_CLASS): if "guild_id" in data: # message received to a Discord channel keywords["type"] = "channel" - author = data["member"]["nick"] or data["author"]["username"] - author_id = data["author"]["id"] + member = data.get("member", {}) or {} + author_info = data.get("author", {}) or {} + # Prefer guild nickname; fall back to global_name, then username + author = ( + member.get("nick") + or author_info.get("global_name") + or author_info.get("username") + ) + author_id = author_info.get("id") or data["author"]["id"] keywords["sender"] = (author_id, author) - keywords["guild_id"] = data["guild_id"] + keywords["guild_id"] = data.get("guild_id") else: # message sent directly to the bot account via DM From b27d748fe4e57eba61c141be2b1ad7149322c550 Mon Sep 17 00:00:00 2001 From: Skitter Bot Date: Sun, 1 Mar 2026 05:11:34 -0600 Subject: [PATCH 2/3] Fix #3314: Honor replace updateMethod for multimedia in GL panes Signed-off-by: Skitter Bot --- .../static/webclient/js/plugins/multimedia.js | 28 +++++++++++++++---- 1 file changed, 23 insertions(+), 5 deletions(-) diff --git a/evennia/web/static/webclient/js/plugins/multimedia.js b/evennia/web/static/webclient/js/plugins/multimedia.js index f8f6ab10d3..d0c9c6e796 100644 --- a/evennia/web/static/webclient/js/plugins/multimedia.js +++ b/evennia/web/static/webclient/js/plugins/multimedia.js @@ -27,7 +27,13 @@ let multimedia_plugin = (function () { var mwins = window.plugins["goldenlayout"].routeMessage(args, kwargs); mwins.forEach( function (mwin) { - mwin.append(""); + var html = ""; + var method = mwin.attr("updateMethod"); + if (method === "replace") { + mwin.html(html); + } else { + mwin.append(html); + } mwin.scrollTop(mwin[0].scrollHeight); }); } @@ -40,9 +46,15 @@ let multimedia_plugin = (function () { // create an HTML5 audio control (only .mp3 is fully compatible with all major browsers) var mwins = window.plugins["goldenlayout"].routeMessage(args, kwargs); mwins.forEach( function (mwin) { - mwin.append(""; + var method = mwin.attr("updateMethod"); + if (method === "replace") { + mwin.html(html); + } else { + mwin.append(html); + } mwin.scrollTop(mwin[0].scrollHeight); }); } @@ -55,9 +67,15 @@ let multimedia_plugin = (function () { // create an HTML5 video element (only h264 .mp4 is compatible with all major browsers) var mwins = window.plugins["goldenlayout"].routeMessage(args, kwargs); mwins.forEach( function (mwin) { - mwin.append(""; + var method = mwin.attr("updateMethod"); + if (method === "replace") { + mwin.html(html); + } else { + mwin.append(html); + } mwin.scrollTop(mwin[0].scrollHeight); }); } From 7a5d585d7bf3ff4c0485127c600a174be2e1b330 Mon Sep 17 00:00:00 2001 From: Skitter Bot Date: Sun, 1 Mar 2026 05:12:18 -0600 Subject: [PATCH 3/3] Fix #3136: Preserve spacing in append/replace by wrapping in out div Signed-off-by: Skitter Bot --- evennia/web/static/webclient/js/plugins/goldenlayout.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/evennia/web/static/webclient/js/plugins/goldenlayout.js b/evennia/web/static/webclient/js/plugins/goldenlayout.js index aca6f8b836..66e37785dd 100644 --- a/evennia/web/static/webclient/js/plugins/goldenlayout.js +++ b/evennia/web/static/webclient/js/plugins/goldenlayout.js @@ -669,12 +669,12 @@ let goldenlayout = (function () { let atBottom = false; let updateMethod = textDiv.attr("updateMethod"); + var cls = (kwargs === undefined) || (kwargs['cls'] === undefined) ? 'out' : kwargs['cls']; if ( updateMethod === "replace" ) { - textDiv.html(message); + textDiv.html("
" + message + "
"); } else if ( updateMethod === "append" ) { - textDiv.append(message); + textDiv.append("
" + message + "
"); } else { // line feed - var cls = (kwargs === undefined) || (kwargs['cls'] === undefined) ? 'out' : kwargs['cls']; textDiv.append("
" + message + "
"); }