Skip to content

Commit

Permalink
!fixup
Browse files Browse the repository at this point in the history
  • Loading branch information
Hywan committed Aug 28, 2024
1 parent 629e383 commit a55cf0f
Showing 1 changed file with 10 additions and 9 deletions.
19 changes: 10 additions & 9 deletions internal/api/rust/rust.go
Original file line number Diff line number Diff line change
Expand Up @@ -64,10 +64,11 @@ type RustClient struct {
func NewRustClient(t ct.TestLike, opts api.ClientCreationOpts) (api.Client, error) {
t.Logf("NewRustClient[%s][%s] creating...", opts.UserID, opts.DeviceID)
matrix_sdk_ffi.LogEvent("rust.go", &zero, matrix_sdk_ffi.LogLevelInfo, t.Name(), fmt.Sprintf("NewRustClient[%s][%s] creating...", opts.UserID, opts.DeviceID))
ab := matrix_sdk_ffi.NewClientBuilder()
.HomeserverUrl(opts.BaseURL)
.SlidingSyncVersionBuilder(&matrix_sdk_ffi.SlidingSyncVersionBuilderProxy{ Url: &opts.SlidingSyncURL })
.AutoEnableCrossSigning(true)
slidingSyncVersion := matrix_sdk_ffi.SlidingSyncVersionBuilderProxy{Url: opts.SlidingSyncURL}
ab := matrix_sdk_ffi.NewClientBuilder().
HomeserverUrl(opts.BaseURL).
SlidingSyncVersionBuilder(&slidingSyncVersion).
AutoEnableCrossSigning(true)
var clientSessionDelegate matrix_sdk_ffi.ClientSessionDelegate
if opts.EnableCrossProcessRefreshLockProcessName != "" {
t.Logf("enabling cross process refresh lock with proc name=%s", opts.EnableCrossProcessRefreshLockProcessName)
Expand All @@ -93,11 +94,11 @@ func NewRustClient(t ct.TestLike, opts api.ClientCreationOpts) (api.Client, erro
}
if opts.AccessToken != "" { // restore the session
session := matrix_sdk_ffi.Session{
AccessToken: opts.AccessToken,
UserId: opts.UserID,
DeviceId: opts.DeviceID,
HomeserverUrl: opts.BaseURL,
SlidingSyncProxy: &opts.SlidingSyncURL,
AccessToken: opts.AccessToken,
UserId: opts.UserID,
DeviceId: opts.DeviceID,
HomeserverUrl: opts.BaseURL,
SlidingSyncVersion: &slidingSyncVersion,
}
if err := client.RestoreSession(session); err != nil {
return nil, fmt.Errorf("RestoreSession: %s", err)
Expand Down

0 comments on commit a55cf0f

Please sign in to comment.