whatsapp: check comply, make native built default

This commit is contained in:
Mark Joshwel 2024-06-19 01:31:35 +08:00
parent 85f305fb78
commit ad5707408c
2 changed files with 14 additions and 12 deletions

View file

@ -224,9 +224,11 @@ func parseJID(arg string) (types.JID, bool) {
if arg[0] == '+' {
arg = arg[1:]
}
if !strings.ContainsRune(arg, '@') {
return types.NewJID(arg, types.DefaultUserServer), true
} else {
}
recipient, err := types.ParseJID(arg)
if err != nil {
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, true
}
}
func handleCmd(cmd string, args []string) {

View file

@ -83,6 +83,7 @@
devShells.default = mkShell {
buildInputs = [
go
golint
gomod2nix.packages.${system}.default
];
};
@ -99,8 +100,8 @@
'';
};
# nix build .#native
packages.native = stdenvNoCC.mkDerivation {
# nix build
packages.default = stdenvNoCC.mkDerivation {
pname = bridge.name;
version = bridge.version;
src = bridgeBuildNative;