refactor to mautrix 0.17.x; update deps

This commit is contained in:
Aine
2024-02-11 20:47:04 +02:00
parent 0a9701f4c9
commit dd0ad4c245
237 changed files with 9091 additions and 3317 deletions

View File

@@ -1,3 +1,5 @@
//go:build !goolm
package olm
// #cgo LDFLAGS: -lolm -lstdc++
@@ -155,6 +157,7 @@ func (s *Session) Unpickle(pickled, key []byte) error {
return nil
}
// Deprecated
func (s *Session) GobEncode() ([]byte, error) {
pickled := s.Pickle(pickleKey)
length := base64.RawStdEncoding.DecodedLen(len(pickled))
@@ -163,6 +166,7 @@ func (s *Session) GobEncode() ([]byte, error) {
return rawPickled, err
}
// Deprecated
func (s *Session) GobDecode(rawPickled []byte) error {
if s == nil || s.int == nil {
*s = *NewBlankSession()
@@ -173,6 +177,7 @@ func (s *Session) GobDecode(rawPickled []byte) error {
return s.Unpickle(pickled, pickleKey)
}
// Deprecated
func (s *Session) MarshalJSON() ([]byte, error) {
pickled := s.Pickle(pickleKey)
quotes := make([]byte, len(pickled)+2)
@@ -182,6 +187,7 @@ func (s *Session) MarshalJSON() ([]byte, error) {
return quotes, nil
}
// Deprecated
func (s *Session) UnmarshalJSON(data []byte) error {
if len(data) == 0 || len(data) == 0 || data[0] != '"' || data[len(data)-1] != '"' {
return InputNotJSONString