Skip to content

Commit

Permalink
rename 'oletusasetukset' to 'asetukset' & remove console.logs
Browse files Browse the repository at this point in the history
  • Loading branch information
VoxBorealis committed Jul 19, 2023
1 parent 98c3d48 commit c65b5a5
Show file tree
Hide file tree
Showing 5 changed files with 4 additions and 11 deletions.
1 change: 0 additions & 1 deletion app/src/helperFunctions.js
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,6 @@ async function editMessage(app, channelId, timestamp, message) {
ts: timestamp,
text: message,
});
console.log(`edited message ${timestamp} in channel ${channelId} successfully`);
return result;
} catch (err) {
console.log("error while editing message ", err);
Expand Down
1 change: 0 additions & 1 deletion app/src/lateRegistration.js
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,6 @@ const updateScheduledMessages = async (app, date) => {
if (date !== DateTime.now().toISODate()) {
return;
}
console.log("begin checking if scheduled messages need updating");
const jobs = await service.getAllJobs();
// Check every job/channel for scheduled messages for _today_
for (const job of jobs) {
Expand Down
5 changes: 1 addition & 4 deletions app/src/ui/customBlocks.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,10 +40,7 @@ const formatOffice = (office, upperCase) => {
const getUpdateBlock = async (selectedOffice, isAdmin) => {
const updateBlock = [];
const overflowOptions = ["Toimistojen hallinta", "Lisää toimisto"];
const actionElements = [
button("Oletusasetukset", "settings_click", "updated"),
button("Päivitä", "update_click", "updated"),
];
const actionElements = [button("Asetukset", "settings_click"), button("Päivitä", "update_click")];
if (isAdmin) {
actionElements.push(overflow(overflowOptions));
}
Expand Down
2 changes: 1 addition & 1 deletion app/src/ui/modals.js
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ const defaultSettingsModalView = {
type: "modal",
title: {
type: "plain_text",
text: "Oletusasetukset",
text: "Asetukset",
},
close: {
type: "plain_text",
Expand Down
6 changes: 2 additions & 4 deletions app/src/userCache.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ const generatePlaintextString = (userId) => {
const u = usercache[userId];
if (!u) {
// fall back to a mention string if user is not found
return `<@${userId}>`;
return `<${userId}>`;
}
return `${u.user.profile.real_name || u.user.profile.display_name}`;
};
Expand All @@ -59,7 +59,6 @@ module.exports = {
return null;
}
if (usercache[userId] && usercache[userId].date + OBJECT_AGE > Date.now()) {
console.log(`cache hit for user ${userId}`);
return usercache[userId].user;
}
try {
Expand All @@ -70,7 +69,6 @@ module.exports = {
return null;
}
// success
console.log(`caching user ${userId}`);
usercache[userId] = {
user: user.user,
date: Date.now(),
Expand All @@ -91,7 +89,7 @@ module.exports = {
date: date,
};
}
console.log("initialized user cache with every channel member");
console.log("Initialized user cache with every workspace member");
};

initUserCache();
Expand Down

0 comments on commit c65b5a5

Please sign in to comment.