Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Matrix Ruby SDK
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Analyze
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Alexander Olofsson
Matrix Ruby SDK
Commits
91d8aff2
Verified
Commit
91d8aff2
authored
6 years ago
by
Alexander Olofsson
Browse files
Options
Downloads
Patches
Plain Diff
client: Add IS client for future use
parent
c2760484
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
lib/matrix_sdk/client.rb
+9
-0
9 additions, 0 deletions
lib/matrix_sdk/client.rb
with
9 additions
and
0 deletions
lib/matrix_sdk/client.rb
+
9
−
0
View file @
91d8aff2
...
@@ -17,6 +17,14 @@ module MatrixSdk
...
@@ -17,6 +17,14 @@ module MatrixSdk
:access_token
,
:access_token
=
,
:device_id
,
:device_id
=
,
:homeserver
,
:homeserver
=
,
:access_token
,
:access_token
=
,
:device_id
,
:device_id
=
,
:homeserver
,
:homeserver
=
,
:validate_certificate
,
:validate_certificate
=
:validate_certificate
,
:validate_certificate
=
def
self
.
new_for_domain
(
domain
,
**
params
)
api
=
MatrixSdk
::
Api
.
new_for_domain
(
domain
,
keep_wellknown:
true
)
return
new
(
api
,
params
)
unless
api
.
well_known
.
key?
'm.identity_server'
identity_server
=
api
.
new
(
api
.
well_know
[
'm.identity_server'
][
'base_url'
],
protocols:
%i[IS]
)
new
(
api
,
params
.
merge
(
identity_server:
identity_server
))
end
# @param hs_url [String,URI,Api] The URL to the Matrix homeserver, without the /_matrix/ part, or an existing Api instance
# @param hs_url [String,URI,Api] The URL to the Matrix homeserver, without the /_matrix/ part, or an existing Api instance
# @param client_cache [:all,:some,:none] (:all) How much data should be cached in the client
# @param client_cache [:all,:some,:none] (:all) How much data should be cached in the client
# @param params [Hash] Additional parameters on creation
# @param params [Hash] Additional parameters on creation
...
@@ -40,6 +48,7 @@ module MatrixSdk
...
@@ -40,6 +48,7 @@ module MatrixSdk
@rooms
=
{}
@rooms
=
{}
@users
=
{}
@users
=
{}
@cache
=
client_cache
@cache
=
client_cache
@identity_server
=
params
.
fetch
(
:identity_server
,
nil
)
@sync_token
=
nil
@sync_token
=
nil
@sync_thread
=
nil
@sync_thread
=
nil
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment