whatsapp: check comply, make native built default
This commit is contained in:
parent
85f305fb78
commit
ad5707408c
|
@ -224,9 +224,11 @@ func parseJID(arg string) (types.JID, bool) {
|
||||||
if arg[0] == '+' {
|
if arg[0] == '+' {
|
||||||
arg = arg[1:]
|
arg = arg[1:]
|
||||||
}
|
}
|
||||||
|
|
||||||
if !strings.ContainsRune(arg, '@') {
|
if !strings.ContainsRune(arg, '@') {
|
||||||
return types.NewJID(arg, types.DefaultUserServer), true
|
return types.NewJID(arg, types.DefaultUserServer), true
|
||||||
} else {
|
}
|
||||||
|
|
||||||
recipient, err := types.ParseJID(arg)
|
recipient, err := types.ParseJID(arg)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log.Errorf("s+ow-whatsapp-bridge: Invalid JID %s: %v", arg, err)
|
log.Errorf("s+ow-whatsapp-bridge: Invalid JID %s: %v", arg, err)
|
||||||
|
@ -236,7 +238,6 @@ func parseJID(arg string) (types.JID, bool) {
|
||||||
return recipient, false
|
return recipient, false
|
||||||
}
|
}
|
||||||
return recipient, true
|
return recipient, true
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func handleCmd(cmd string, args []string) {
|
func handleCmd(cmd string, args []string) {
|
||||||
|
|
|
@ -83,6 +83,7 @@
|
||||||
devShells.default = mkShell {
|
devShells.default = mkShell {
|
||||||
buildInputs = [
|
buildInputs = [
|
||||||
go
|
go
|
||||||
|
golint
|
||||||
gomod2nix.packages.${system}.default
|
gomod2nix.packages.${system}.default
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
@ -99,8 +100,8 @@
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
# nix build .#native
|
# nix build
|
||||||
packages.native = stdenvNoCC.mkDerivation {
|
packages.default = stdenvNoCC.mkDerivation {
|
||||||
pname = bridge.name;
|
pname = bridge.name;
|
||||||
version = bridge.version;
|
version = bridge.version;
|
||||||
src = bridgeBuildNative;
|
src = bridgeBuildNative;
|
||||||
|
|
Loading…
Reference in a new issue