Compare commits

...

9 Commits

Author SHA1 Message Date
Bram van den Heuvel 46a1d60957 Show documentation page v2 2024-01-25 15:02:26 +01:00
Bram van den Heuvel 49a8284034 Merge branch 'json-extra' into json-docs 2024-01-25 14:49:19 +01:00
Bram van den Heuvel ead65c07f5 Write object field documentation 2024-01-25 14:47:54 +01:00
Bram c3c08845d8 Merge branch 'develop' into json-extra 2024-01-23 13:43:05 +01:00
BramvdnHeuvel ef9b007730
Merge origin/develop-to-main to origin/develop
Develop to main for beta 2.1.1
2024-01-12 17:22:32 +01:00
Bram van den Heuvel 311de94c1f Bump to beta 2.1.1 2024-01-12 17:18:01 +01:00
Bram van den Heuvel 462aa3a2dc Fix test 2024-01-12 17:15:07 +01:00
BramvdnHeuvel cecf9c1f77
Merge pull request #11 from noordstar/settings-patch
Update syncTime to be at least 1
2024-01-12 17:12:24 +01:00
Bram van den Heuvel ad3f45d035 Update syncTime to be at least 1 2024-01-12 17:11:07 +01:00
6 changed files with 142 additions and 35 deletions

View File

@ -3,7 +3,7 @@
"name": "noordstar/elm-matrix-sdk-beta",
"summary": "Matrix SDK for instant communication. Unstable beta version for testing only.",
"license": "EUPL-1.1",
"version": "2.1.0",
"version": "2.1.1",
"exposed-modules": [
"Internal.Config.Default",
"Internal.Config.Leaks",

View File

@ -6845,11 +6845,66 @@ var $author$project$Internal$Tools$Json$field = {
}
};
var $author$project$Internal$Config$Text$fields = {
context: {accessToken: _List_Nil, baseUrl: _List_Nil, password: _List_Nil, refreshToken: _List_Nil, transaction: _List_Nil, username: _List_Nil, versions: _List_Nil},
envelope: {content: _List_Nil, context: _List_Nil, settings: _List_Nil},
event: {content: _List_Nil, eventId: _List_Nil, eventType: _List_Nil, originServerTs: _List_Nil, roomId: _List_Nil, sender: _List_Nil, stateKey: _List_Nil, unsigned: _List_Nil},
settings: {currentVersion: _List_Nil, deviceName: _List_Nil, syncTime: _List_Nil},
unsigned: {age: _List_Nil, prevContent: _List_Nil, redactedBecause: _List_Nil, transactionId: _List_Nil}
context: {
accessToken: _List_fromArray(
['The access token used for authentication with the Matrix server.']),
baseUrl: _List_fromArray(
['The base URL of the Matrix server.']),
password: _List_fromArray(
['The user\'s password for authentication purposes.']),
refreshToken: _List_fromArray(
['The token used to obtain a new access token upon expiration of the current access token.']),
transaction: _List_fromArray(
['A unique identifier for a transaction initiated by the user.']),
username: _List_fromArray(
['The username of the Matrix account.']),
versions: _List_fromArray(
['The versions of the Matrix protocol that are supported by the server.'])
},
envelope: {
content: _List_fromArray(
['The actual data or payload that is wrapped within the envelope.']),
context: _List_fromArray(
['The context information associated with the envelope, such as environment or session details.', 'In general, this data cannot be directly configured by the user.']),
settings: _List_fromArray(
['The configurable settings that affect how the enveloped data is handled or processed.'])
},
event: {
content: _List_fromArray(
['The body of this event, as created by the client which sent it.']),
eventId: _List_fromArray(
['The globally unique identifier for this event.']),
eventType: _List_fromArray(
['The type of the event.']),
originServerTs: _List_fromArray(
['Timestamp (in milliseconds since the unix epoch) on originating homeserver when this event was sent.']),
roomId: _List_fromArray(
['The ID of the room associated with this event.']),
sender: _List_fromArray(
['Contains the fully-qualified ID of the user who sent this event.']),
stateKey: _List_fromArray(
['Present if, and only if, this event is a state event. The key making this piece of state unique in the room. Note that it is often an empty string.', 'State keys starting with an @ are reserved for referencing user IDs, such as room members. With the exception of a few events, state events set with a given users ID as the state key MUST only be set by that user.']),
unsigned: _List_fromArray(
['Contains optional extra information about the event.'])
},
settings: {
currentVersion: _List_fromArray(
['Indicates the current version of the Elm SDK.']),
deviceName: _List_fromArray(
['Indicates the device name that is communicated to the Matrix API.']),
syncTime: _List_fromArray(
['Indicates the frequency in miliseconds with which the Elm SDK should long-poll the /sync endpoint.'])
},
unsigned: {
age: _List_fromArray(
['The time in milliseconds that has elapsed since the event was sent. This field is generated by the local homeserver, and may be incorrect if the local time on at least one of the two servers is out of sync, which can cause the age to either be negative or greater than it actually is.']),
prevContent: _List_fromArray(
['The previous content for this event. This field is generated by the local homeserver, and is only returned if the event is a state event, and the client has permission to see the previous content.']),
redactedBecause: _List_fromArray(
['The event that redacted this event, if any.']),
transactionId: _List_fromArray(
['The client-supplied transaction ID, for example, provided via PUT /_matrix/client/v3/rooms/{roomId}/send/{eventType}/{txnId}, if the client being given the event is the same one which sent it.'])
}
};
var $author$project$Internal$Tools$Json$DocsList = function (a) {
return {$: 'DocsList', a: a};
@ -7107,7 +7162,7 @@ var $author$project$Internal$Values$Settings$Settings = F3(
function (currentVersion, deviceName, syncTime) {
return {currentVersion: currentVersion, deviceName: deviceName, syncTime: syncTime};
});
var $author$project$Internal$Config$Default$currentVersion = 'beta 2.1.0';
var $author$project$Internal$Config$Default$currentVersion = 'beta 2.1.1';
var $author$project$Internal$Config$Default$deviceName = 'Elm SDK (' + ($author$project$Internal$Config$Default$currentVersion + ')');
var $elm$json$Json$Decode$map3 = _Json_map3;
var $author$project$Internal$Tools$Json$object3 = F4(

View File

@ -23,7 +23,7 @@ will assume until overriden by the user.
-}
currentVersion : String
currentVersion =
"beta 2.1.0"
"beta 2.1.1"
{-| The default device name that is being communicated with the Matrix API.

View File

@ -232,39 +232,91 @@ fields :
}
fields =
{ context =
{ accessToken = []
, baseUrl = []
, password = []
, refreshToken = []
, username = []
, transaction = []
, versions = []
{ accessToken =
[ "The access token used for authentication with the Matrix server."
]
, baseUrl =
[ "The base URL of the Matrix server."
]
, password =
[ "The user's password for authentication purposes."
]
, refreshToken =
[ "The token used to obtain a new access token upon expiration of the current access token."
]
, username =
[ "The username of the Matrix account."
]
, transaction =
[ "A unique identifier for a transaction initiated by the user."
]
, versions =
[ "The versions of the Matrix protocol that are supported by the server."
]
}
, envelope =
{ content = []
, context = []
, settings = []
{ content =
[ "The actual data or payload that is wrapped within the envelope."
]
, context =
[ "The context information associated with the envelope, such as environment or session details."
, "In general, this data cannot be directly configured by the user."
]
, settings =
[ "The configurable settings that affect how the enveloped data is handled or processed."
]
}
, event =
{ content = []
, eventId = []
, originServerTs = []
, roomId = []
, sender = []
, stateKey = []
, eventType = []
, unsigned = []
{ content =
[ "The body of this event, as created by the client which sent it."
]
, eventId =
[ "The globally unique identifier for this event."
]
, originServerTs =
[ "Timestamp (in milliseconds since the unix epoch) on originating homeserver when this event was sent."
]
, roomId =
[ "The ID of the room associated with this event."
]
, sender =
[ "Contains the fully-qualified ID of the user who sent this event."
]
, stateKey =
[ "Present if, and only if, this event is a state event. The key making this piece of state unique in the room. Note that it is often an empty string."
, "State keys starting with an @ are reserved for referencing user IDs, such as room members. With the exception of a few events, state events set with a given users ID as the state key MUST only be set by that user."
]
, eventType =
[ "The type of the event."
]
, unsigned =
[ "Contains optional extra information about the event."
]
}
, settings =
{ currentVersion = []
, deviceName = []
, syncTime = []
{ currentVersion =
[ "Indicates the current version of the Elm SDK."
]
, deviceName =
[ "Indicates the device name that is communicated to the Matrix API."
]
, syncTime =
[ "Indicates the frequency in miliseconds with which the Elm SDK should long-poll the /sync endpoint."
]
}
, unsigned =
{ age = []
, prevContent = []
, redactedBecause = []
, transactionId = []
{ age =
[ "The time in milliseconds that has elapsed since the event was sent. This field is generated by the local homeserver, and may be incorrect if the local time on at least one of the two servers is out of sync, which can cause the age to either be negative or greater than it actually is."
]
, prevContent =
[ "The previous content for this event. This field is generated by the local homeserver, and is only returned if the event is a state event, and the client has permission to see the previous content."
]
, redactedBecause =
[ "The event that redacted this event, if any."
]
, transactionId =
[ "The client-supplied transaction ID, for example, provided via PUT /_matrix/client/v3/rooms/{roomId}/send/{eventType}/{txnId}, if the client being given the event is the same one which sent it."
]
}
}

View File

@ -68,4 +68,4 @@ getSyncTime (Vault vault) =
-}
setSyncTime : Int -> Vault -> Vault
setSyncTime time (Vault vault) =
Vault <| Envelope.mapSettings (\s -> { s | syncTime = time }) vault
Vault <| Envelope.mapSettings (\s -> { s | syncTime = max 1 time }) vault

View File

@ -27,7 +27,7 @@ settings =
vault
|> Matrix.Settings.setSyncTime sync
|> Matrix.Settings.getSyncTime
|> Expect.equal sync
|> Expect.equal (max 1 sync)
)
]