Always show multi-server header when using multiple servers
Previously, if the user was on only one server, the server name would not be shown in the thread header.master
parent
777ea2dd2c
commit
685ccdd226
|
@ -115,8 +115,9 @@ async function createNewThreadForUser(user, quiet = false) {
|
|||
|
||||
// Guild info
|
||||
const guildInfoHeaderItems = new Map();
|
||||
const mainGuilds = utils.getMainGuilds();
|
||||
|
||||
utils.getMainGuilds().forEach(guild => {
|
||||
mainGuilds.forEach(guild => {
|
||||
const member = guild.members.get(user.id);
|
||||
if (! member) return;
|
||||
|
||||
|
@ -128,7 +129,7 @@ async function createNewThreadForUser(user, quiet = false) {
|
|||
});
|
||||
|
||||
guildInfoHeaderItems.forEach((items, guildName) => {
|
||||
if (guildInfoHeaderItems.size === 1) {
|
||||
if (mainGuilds.length === 1) {
|
||||
infoHeader += `\n${items.join(', ')}`;
|
||||
} else {
|
||||
infoHeader += `\n**[${guildName}]** ${items.join(', ')}`;
|
||||
|
|
Loading…
Reference in New Issue