mirror of
https://github.com/thelounge/thelounge.git
synced 2024-06-16 12:35:07 +02:00
Merge pull request #2022 from thelounge/xpaw/not-loggable-types
Define which message types should not be logged
This commit is contained in:
commit
ec70bd91a8
|
@ -174,6 +174,10 @@ Chan.prototype.getFilteredClone = function(lastActiveChannel, lastMessage) {
|
|||
};
|
||||
|
||||
function writeUserLog(client, msg) {
|
||||
if (!msg.isLoggable()) {
|
||||
return false;
|
||||
}
|
||||
|
||||
const target = client.find(this.id);
|
||||
|
||||
if (!target) {
|
||||
|
|
|
@ -37,6 +37,12 @@ class Msg {
|
|||
findPreview(link) {
|
||||
return this.previews.find((preview) => preview.link === link);
|
||||
}
|
||||
|
||||
isLoggable() {
|
||||
return this.type !== Msg.Type.MOTD &&
|
||||
this.type !== Msg.Type.BANLIST &&
|
||||
this.type !== Msg.Type.WHOIS;
|
||||
}
|
||||
}
|
||||
|
||||
Msg.Type = {
|
||||
|
|
Loading…
Reference in a new issue