1
0
Fork 0

disable matterbridge for github bot notifications

This commit is contained in:
Sebastien Bourdeauducq 2019-04-26 21:23:33 +08:00
parent be406bd0c7
commit 96cfa7b55f
2 changed files with 18 additions and 0 deletions

View File

@ -164,6 +164,10 @@ ACTION=="add", SUBSYSTEM=="tty", \
configPath = "/etc/nixos/secret/matterbridge.toml"; 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 = { security.acme.certs = {
"nixbld.m-labs.hk" = { "nixbld.m-labs.hk" = {
webroot = "/var/lib/acme/acme-challenge"; webroot = "/var/lib/acme/acme-challenge";

View File

@ -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