slidge-whatsapp 0.2.6__cp313-cp313-manylinux_2_36_aarch64.whl → 0.3.0__cp313-cp313-manylinux_2_36_aarch64.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of slidge-whatsapp might be problematic. Click here for more details.

Files changed (258) hide show
  1. slidge_whatsapp/contact.py +15 -3
  2. slidge_whatsapp/event.go +152 -50
  3. slidge_whatsapp/gateway.go +7 -63
  4. slidge_whatsapp/gateway.py +2 -3
  5. slidge_whatsapp/generated/_whatsapp.cpython-313-aarch64-linux-gnu.h +180 -163
  6. slidge_whatsapp/generated/_whatsapp.cpython-313-aarch64-linux-gnu.so +0 -0
  7. slidge_whatsapp/generated/build.py +145 -131
  8. slidge_whatsapp/generated/whatsapp.c +1669 -1397
  9. slidge_whatsapp/generated/whatsapp.go +1209 -1098
  10. slidge_whatsapp/generated/whatsapp.py +1175 -1050
  11. slidge_whatsapp/generated/whatsapp_go.h +180 -163
  12. slidge_whatsapp/go.mod +18 -15
  13. slidge_whatsapp/go.sum +38 -32
  14. slidge_whatsapp/group.py +34 -30
  15. slidge_whatsapp/media/media.go +6 -2
  16. slidge_whatsapp/session.go +34 -17
  17. slidge_whatsapp/session.py +46 -14
  18. slidge_whatsapp/vendor/github.com/beeper/argo-go/LICENSE +9 -0
  19. slidge_whatsapp/vendor/github.com/beeper/argo-go/block/blockreader.go +329 -0
  20. slidge_whatsapp/vendor/github.com/beeper/argo-go/block/blockwriter.go +417 -0
  21. slidge_whatsapp/vendor/github.com/beeper/argo-go/codec/decoder.go +652 -0
  22. slidge_whatsapp/vendor/github.com/beeper/argo-go/codec/encoder.go +985 -0
  23. slidge_whatsapp/vendor/github.com/beeper/argo-go/header/header.go +135 -0
  24. slidge_whatsapp/vendor/github.com/beeper/argo-go/internal/util/util.go +133 -0
  25. slidge_whatsapp/vendor/github.com/beeper/argo-go/label/label.go +384 -0
  26. slidge_whatsapp/vendor/github.com/beeper/argo-go/label/wiremarkers.go +37 -0
  27. slidge_whatsapp/vendor/github.com/beeper/argo-go/pkg/bitset/bitset.go +197 -0
  28. slidge_whatsapp/vendor/github.com/beeper/argo-go/pkg/buf/buf.go +420 -0
  29. slidge_whatsapp/vendor/github.com/beeper/argo-go/pkg/varint/varint.go +246 -0
  30. slidge_whatsapp/vendor/github.com/beeper/argo-go/wire/wire.go +614 -0
  31. slidge_whatsapp/vendor/github.com/beeper/argo-go/wirecodec/decode.go +341 -0
  32. slidge_whatsapp/vendor/github.com/elliotchance/orderedmap/v3/LICENSE +21 -0
  33. slidge_whatsapp/vendor/github.com/elliotchance/orderedmap/v3/list.go +95 -0
  34. slidge_whatsapp/vendor/github.com/elliotchance/orderedmap/v3/orderedmap.go +187 -0
  35. slidge_whatsapp/vendor/github.com/gen2brain/go-fitz/fitz.go +1 -0
  36. slidge_whatsapp/vendor/github.com/gen2brain/go-fitz/fitz_cgo.go +3 -0
  37. slidge_whatsapp/vendor/github.com/gen2brain/go-fitz/fitz_nocgo.go +4 -5
  38. slidge_whatsapp/vendor/github.com/gen2brain/go-fitz/purego_darwin.go +11 -1
  39. slidge_whatsapp/vendor/github.com/gen2brain/go-fitz/purego_linux.go +10 -0
  40. slidge_whatsapp/vendor/github.com/gen2brain/go-fitz/purego_windows.go +12 -0
  41. slidge_whatsapp/vendor/github.com/jupiterrider/ffi/.gitignore +0 -2
  42. slidge_whatsapp/vendor/github.com/jupiterrider/ffi/CHANGELOG.md +30 -0
  43. slidge_whatsapp/vendor/github.com/jupiterrider/ffi/COPYRIGHT.txt +6 -1
  44. slidge_whatsapp/vendor/github.com/jupiterrider/ffi/README.md +14 -17
  45. slidge_whatsapp/vendor/github.com/jupiterrider/ffi/abi.go +1 -1
  46. slidge_whatsapp/vendor/github.com/jupiterrider/ffi/abi2.go +7 -0
  47. slidge_whatsapp/vendor/github.com/jupiterrider/ffi/assets/libffi/LICENSE +21 -0
  48. slidge_whatsapp/vendor/github.com/jupiterrider/ffi/assets/libffi/darwin_amd64/libffi.8.dylib +0 -0
  49. slidge_whatsapp/vendor/github.com/jupiterrider/ffi/assets/libffi/darwin_arm64/libffi.8.dylib +0 -0
  50. slidge_whatsapp/vendor/github.com/jupiterrider/ffi/assets/libffi/windows_amd64/libffi-8.dll +0 -0
  51. slidge_whatsapp/vendor/github.com/jupiterrider/ffi/cif.go +15 -0
  52. slidge_whatsapp/vendor/github.com/jupiterrider/ffi/cif_arm64.go +16 -0
  53. slidge_whatsapp/vendor/github.com/jupiterrider/ffi/embed.go +49 -0
  54. slidge_whatsapp/vendor/github.com/jupiterrider/ffi/embed_darwin_amd64.go +10 -0
  55. slidge_whatsapp/vendor/github.com/jupiterrider/ffi/embed_darwin_arm64.go +10 -0
  56. slidge_whatsapp/vendor/github.com/jupiterrider/ffi/embed_windows_amd64.go +10 -0
  57. slidge_whatsapp/vendor/github.com/jupiterrider/ffi/ffi.go +51 -13
  58. slidge_whatsapp/vendor/github.com/jupiterrider/ffi/init.go +22 -9
  59. slidge_whatsapp/vendor/github.com/mattn/go-sqlite3/README.md +2 -0
  60. slidge_whatsapp/vendor/github.com/mattn/go-sqlite3/sqlite3-binding.c +3096 -1651
  61. slidge_whatsapp/vendor/github.com/mattn/go-sqlite3/sqlite3-binding.h +188 -128
  62. slidge_whatsapp/vendor/github.com/mattn/go-sqlite3/sqlite3_opt_userauth.go +13 -140
  63. slidge_whatsapp/vendor/github.com/mattn/go-sqlite3/sqlite3ext.h +4 -0
  64. slidge_whatsapp/vendor/github.com/petermattis/goid/runtime_go1.23.go +2 -2
  65. slidge_whatsapp/vendor/github.com/petermattis/goid/runtime_go1.25.go +37 -0
  66. slidge_whatsapp/vendor/github.com/vektah/gqlparser/v2/LICENSE +19 -0
  67. slidge_whatsapp/vendor/github.com/vektah/gqlparser/v2/ast/argmap.go +37 -0
  68. slidge_whatsapp/vendor/github.com/vektah/gqlparser/v2/ast/collections.go +148 -0
  69. slidge_whatsapp/vendor/github.com/vektah/gqlparser/v2/ast/comment.go +31 -0
  70. slidge_whatsapp/vendor/github.com/vektah/gqlparser/v2/ast/decode.go +216 -0
  71. slidge_whatsapp/vendor/github.com/vektah/gqlparser/v2/ast/definition.go +110 -0
  72. slidge_whatsapp/vendor/github.com/vektah/gqlparser/v2/ast/directive.go +43 -0
  73. slidge_whatsapp/vendor/github.com/vektah/gqlparser/v2/ast/document.go +89 -0
  74. slidge_whatsapp/vendor/github.com/vektah/gqlparser/v2/ast/dumper.go +159 -0
  75. slidge_whatsapp/vendor/github.com/vektah/gqlparser/v2/ast/fragment.go +41 -0
  76. slidge_whatsapp/vendor/github.com/vektah/gqlparser/v2/ast/operation.go +32 -0
  77. slidge_whatsapp/vendor/github.com/vektah/gqlparser/v2/ast/path.go +72 -0
  78. slidge_whatsapp/vendor/github.com/vektah/gqlparser/v2/ast/selection.go +41 -0
  79. slidge_whatsapp/vendor/github.com/vektah/gqlparser/v2/ast/source.go +19 -0
  80. slidge_whatsapp/vendor/github.com/vektah/gqlparser/v2/ast/type.go +68 -0
  81. slidge_whatsapp/vendor/github.com/vektah/gqlparser/v2/ast/value.go +122 -0
  82. slidge_whatsapp/vendor/go.mau.fi/util/exhttp/handleerrors.go +60 -26
  83. slidge_whatsapp/vendor/go.mau.fi/util/exhttp/json.go +1 -6
  84. slidge_whatsapp/vendor/go.mau.fi/util/exhttp/networkerror.go +2 -1
  85. slidge_whatsapp/vendor/go.mau.fi/util/exstrings/stringutil.go +104 -0
  86. slidge_whatsapp/vendor/go.mau.fi/util/exsync/event.go +19 -3
  87. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/.pre-commit-config.yaml +3 -3
  88. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/appstate/decode.go +1 -1
  89. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/appstate/hash.go +1 -1
  90. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/appstate.go +5 -1
  91. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/argo/argo-wire-type-store.argo +63 -0
  92. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/argo/argo.go +62 -0
  93. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/argo/name-to-queryids.json +306 -0
  94. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/armadillomessage.go +40 -7
  95. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/binary/encoder.go +1 -1
  96. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/call.go +2 -1
  97. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/client.go +79 -45
  98. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/connectionevents.go +13 -6
  99. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/download-to-file.go +19 -12
  100. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/download.go +26 -6
  101. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/errors.go +3 -0
  102. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/group.go +99 -27
  103. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/internals.go +54 -26
  104. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/keepalive.go +1 -0
  105. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/message.go +208 -57
  106. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/msgsecret.go +2 -14
  107. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/newsletter.go +83 -7
  108. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/notification.go +17 -8
  109. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/pair-code.go +2 -2
  110. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/presence.go +15 -6
  111. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/extra.go +7 -0
  112. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/instamadilloAddMessage/InstamadilloAddMessage.pb.go +983 -0
  113. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/instamadilloAddMessage/InstamadilloAddMessage.proto +85 -0
  114. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/instamadilloAddMessage/extra.go +3 -0
  115. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/instamadilloCoreTypeActionLog/InstamadilloCoreTypeActionLog.pb.go +197 -0
  116. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/instamadilloCoreTypeActionLog/InstamadilloCoreTypeActionLog.proto +13 -0
  117. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/instamadilloCoreTypeAdminMessage/InstamadilloCoreTypeAdminMessage.pb.go +279 -0
  118. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/instamadilloCoreTypeAdminMessage/InstamadilloCoreTypeAdminMessage.proto +21 -0
  119. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/instamadilloCoreTypeCollection/InstamadilloCoreTypeCollection.pb.go +137 -0
  120. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/instamadilloCoreTypeCollection/InstamadilloCoreTypeCollection.proto +10 -0
  121. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/instamadilloCoreTypeLink/InstamadilloCoreTypeLink.pb.go +313 -0
  122. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/instamadilloCoreTypeLink/InstamadilloCoreTypeLink.proto +27 -0
  123. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/instamadilloCoreTypeMedia/InstamadilloCoreTypeMedia.pb.go +1299 -0
  124. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/instamadilloCoreTypeMedia/InstamadilloCoreTypeMedia.proto +112 -0
  125. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/instamadilloCoreTypeText/InstamadilloCoreTypeText.pb.go +514 -0
  126. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/instamadilloCoreTypeText/InstamadilloCoreTypeText.proto +47 -0
  127. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/instamadilloDeleteMessage/InstamadilloDeleteMessage.pb.go +123 -0
  128. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/instamadilloDeleteMessage/InstamadilloDeleteMessage.proto +7 -0
  129. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/instamadilloDeleteMessage/extra.go +3 -0
  130. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/instamadilloSupplementMessage/InstamadilloSupplementMessage.pb.go +720 -0
  131. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/instamadilloSupplementMessage/InstamadilloSupplementMessage.proto +59 -0
  132. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/instamadilloSupplementMessage/extra.go +3 -0
  133. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/instamadilloTransportPayload/InstamadilloTransportPayload.pb.go +365 -0
  134. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/instamadilloTransportPayload/InstamadilloTransportPayload.proto +33 -0
  135. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/instamadilloXmaContentRef/InstamadilloXmaContentRef.pb.go +1238 -0
  136. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/instamadilloXmaContentRef/InstamadilloXmaContentRef.proto +105 -0
  137. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/waArmadilloXMA/WAArmadilloXMA.pb.go +16 -4
  138. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/waArmadilloXMA/WAArmadilloXMA.proto +3 -0
  139. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/waBotMetadata/WABotMetadata.pb.go +5156 -0
  140. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/waBotMetadata/WABotMetadata.proto +516 -0
  141. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/waCompanionReg/WACompanionReg.pb.go +46 -10
  142. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/waCompanionReg/WACompanionReg.proto +4 -0
  143. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/waE2E/WAWebProtobufsE2E.pb.go +8975 -11209
  144. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/waE2E/WAWebProtobufsE2E.proto +193 -421
  145. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/waHistorySync/WAWebProtobufsHistorySync.pb.go +52 -23
  146. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/waHistorySync/WAWebProtobufsHistorySync.proto +3 -0
  147. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/waLidMigrationSyncPayload/WAWebProtobufLidMigrationSyncPayload.pb.go +198 -0
  148. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/waLidMigrationSyncPayload/WAWebProtobufLidMigrationSyncPayload.proto +14 -0
  149. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/waMsgTransport/extra.go +7 -6
  150. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/waStatusAttributions/WAStatusAttributions.pb.go +952 -0
  151. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/waStatusAttributions/WAStatusAttributions.proto +88 -0
  152. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/waSyncAction/WASyncAction.pb.go +1143 -463
  153. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/waSyncAction/WASyncAction.proto +60 -0
  154. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/waWa6/WAWebProtobufsWa6.pb.go +60 -38
  155. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/waWa6/WAWebProtobufsWa6.proto +3 -0
  156. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/waWeb/WAWebProtobufsWeb.pb.go +11 -3
  157. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/waWeb/WAWebProtobufsWeb.proto +2 -0
  158. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/receipt.go +20 -7
  159. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/reportingfields.json +1 -0
  160. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/reportingtoken.go +176 -0
  161. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/retry.go +10 -2
  162. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/send.go +38 -21
  163. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/sendfb.go +1 -0
  164. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/store/clientpayload.go +1 -1
  165. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/store/noop.go +3 -2
  166. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/store/sqlstore/container.go +9 -6
  167. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/store/sqlstore/store.go +25 -5
  168. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/store/sqlstore/upgrades/00-latest-schema.sql +4 -2
  169. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/store/sqlstore/upgrades/10-chat-db-lid-migration-ts.sql +2 -0
  170. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/store/store.go +5 -1
  171. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/types/call.go +1 -0
  172. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/types/events/events.go +13 -2
  173. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/types/jid.go +2 -1
  174. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/types/message.go +1 -0
  175. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/types/user.go +2 -0
  176. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/user.go +14 -8
  177. slidge_whatsapp/vendor/golang.org/x/crypto/curve25519/curve25519.go +1 -1
  178. slidge_whatsapp/vendor/golang.org/x/net/http2/config.go +44 -2
  179. slidge_whatsapp/vendor/golang.org/x/net/http2/frame.go +8 -8
  180. slidge_whatsapp/vendor/golang.org/x/net/http2/gotrack.go +14 -3
  181. slidge_whatsapp/vendor/golang.org/x/net/http2/http2.go +7 -29
  182. slidge_whatsapp/vendor/golang.org/x/net/http2/server.go +53 -71
  183. slidge_whatsapp/vendor/golang.org/x/net/http2/transport.go +20 -74
  184. slidge_whatsapp/vendor/golang.org/x/sys/unix/affinity_linux.go +1 -3
  185. slidge_whatsapp/vendor/golang.org/x/sys/unix/mkerrors.sh +3 -0
  186. slidge_whatsapp/vendor/golang.org/x/sys/unix/syscall_darwin.go +1 -55
  187. slidge_whatsapp/vendor/golang.org/x/sys/unix/syscall_solaris.go +1 -1
  188. slidge_whatsapp/vendor/golang.org/x/sys/unix/zerrors_linux.go +47 -16
  189. slidge_whatsapp/vendor/golang.org/x/sys/unix/zerrors_linux_386.go +3 -0
  190. slidge_whatsapp/vendor/golang.org/x/sys/unix/zerrors_linux_amd64.go +3 -0
  191. slidge_whatsapp/vendor/golang.org/x/sys/unix/zerrors_linux_arm.go +3 -0
  192. slidge_whatsapp/vendor/golang.org/x/sys/unix/zerrors_linux_arm64.go +3 -0
  193. slidge_whatsapp/vendor/golang.org/x/sys/unix/zerrors_linux_loong64.go +3 -0
  194. slidge_whatsapp/vendor/golang.org/x/sys/unix/zerrors_linux_mips.go +3 -0
  195. slidge_whatsapp/vendor/golang.org/x/sys/unix/zerrors_linux_mips64.go +3 -0
  196. slidge_whatsapp/vendor/golang.org/x/sys/unix/zerrors_linux_mips64le.go +3 -0
  197. slidge_whatsapp/vendor/golang.org/x/sys/unix/zerrors_linux_mipsle.go +3 -0
  198. slidge_whatsapp/vendor/golang.org/x/sys/unix/zerrors_linux_ppc.go +3 -0
  199. slidge_whatsapp/vendor/golang.org/x/sys/unix/zerrors_linux_ppc64.go +3 -0
  200. slidge_whatsapp/vendor/golang.org/x/sys/unix/zerrors_linux_ppc64le.go +3 -0
  201. slidge_whatsapp/vendor/golang.org/x/sys/unix/zerrors_linux_riscv64.go +3 -0
  202. slidge_whatsapp/vendor/golang.org/x/sys/unix/zerrors_linux_s390x.go +3 -0
  203. slidge_whatsapp/vendor/golang.org/x/sys/unix/zerrors_linux_sparc64.go +3 -0
  204. slidge_whatsapp/vendor/golang.org/x/sys/unix/zsyscall_solaris_amd64.go +4 -4
  205. slidge_whatsapp/vendor/golang.org/x/sys/unix/zsysnum_linux_386.go +1 -0
  206. slidge_whatsapp/vendor/golang.org/x/sys/unix/zsysnum_linux_amd64.go +1 -0
  207. slidge_whatsapp/vendor/golang.org/x/sys/unix/zsysnum_linux_arm.go +1 -0
  208. slidge_whatsapp/vendor/golang.org/x/sys/unix/zsysnum_linux_arm64.go +1 -0
  209. slidge_whatsapp/vendor/golang.org/x/sys/unix/zsysnum_linux_loong64.go +1 -0
  210. slidge_whatsapp/vendor/golang.org/x/sys/unix/zsysnum_linux_mips.go +1 -0
  211. slidge_whatsapp/vendor/golang.org/x/sys/unix/zsysnum_linux_mips64.go +1 -0
  212. slidge_whatsapp/vendor/golang.org/x/sys/unix/zsysnum_linux_mips64le.go +1 -0
  213. slidge_whatsapp/vendor/golang.org/x/sys/unix/zsysnum_linux_mipsle.go +1 -0
  214. slidge_whatsapp/vendor/golang.org/x/sys/unix/zsysnum_linux_ppc.go +1 -0
  215. slidge_whatsapp/vendor/golang.org/x/sys/unix/zsysnum_linux_ppc64.go +1 -0
  216. slidge_whatsapp/vendor/golang.org/x/sys/unix/zsysnum_linux_ppc64le.go +1 -0
  217. slidge_whatsapp/vendor/golang.org/x/sys/unix/zsysnum_linux_riscv64.go +1 -0
  218. slidge_whatsapp/vendor/golang.org/x/sys/unix/zsysnum_linux_s390x.go +1 -0
  219. slidge_whatsapp/vendor/golang.org/x/sys/unix/zsysnum_linux_sparc64.go +1 -0
  220. slidge_whatsapp/vendor/golang.org/x/sys/unix/ztypes_linux.go +168 -12
  221. slidge_whatsapp/vendor/golang.org/x/sys/unix/ztypes_linux_386.go +17 -1
  222. slidge_whatsapp/vendor/golang.org/x/sys/unix/ztypes_linux_amd64.go +16 -0
  223. slidge_whatsapp/vendor/golang.org/x/sys/unix/ztypes_linux_arm.go +18 -2
  224. slidge_whatsapp/vendor/golang.org/x/sys/unix/ztypes_linux_arm64.go +16 -0
  225. slidge_whatsapp/vendor/golang.org/x/sys/unix/ztypes_linux_loong64.go +16 -0
  226. slidge_whatsapp/vendor/golang.org/x/sys/unix/ztypes_linux_mips.go +17 -1
  227. slidge_whatsapp/vendor/golang.org/x/sys/unix/ztypes_linux_mips64.go +16 -0
  228. slidge_whatsapp/vendor/golang.org/x/sys/unix/ztypes_linux_mips64le.go +16 -0
  229. slidge_whatsapp/vendor/golang.org/x/sys/unix/ztypes_linux_mipsle.go +17 -1
  230. slidge_whatsapp/vendor/golang.org/x/sys/unix/ztypes_linux_ppc.go +18 -2
  231. slidge_whatsapp/vendor/golang.org/x/sys/unix/ztypes_linux_ppc64.go +16 -0
  232. slidge_whatsapp/vendor/golang.org/x/sys/unix/ztypes_linux_ppc64le.go +16 -0
  233. slidge_whatsapp/vendor/golang.org/x/sys/unix/ztypes_linux_riscv64.go +16 -0
  234. slidge_whatsapp/vendor/golang.org/x/sys/unix/ztypes_linux_s390x.go +16 -0
  235. slidge_whatsapp/vendor/golang.org/x/sys/unix/ztypes_linux_sparc64.go +16 -0
  236. slidge_whatsapp/vendor/golang.org/x/sys/windows/types_windows.go +6 -0
  237. slidge_whatsapp/vendor/golang.org/x/sys/windows/zsyscall_windows.go +483 -483
  238. slidge_whatsapp/vendor/google.golang.org/protobuf/encoding/protowire/wire.go +25 -1
  239. slidge_whatsapp/vendor/google.golang.org/protobuf/internal/editiondefaults/editions_defaults.binpb +0 -0
  240. slidge_whatsapp/vendor/google.golang.org/protobuf/internal/filedesc/editions.go +10 -5
  241. slidge_whatsapp/vendor/google.golang.org/protobuf/internal/filedesc/presence.go +33 -0
  242. slidge_whatsapp/vendor/google.golang.org/protobuf/internal/genid/api_gen.go +6 -0
  243. slidge_whatsapp/vendor/google.golang.org/protobuf/internal/genid/descriptor_gen.go +68 -22
  244. slidge_whatsapp/vendor/google.golang.org/protobuf/internal/impl/codec_message_opaque.go +2 -1
  245. slidge_whatsapp/vendor/google.golang.org/protobuf/internal/impl/message_opaque.go +8 -37
  246. slidge_whatsapp/vendor/google.golang.org/protobuf/internal/impl/presence.go +0 -3
  247. slidge_whatsapp/vendor/google.golang.org/protobuf/internal/version/version.go +1 -1
  248. slidge_whatsapp/vendor/google.golang.org/protobuf/reflect/protoreflect/source_gen.go +8 -0
  249. slidge_whatsapp/vendor/modules.txt +57 -23
  250. {slidge_whatsapp-0.2.6.dist-info → slidge_whatsapp-0.3.0.dist-info}/METADATA +5 -4
  251. {slidge_whatsapp-0.2.6.dist-info → slidge_whatsapp-0.3.0.dist-info}/RECORD +254 -174
  252. {slidge_whatsapp-0.2.6.dist-info → slidge_whatsapp-0.3.0.dist-info}/WHEEL +1 -1
  253. slidge_whatsapp/vendor/github.com/jupiterrider/ffi/abi_amd64.go +0 -7
  254. slidge_whatsapp/vendor/golang.org/x/net/http2/config_go124.go +0 -61
  255. slidge_whatsapp/vendor/golang.org/x/net/http2/config_pre_go124.go +0 -16
  256. slidge_whatsapp/vendor/golang.org/x/net/http2/timer.go +0 -20
  257. {slidge_whatsapp-0.2.6.dist-info → slidge_whatsapp-0.3.0.dist-info}/entry_points.txt +0 -0
  258. {slidge_whatsapp-0.2.6.dist-info → slidge_whatsapp-0.3.0.dist-info/licenses}/LICENSE +0 -0
@@ -39,6 +39,11 @@ type ReqCreateGroup struct {
39
39
  // A create key can be provided to deduplicate the group create notification that will be triggered
40
40
  // when the group is created. If provided, the JoinedGroup event will contain the same key.
41
41
  CreateKey types.MessageID
42
+
43
+ types.GroupEphemeral
44
+ types.GroupAnnounce
45
+ types.GroupLocked
46
+ types.GroupMembershipApprovalMode
42
47
  // Set IsParent to true to create a community instead of a normal group.
43
48
  // When creating a community, the linked announcement group will be created automatically by the server.
44
49
  types.GroupParent
@@ -49,13 +54,22 @@ type ReqCreateGroup struct {
49
54
  // CreateGroup creates a group on WhatsApp with the given name and participants.
50
55
  //
51
56
  // See ReqCreateGroup for parameters.
52
- func (cli *Client) CreateGroup(req ReqCreateGroup) (*types.GroupInfo, error) {
57
+ func (cli *Client) CreateGroup(ctx context.Context, req ReqCreateGroup) (*types.GroupInfo, error) {
53
58
  participantNodes := make([]waBinary.Node, len(req.Participants), len(req.Participants)+1)
54
59
  for i, participant := range req.Participants {
55
60
  participantNodes[i] = waBinary.Node{
56
61
  Tag: "participant",
57
62
  Attrs: waBinary.Attrs{"jid": participant},
58
63
  }
64
+ pt, err := cli.Store.PrivacyTokens.GetPrivacyToken(ctx, participant)
65
+ if err != nil {
66
+ return nil, fmt.Errorf("failed to get privacy token for participant %s: %v", participant, err)
67
+ } else if pt != nil {
68
+ participantNodes[i].Content = []waBinary.Node{{
69
+ Tag: "privacy",
70
+ Content: pt.Token,
71
+ }}
72
+ }
59
73
  }
60
74
  if req.CreateKey == "" {
61
75
  req.CreateKey = cli.GenerateMessageID()
@@ -76,9 +90,33 @@ func (cli *Client) CreateGroup(req ReqCreateGroup) (*types.GroupInfo, error) {
76
90
  Attrs: waBinary.Attrs{"jid": req.LinkedParentJID},
77
91
  })
78
92
  }
93
+ if req.IsLocked {
94
+ participantNodes = append(participantNodes, waBinary.Node{Tag: "locked"})
95
+ }
96
+ if req.IsAnnounce {
97
+ participantNodes = append(participantNodes, waBinary.Node{Tag: "announcement"})
98
+ }
99
+ if req.IsEphemeral {
100
+ participantNodes = append(participantNodes, waBinary.Node{
101
+ Tag: "ephemeral",
102
+ Attrs: waBinary.Attrs{
103
+ "expiration": req.DisappearingTimer,
104
+ "trigger": "1", // TODO what's this?
105
+ },
106
+ })
107
+ }
108
+ if req.IsJoinApprovalRequired {
109
+ participantNodes = append(participantNodes, waBinary.Node{
110
+ Tag: "membership_approval_mode",
111
+ Content: []waBinary.Node{{
112
+ Tag: "group_join",
113
+ Attrs: waBinary.Attrs{"state": "on"},
114
+ }},
115
+ })
116
+ }
79
117
  // WhatsApp web doesn't seem to include the static prefix for these
80
118
  key := strings.TrimPrefix(req.CreateKey, "3EB0")
81
- resp, err := cli.sendGroupIQ(context.TODO(), iqSet, types.GroupServerJID, waBinary.Node{
119
+ resp, err := cli.sendGroupIQ(ctx, iqSet, types.GroupServerJID, waBinary.Node{
82
120
  Tag: "create",
83
121
  Attrs: waBinary.Attrs{
84
122
  "subject": req.Name,
@@ -519,7 +557,14 @@ func (cli *Client) GetLinkedGroupsParticipants(community types.JID) ([]types.JID
519
557
  if !ok {
520
558
  return nil, &ElementMissingError{Tag: "linked_groups_participants", In: "response to community participants query"}
521
559
  }
522
- return parseParticipantList(&participants), nil
560
+ members, lidPairs := parseParticipantList(&participants)
561
+ if len(lidPairs) > 0 {
562
+ err = cli.Store.LIDs.PutManyLIDMappings(context.TODO(), lidPairs)
563
+ if err != nil {
564
+ cli.Log.Warnf("Failed to store LID mappings for community participants: %v", err)
565
+ }
566
+ }
567
+ return members, nil
523
568
  }
524
569
 
525
570
  // GetGroupInfo requests basic info about a group chat from the WhatsApp servers.
@@ -702,7 +747,7 @@ func parseGroupLinkTargetNode(groupNode *waBinary.Node) (types.GroupLinkTarget,
702
747
  }, ag.Error()
703
748
  }
704
749
 
705
- func parseParticipantList(node *waBinary.Node) (participants []types.JID) {
750
+ func parseParticipantList(node *waBinary.Node) (participants []types.JID, lidPairs []store.LIDMapping) {
706
751
  children := node.GetChildren()
707
752
  participants = make([]types.JID, 0, len(children))
708
753
  for _, child := range children {
@@ -711,14 +756,31 @@ func parseParticipantList(node *waBinary.Node) (participants []types.JID) {
711
756
  continue
712
757
  }
713
758
  participants = append(participants, jid)
759
+ if jid.Server == types.HiddenUserServer {
760
+ phoneNumber, ok := child.Attrs["phone_number"].(types.JID)
761
+ if ok && !phoneNumber.IsEmpty() {
762
+ lidPairs = append(lidPairs, store.LIDMapping{
763
+ LID: jid,
764
+ PN: phoneNumber,
765
+ })
766
+ }
767
+ } else if jid.Server == types.DefaultUserServer {
768
+ lid, ok := child.Attrs["lid"].(types.JID)
769
+ if ok && !lid.IsEmpty() {
770
+ lidPairs = append(lidPairs, store.LIDMapping{
771
+ LID: lid,
772
+ PN: jid,
773
+ })
774
+ }
775
+ }
714
776
  }
715
777
  return
716
778
  }
717
779
 
718
- func (cli *Client) parseGroupCreate(parentNode, node *waBinary.Node) (*events.JoinedGroup, error) {
780
+ func (cli *Client) parseGroupCreate(parentNode, node *waBinary.Node) (*events.JoinedGroup, []store.LIDMapping, error) {
719
781
  groupNode, ok := node.GetOptionalChildByTag("group")
720
782
  if !ok {
721
- return nil, fmt.Errorf("group create notification didn't contain group info")
783
+ return nil, nil, fmt.Errorf("group create notification didn't contain group info")
722
784
  }
723
785
  var evt events.JoinedGroup
724
786
  pag := parentNode.AttrGetter()
@@ -731,13 +793,22 @@ func (cli *Client) parseGroupCreate(parentNode, node *waBinary.Node) (*events.Jo
731
793
  evt.Notify = pag.OptionalString("notify")
732
794
  info, err := cli.parseGroupNode(&groupNode)
733
795
  if err != nil {
734
- return nil, fmt.Errorf("failed to parse group info in create notification: %w", err)
796
+ return nil, nil, fmt.Errorf("failed to parse group info in create notification: %w", err)
735
797
  }
736
798
  evt.GroupInfo = *info
737
- return &evt, nil
799
+ lidPairs := make([]store.LIDMapping, 0, len(info.Participants))
800
+ for _, pcp := range info.Participants {
801
+ if !pcp.PhoneNumber.IsEmpty() && !pcp.LID.IsEmpty() {
802
+ lidPairs = append(lidPairs, store.LIDMapping{
803
+ LID: pcp.LID,
804
+ PN: pcp.PhoneNumber,
805
+ })
806
+ }
807
+ }
808
+ return &evt, lidPairs, nil
738
809
  }
739
810
 
740
- func (cli *Client) parseGroupChange(node *waBinary.Node) (*events.GroupInfo, error) {
811
+ func (cli *Client) parseGroupChange(node *waBinary.Node) (*events.GroupInfo, []store.LIDMapping, error) {
741
812
  var evt events.GroupInfo
742
813
  ag := node.AttrGetter()
743
814
  evt.JID = ag.JID("from")
@@ -746,25 +817,26 @@ func (cli *Client) parseGroupChange(node *waBinary.Node) (*events.GroupInfo, err
746
817
  evt.SenderPN = ag.OptionalJID("participant_pn")
747
818
  evt.Timestamp = ag.UnixTime("t")
748
819
  if !ag.OK() {
749
- return nil, fmt.Errorf("group change doesn't contain required attributes: %w", ag.Error())
820
+ return nil, nil, fmt.Errorf("group change doesn't contain required attributes: %w", ag.Error())
750
821
  }
751
822
 
823
+ var lidPairs []store.LIDMapping
752
824
  for _, child := range node.GetChildren() {
753
825
  cag := child.AttrGetter()
754
826
  if child.Tag == "add" || child.Tag == "remove" || child.Tag == "promote" || child.Tag == "demote" {
755
- evt.PrevParticipantVersionID = cag.String("prev_v_id")
756
- evt.ParticipantVersionID = cag.String("v_id")
827
+ evt.PrevParticipantVersionID = cag.OptionalString("prev_v_id")
828
+ evt.ParticipantVersionID = cag.OptionalString("v_id")
757
829
  }
758
830
  switch child.Tag {
759
831
  case "add":
760
832
  evt.JoinReason = cag.OptionalString("reason")
761
- evt.Join = parseParticipantList(&child)
833
+ evt.Join, lidPairs = parseParticipantList(&child)
762
834
  case "remove":
763
- evt.Leave = parseParticipantList(&child)
835
+ evt.Leave, lidPairs = parseParticipantList(&child)
764
836
  case "promote":
765
- evt.Promote = parseParticipantList(&child)
837
+ evt.Promote, lidPairs = parseParticipantList(&child)
766
838
  case "demote":
767
- evt.Demote = parseParticipantList(&child)
839
+ evt.Demote, lidPairs = parseParticipantList(&child)
768
840
  case "locked":
769
841
  evt.Locked = &types.GroupLocked{IsLocked: true}
770
842
  case "unlocked":
@@ -785,7 +857,7 @@ func (cli *Client) parseGroupChange(node *waBinary.Node) (*events.GroupInfo, err
785
857
  topicChild := child.GetChildByTag("body")
786
858
  topicBytes, ok := topicChild.Content.([]byte)
787
859
  if !ok {
788
- return nil, fmt.Errorf("group change description has unexpected body: %s", topicChild.XMLString())
860
+ return nil, nil, fmt.Errorf("group change description has unexpected body: %s", topicChild.XMLString())
789
861
  }
790
862
  topicStr = string(topicBytes)
791
863
  }
@@ -827,12 +899,12 @@ func (cli *Client) parseGroupChange(node *waBinary.Node) (*events.GroupInfo, err
827
899
  }
828
900
  groupNode, ok := child.GetOptionalChildByTag("group")
829
901
  if !ok {
830
- return nil, &ElementMissingError{Tag: "group", In: "group link"}
902
+ return nil, nil, &ElementMissingError{Tag: "group", In: "group link"}
831
903
  }
832
904
  var err error
833
905
  evt.Link.Group, err = parseGroupLinkTargetNode(&groupNode)
834
906
  if err != nil {
835
- return nil, fmt.Errorf("failed to parse group link node in group change: %w", err)
907
+ return nil, nil, fmt.Errorf("failed to parse group link node in group change: %w", err)
836
908
  }
837
909
  case "unlink":
838
910
  evt.Unlink = &types.GroupLinkChange{
@@ -841,12 +913,12 @@ func (cli *Client) parseGroupChange(node *waBinary.Node) (*events.GroupInfo, err
841
913
  }
842
914
  groupNode, ok := child.GetOptionalChildByTag("group")
843
915
  if !ok {
844
- return nil, &ElementMissingError{Tag: "group", In: "group unlink"}
916
+ return nil, nil, &ElementMissingError{Tag: "group", In: "group unlink"}
845
917
  }
846
918
  var err error
847
919
  evt.Unlink.Group, err = parseGroupLinkTargetNode(&groupNode)
848
920
  if err != nil {
849
- return nil, fmt.Errorf("failed to parse group unlink node in group change: %w", err)
921
+ return nil, nil, fmt.Errorf("failed to parse group unlink node in group change: %w", err)
850
922
  }
851
923
  case "membership_approval_mode":
852
924
  evt.MembershipApprovalMode = &types.GroupMembershipApprovalMode{
@@ -856,10 +928,10 @@ func (cli *Client) parseGroupChange(node *waBinary.Node) (*events.GroupInfo, err
856
928
  evt.UnknownChanges = append(evt.UnknownChanges, &child)
857
929
  }
858
930
  if !cag.OK() {
859
- return nil, fmt.Errorf("group change %s element doesn't contain required attributes: %w", child.Tag, cag.Error())
931
+ return nil, nil, fmt.Errorf("group change %s element doesn't contain required attributes: %w", child.Tag, cag.Error())
860
932
  }
861
933
  }
862
- return &evt, nil
934
+ return &evt, lidPairs, nil
863
935
  }
864
936
 
865
937
  func (cli *Client) updateGroupParticipantCache(evt *events.GroupInfo) {
@@ -893,17 +965,17 @@ Outer:
893
965
  }
894
966
  }
895
967
 
896
- func (cli *Client) parseGroupNotification(node *waBinary.Node) (any, error) {
968
+ func (cli *Client) parseGroupNotification(node *waBinary.Node) (any, []store.LIDMapping, error) {
897
969
  children := node.GetChildren()
898
970
  if len(children) == 1 && children[0].Tag == "create" {
899
971
  return cli.parseGroupCreate(node, &children[0])
900
972
  } else {
901
- groupChange, err := cli.parseGroupChange(node)
973
+ groupChange, lidPairs, err := cli.parseGroupChange(node)
902
974
  if err != nil {
903
- return nil, err
975
+ return nil, nil, err
904
976
  }
905
977
  cli.updateGroupParticipantCache(groupChange)
906
- return groupChange, nil
978
+ return groupChange, lidPairs, nil
907
979
  }
908
980
  }
909
981
 
@@ -67,7 +67,7 @@ func (int *DangerousInternalClient) RequestAppStateKeys(ctx context.Context, raw
67
67
  int.c.requestAppStateKeys(ctx, rawKeyIDs)
68
68
  }
69
69
 
70
- func (int *DangerousInternalClient) HandleDecryptedArmadillo(ctx context.Context, info *types.MessageInfo, decrypted []byte, retryCount int) bool {
70
+ func (int *DangerousInternalClient) HandleDecryptedArmadillo(ctx context.Context, info *types.MessageInfo, decrypted []byte, retryCount int) (handled, handlerFailed bool) {
71
71
  return int.c.handleDecryptedArmadillo(ctx, info, decrypted, retryCount)
72
72
  }
73
73
 
@@ -99,6 +99,14 @@ func (int *DangerousInternalClient) GetOwnLID() types.JID {
99
99
  return int.c.getOwnLID()
100
100
  }
101
101
 
102
+ func (int *DangerousInternalClient) Connect() error {
103
+ return int.c.connect()
104
+ }
105
+
106
+ func (int *DangerousInternalClient) UnlockedConnect() error {
107
+ return int.c.unlockedConnect()
108
+ }
109
+
102
110
  func (int *DangerousInternalClient) OnDisconnect(ns *socket.NoiseSocket, remote bool) {
103
111
  int.c.onDisconnect(ns, remote)
104
112
  }
@@ -139,8 +147,8 @@ func (int *DangerousInternalClient) SendNode(node waBinary.Node) error {
139
147
  return int.c.sendNode(node)
140
148
  }
141
149
 
142
- func (int *DangerousInternalClient) DispatchEvent(evt any) {
143
- int.c.dispatchEvent(evt)
150
+ func (int *DangerousInternalClient) DispatchEvent(evt any) (handlerFailed bool) {
151
+ return int.c.dispatchEvent(evt)
144
152
  }
145
153
 
146
154
  func (int *DangerousInternalClient) HandleStreamError(node *waBinary.Node) {
@@ -211,11 +219,11 @@ func (int *DangerousInternalClient) ParseGroupNode(groupNode *waBinary.Node) (*t
211
219
  return int.c.parseGroupNode(groupNode)
212
220
  }
213
221
 
214
- func (int *DangerousInternalClient) ParseGroupCreate(parentNode, node *waBinary.Node) (*events.JoinedGroup, error) {
222
+ func (int *DangerousInternalClient) ParseGroupCreate(parentNode, node *waBinary.Node) (*events.JoinedGroup, []store.LIDMapping, error) {
215
223
  return int.c.parseGroupCreate(parentNode, node)
216
224
  }
217
225
 
218
- func (int *DangerousInternalClient) ParseGroupChange(node *waBinary.Node) (*events.GroupInfo, error) {
226
+ func (int *DangerousInternalClient) ParseGroupChange(node *waBinary.Node) (*events.GroupInfo, []store.LIDMapping, error) {
219
227
  return int.c.parseGroupChange(node)
220
228
  }
221
229
 
@@ -223,7 +231,7 @@ func (int *DangerousInternalClient) UpdateGroupParticipantCache(evt *events.Grou
223
231
  int.c.updateGroupParticipantCache(evt)
224
232
  }
225
233
 
226
- func (int *DangerousInternalClient) ParseGroupNotification(node *waBinary.Node) (any, error) {
234
+ func (int *DangerousInternalClient) ParseGroupNotification(node *waBinary.Node) (any, []store.LIDMapping, error) {
227
235
  return int.c.parseGroupNotification(node)
228
236
  }
229
237
 
@@ -271,16 +279,16 @@ func (int *DangerousInternalClient) ParseMessageInfo(node *waBinary.Node) (*type
271
279
  return int.c.parseMessageInfo(node)
272
280
  }
273
281
 
274
- func (int *DangerousInternalClient) HandlePlaintextMessage(ctx context.Context, info *types.MessageInfo, node *waBinary.Node) {
275
- int.c.handlePlaintextMessage(ctx, info, node)
282
+ func (int *DangerousInternalClient) HandlePlaintextMessage(ctx context.Context, info *types.MessageInfo, node *waBinary.Node) (handlerFailed bool) {
283
+ return int.c.handlePlaintextMessage(ctx, info, node)
276
284
  }
277
285
 
278
286
  func (int *DangerousInternalClient) MigrateSessionStore(ctx context.Context, pn, lid types.JID) {
279
287
  int.c.migrateSessionStore(ctx, pn, lid)
280
288
  }
281
289
 
282
- func (int *DangerousInternalClient) DecryptMessages(ctx context.Context, info *types.MessageInfo, node *waBinary.Node) {
283
- int.c.decryptMessages(ctx, info, node)
290
+ func (int *DangerousInternalClient) DecryptMessages(ctx context.Context, info *types.MessageInfo, node *waBinary.Node) (handlerFailed bool) {
291
+ return int.c.decryptMessages(ctx, info, node)
284
292
  }
285
293
 
286
294
  func (int *DangerousInternalClient) ClearUntrustedIdentity(ctx context.Context, target types.JID) error {
@@ -307,24 +315,20 @@ func (int *DangerousInternalClient) HandleHistorySyncNotificationLoop() {
307
315
  int.c.handleHistorySyncNotificationLoop()
308
316
  }
309
317
 
310
- func (int *DangerousInternalClient) HandleHistorySyncNotification(ctx context.Context, notif *waE2E.HistorySyncNotification) {
311
- int.c.handleHistorySyncNotification(ctx, notif)
312
- }
313
-
314
318
  func (int *DangerousInternalClient) HandleAppStateSyncKeyShare(ctx context.Context, keys *waE2E.AppStateSyncKeyShare) {
315
319
  int.c.handleAppStateSyncKeyShare(ctx, keys)
316
320
  }
317
321
 
318
- func (int *DangerousInternalClient) HandlePlaceholderResendResponse(msg *waE2E.PeerDataOperationRequestResponseMessage) {
319
- int.c.handlePlaceholderResendResponse(msg)
322
+ func (int *DangerousInternalClient) HandlePlaceholderResendResponse(msg *waE2E.PeerDataOperationRequestResponseMessage) (ok bool) {
323
+ return int.c.handlePlaceholderResendResponse(msg)
320
324
  }
321
325
 
322
- func (int *DangerousInternalClient) HandleProtocolMessage(ctx context.Context, info *types.MessageInfo, msg *waE2E.Message) {
323
- int.c.handleProtocolMessage(ctx, info, msg)
326
+ func (int *DangerousInternalClient) HandleProtocolMessage(ctx context.Context, info *types.MessageInfo, msg *waE2E.Message) (ok bool) {
327
+ return int.c.handleProtocolMessage(ctx, info, msg)
324
328
  }
325
329
 
326
- func (int *DangerousInternalClient) ProcessProtocolParts(ctx context.Context, info *types.MessageInfo, msg *waE2E.Message) {
327
- int.c.processProtocolParts(ctx, info, msg)
330
+ func (int *DangerousInternalClient) ProcessProtocolParts(ctx context.Context, info *types.MessageInfo, msg *waE2E.Message) (ok bool) {
331
+ return int.c.processProtocolParts(ctx, info, msg)
328
332
  }
329
333
 
330
334
  func (int *DangerousInternalClient) StoreMessageSecret(ctx context.Context, info *types.MessageInfo, msg *waE2E.Message) {
@@ -335,8 +339,20 @@ func (int *DangerousInternalClient) StoreHistoricalMessageSecrets(ctx context.Co
335
339
  int.c.storeHistoricalMessageSecrets(ctx, conversations)
336
340
  }
337
341
 
338
- func (int *DangerousInternalClient) HandleDecryptedMessage(ctx context.Context, info *types.MessageInfo, msg *waE2E.Message, retryCount int) {
339
- int.c.handleDecryptedMessage(ctx, info, msg, retryCount)
342
+ func (int *DangerousInternalClient) StoreLIDSyncMessage(ctx context.Context, msg []byte) {
343
+ int.c.storeLIDSyncMessage(ctx, msg)
344
+ }
345
+
346
+ func (int *DangerousInternalClient) StoreGlobalSettings(ctx context.Context, settings *waHistorySync.GlobalSettings) {
347
+ int.c.storeGlobalSettings(ctx, settings)
348
+ }
349
+
350
+ func (int *DangerousInternalClient) StoreHistoricalPNLIDMappings(ctx context.Context, mappings []*waHistorySync.PhoneNumberToLIDMapping) {
351
+ int.c.storeHistoricalPNLIDMappings(ctx, mappings)
352
+ }
353
+
354
+ func (int *DangerousInternalClient) HandleDecryptedMessage(ctx context.Context, info *types.MessageInfo, msg *waE2E.Message, retryCount int) bool {
355
+ return int.c.handleDecryptedMessage(ctx, info, msg, retryCount)
340
356
  }
341
357
 
342
358
  func (int *DangerousInternalClient) SendProtocolMessageReceipt(id types.MessageID, msgType types.ReceiptType) {
@@ -491,8 +507,8 @@ func (int *DangerousInternalClient) ParseReceipt(node *waBinary.Node) (*events.R
491
507
  return int.c.parseReceipt(node)
492
508
  }
493
509
 
494
- func (int *DangerousInternalClient) MaybeDeferredAck(node *waBinary.Node) func() {
495
- return int.c.maybeDeferredAck(node)
510
+ func (int *DangerousInternalClient) MaybeDeferredAck(ctx context.Context, node *waBinary.Node) func(...*bool) {
511
+ return int.c.maybeDeferredAck(ctx, node)
496
512
  }
497
513
 
498
514
  func (int *DangerousInternalClient) SendAck(node *waBinary.Node) {
@@ -567,6 +583,10 @@ func (int *DangerousInternalClient) DelayedRequestMessageFromPhone(info *types.M
567
583
  int.c.delayedRequestMessageFromPhone(info)
568
584
  }
569
585
 
586
+ func (int *DangerousInternalClient) ImmediateRequestMessageFromPhone(ctx context.Context, info *types.MessageInfo) {
587
+ int.c.immediateRequestMessageFromPhone(ctx, info)
588
+ }
589
+
570
590
  func (int *DangerousInternalClient) ClearDelayedMessageRequests() {
571
591
  int.c.clearDelayedMessageRequests()
572
592
  }
@@ -603,8 +623,8 @@ func (int *DangerousInternalClient) SendNewsletter(to types.JID, id types.Messag
603
623
  return int.c.sendNewsletter(to, id, message, mediaID, timings)
604
624
  }
605
625
 
606
- func (int *DangerousInternalClient) SendGroup(ctx context.Context, to types.JID, participants []types.JID, id types.MessageID, message *waE2E.Message, timings *MessageDebugTimings, extraParams nodeExtraParams) (string, []byte, error) {
607
- return int.c.sendGroup(ctx, to, participants, id, message, timings, extraParams)
626
+ func (int *DangerousInternalClient) SendGroup(ctx context.Context, ownID, to types.JID, participants []types.JID, id types.MessageID, message *waE2E.Message, timings *MessageDebugTimings, extraParams nodeExtraParams) (string, []byte, error) {
627
+ return int.c.sendGroup(ctx, ownID, to, participants, id, message, timings, extraParams)
608
628
  }
609
629
 
610
630
  func (int *DangerousInternalClient) SendPeerMessage(ctx context.Context, to types.JID, id types.MessageID, message *waE2E.Message, timings *MessageDebugTimings) ([]byte, error) {
@@ -678,3 +698,11 @@ func (int *DangerousInternalClient) Usync(ctx context.Context, jids []types.JID,
678
698
  func (int *DangerousInternalClient) ParseBlocklist(node *waBinary.Node) *types.Blocklist {
679
699
  return int.c.parseBlocklist(node)
680
700
  }
701
+
702
+ func (int *DangerousInternalClient) ShouldIncludeReportingToken(message *waE2E.Message) bool {
703
+ return int.c.shouldIncludeReportingToken(message)
704
+ }
705
+
706
+ func (int *DangerousInternalClient) GetMessageReportingToken(msgProtobuf []byte, msg *waE2E.Message, senderJID, remoteJID types.JID, messageID types.MessageID) waBinary.Node {
707
+ return int.c.getMessageReportingToken(msgProtobuf, msg, senderJID, remoteJID, messageID)
708
+ }
@@ -46,6 +46,7 @@ func (cli *Client) keepAliveLoop(ctx context.Context) {
46
46
  if cli.EnableAutoReconnect && time.Since(lastSuccess) > KeepAliveMaxFailTime {
47
47
  cli.Log.Debugf("Forcing reconnect due to keepalive failure")
48
48
  cli.Disconnect()
49
+ cli.resetExpectedDisconnect()
49
50
  go cli.autoReconnect()
50
51
  }
51
52
  } else {