disable matterbridge for github bot notifications
This commit is contained in:
parent
be406bd0c7
commit
96cfa7b55f
|
@ -164,6 +164,10 @@ ACTION=="add", SUBSYSTEM=="tty", \
|
|||
configPath = "/etc/nixos/secret/matterbridge.toml";
|
||||
};
|
||||
|
||||
nixpkgs.config.packageOverrides = super: let self = super.pkgs; in {
|
||||
matterbridge = super.matterbridge.overrideAttrs(oa: { patches = [ ./matterbridge-disable-github.patch ]; });
|
||||
};
|
||||
|
||||
security.acme.certs = {
|
||||
"nixbld.m-labs.hk" = {
|
||||
webroot = "/var/lib/acme/acme-challenge";
|
||||
|
|
|
@ -0,0 +1,14 @@
|
|||
diff -Naur matterbridge-1.11.0.orig/bridge/mattermost/mattermost.go matterbridge-1.11.0/bridge/mattermost/mattermost.go
|
||||
--- matterbridge-1.11.0.orig/bridge/mattermost/mattermost.go 2018-06-19 06:28:16.000000000 +0800
|
||||
+++ matterbridge-1.11.0/bridge/mattermost/mattermost.go 2019-04-26 20:40:11.831475087 +0800
|
||||
@@ -444,6 +444,10 @@
|
||||
return true
|
||||
}
|
||||
|
||||
+ if message.Username == "github" {
|
||||
+ return true
|
||||
+ }
|
||||
+
|
||||
// if the message has reactions don't repost it (for now, until we can correlate reaction with message)
|
||||
if message.Post.HasReactions {
|
||||
return true
|
Loading…
Reference in New Issue