From 03381318aa3753e5766e59ae3fa27bea53b51229 Mon Sep 17 00:00:00 2001
From: Alexandre Morignot This event represents a StrippedState event. It is used in This type is used to represents many distinct stripped state events.
+To distinguish them you must check the This event represents a StrippedState event. "room_id" is not set in events returned from the sync API, so we need to set it up ourself. "room_id" is not set in events returned from the sync API, so we need to set it up ourself. This event represents a StrippedState event. It is used in This type is used to represents many distinct stripped state events.
+To distinguish them you must check the "room_id" is not set in events returned from the sync API, so we need to
+set it up ourself. "room_id" is not set in events returned from the sync API, so we need to
+set it up ourself. This object allow you to register listeners to be executed when some events
+are received. This avoid you to have to parse the whole Events sent to listeners are Now we can create a new channel, and tell the connection object to start syncing.
The sync responses will be streamed in the channel. You have now a sync response. If you don't want to go through the whole sync response by yourself (which is
understandable), we provide you a Caridina::Syncer object.
- main
+ main-dev
@@ -211,11 +211,6 @@
-
Defined in:
-
-
- caridina.cr
-
-
-
-
-
-
- connection.cr
-
-
-
-
-
-
- errors.cr
-
-
-
-
-
-
- events/base.cr
-
-
-
-
@@ -539,7 +516,7 @@
"0.3.1"
+ VERSION = "0.4.0"
- main
+ main-dev
@@ -211,11 +211,6 @@
-
Defined in:
-
-
- connection.cr
-
-
-
-
@@ -601,8 +599,6 @@
- main
+ main-dev
@@ -211,11 +211,6 @@
-
Defined in:
-
-
- connection.cr
-
-
-
-
diff --git a/docs/Caridina/ConnectionImpl.html b/docs/Caridina/ConnectionImpl.html
index c33b960..6ddca0a 100644
--- a/docs/Caridina/ConnectionImpl.html
+++ b/docs/Caridina/ConnectionImpl.html
@@ -4,7 +4,7 @@
-
+
@@ -18,7 +18,7 @@
-
- main
+ main-dev
@@ -211,11 +211,6 @@
-
Defined in:
-
-
- connection.cr
-
-
-
-
@@ -725,8 +723,6 @@
- main
+ main-dev
@@ -211,11 +211,6 @@
-
Defined in:
-
-
- errors.cr
-
-
-
-
diff --git a/docs/Caridina/Errors/RateLimited.html b/docs/Caridina/Errors/RateLimited.html
index 0de76de..08eea46 100644
--- a/docs/Caridina/Errors/RateLimited.html
+++ b/docs/Caridina/Errors/RateLimited.html
@@ -4,7 +4,7 @@
-
+
@@ -18,7 +18,7 @@
-
- main
+ main-dev
@@ -211,11 +211,6 @@
-
Defined in:
-
-
- errors.cr
-
-
-
-
@@ -601,8 +599,6 @@
- main
+ main-dev
@@ -211,11 +211,6 @@
-
Defined in:
-
-
- events/base.cr
-
-
-
-
-
-
- events/modules/instant_messaging.cr
-
-
-
-
-
-
- events/room_events.cr
-
-
-
-
-
-
- events/state_events.cr
-
-
-
-
diff --git a/docs/Caridina/Events/CanonicalAlias.html b/docs/Caridina/Events/CanonicalAlias.html
index 631c9d4..8b62f99 100644
--- a/docs/Caridina/Events/CanonicalAlias.html
+++ b/docs/Caridina/Events/CanonicalAlias.html
@@ -4,7 +4,7 @@
-
+
@@ -18,7 +18,7 @@
-
- main
+ main-dev
@@ -211,11 +211,6 @@
-
Defined in:
-
-
- events/state_events.cr
-
-
-
-
@@ -710,8 +708,6 @@
- main
+ main-dev
@@ -211,11 +211,6 @@
-
Defined in:
-
-
- events/state_events.cr
-
-
-
-
@@ -634,8 +632,6 @@
- main
+ main-dev
@@ -211,11 +211,6 @@
-
Defined in:
-
-
- events/state_events.cr
-
-
-
-
diff --git a/docs/Caridina/Events/Create.html b/docs/Caridina/Events/Create.html
index 6658eca..264dc65 100644
--- a/docs/Caridina/Events/Create.html
+++ b/docs/Caridina/Events/Create.html
@@ -4,7 +4,7 @@
-
+
@@ -18,7 +18,7 @@
-
- main
+ main-dev
@@ -211,11 +211,6 @@
-
Defined in:
-
-
- events/state_events.cr
-
-
-
-
@@ -710,8 +708,6 @@
- main
+ main-dev
@@ -211,11 +211,6 @@
-
Defined in:
-
-
- events/state_events.cr
-
-
-
-
@@ -644,8 +642,6 @@
- main
+ main-dev
@@ -211,11 +211,6 @@
-
Defined in:
-
-
- events/state_events.cr
-
-
-
-
@@ -630,8 +628,6 @@
- main
+ main-dev
@@ -211,11 +211,6 @@
-
Defined in:
-
-
- events/state_events.cr
-
-
-
-
diff --git a/docs/Caridina/Events/Event.html b/docs/Caridina/Events/Event.html
index 3ede914..090b49f 100644
--- a/docs/Caridina/Events/Event.html
+++ b/docs/Caridina/Events/Event.html
@@ -4,7 +4,7 @@
-
+
@@ -18,7 +18,7 @@
-
- main
+ main-dev
@@ -211,11 +211,6 @@
-
Defined in:
-
-
- events/base.cr
-
-
-
-
@@ -647,8 +647,6 @@
- main
+ main-dev
@@ -211,11 +211,6 @@
-
Defined in:
-
-
- events/base.cr
-
-
-
-
@@ -643,8 +641,6 @@
- main
+ main-dev
@@ -211,11 +211,6 @@
-
Defined in:
-
-
- events/base.cr
-
-
-
-
@@ -635,8 +633,6 @@
- main
+ main-dev
@@ -211,11 +211,6 @@
-
Defined in:
-
-
- events/state_events.cr
-
-
-
-
@@ -710,8 +708,6 @@
- main
+ main-dev
@@ -211,11 +211,6 @@
-
Defined in:
-
-
- events/state_events.cr
-
-
-
-
@@ -629,8 +627,6 @@
- main
+ main-dev
@@ -211,11 +211,6 @@
-
Defined in:
-
-
- events/state_events.cr
-
-
-
-
@@ -645,8 +643,6 @@
- main
+ main-dev
@@ -211,11 +211,6 @@
-
Defined in:
-
-
- events/state_events.cr
-
-
-
-
diff --git a/docs/Caridina/Events/MSC2676.html b/docs/Caridina/Events/MSC2676.html
new file mode 100644
index 0000000..fee956a
--- /dev/null
+++ b/docs/Caridina/Events/MSC2676.html
@@ -0,0 +1,511 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ module Caridina::Events::MSC2676
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Defined in:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ module Caridina::Events::MSC2676::Message
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Defined in:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ module Caridina::Events::MSC2676::Message::Content
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Included Modules
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Direct including types
+
+
+
+
+
+
+
+
+
+
+ Defined in:
+
+
+
+
+
+
+
+
+
+
+
+ Constructors
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Instance Method Summary
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Constructor Detail
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Instance Method Detail
+
+
+
+
+
+
+
+
+
+
+ class Caridina::Events::MSC2676::Message::Text
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Included Modules
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Defined in:
+
+
+
+
+
+
+
+
+
+
+
+ Constructors
+
+
+
+
+
+
+
+
+
+
+
+
+
+Instance methods inherited from module
+
+
+
+ new_content : Events::Message::Content
+ new_content
+
+
+
+
+
+
+ Caridina::Events::MSC2676::Message::Content
Constructor methods inherited from module
+
+
+
+ new(pull : JSON::PullParser)
+ new
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Caridina::Events::MSC2676::Message::Content
Instance methods inherited from class
+
+
+
+ format : String?
+ format,
+
+
+
+ formatted_body : String?
+ formatted_body
+
+
+
+
+
+
+ Caridina::Events::Message::Text
Constructor methods inherited from class
+
+
+
+ new(body, formatted_body)Caridina::Events::Message::Text
new(pull : JSON::PullParser)
+ new
+
+
+
+
+
+
+
+
+
+
+ Instance methods inherited from class
+
+
+
+ body : String
+ body,
+
+
+
+ msgtype : String
+ msgtype
+
+
+
+
+
+
+ Caridina::Events::Message::Content
Constructor methods inherited from class
+
+
+
+ new(pull : JSON::PullParser)
+ new
+
+
+
+
+
+
+
+
+
+
+ Caridina::Events::Message::Content
Instance methods inherited from class
+
+
+
+ relates_to : RelatesTo?
+ relates_to
+
+
+
+
+
+
+ Caridina::Events::Event::Content
Constructor methods inherited from class
+
+
+
+ new(pull : JSON::PullParser)
+ new
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+Caridina::Events::Event::Content
+
+
+
+ Constructor Detail
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ class Caridina::Events::MSC2676::MessageEdit
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Defined in:
+
+
+
+
+
+
+
+
+
+
+
+ Constructors
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Instance Method Summary
+
+
+
+
+
+
+
+
+
+Instance methods inherited from class
+
+
+
+ content : Content
+ content,
+
+
+
+ unsigned : UnsignedData?
+ unsigned
+
+
+
+
+
+
+ Caridina::Events::Message
Constructor methods inherited from class
+
+
+
+ new(pull : JSON::PullParser)
+ new
+
+
+
+
+
+
+
+
+
+
+ Caridina::Events::Message
Instance methods inherited from class
+
+
+
+ event_id : String
+ event_id,
+
+
+
+ origin_server_ts : UInt64
+ origin_server_ts,
+
+
+
+ room_id : String?
+ room_id,
+
+
+
+ sender : String
+ sender
+
+
+
+
+
+
+ Caridina::Events::RoomEvent
Constructor methods inherited from class
+
+
+
+ new(pull : JSON::PullParser)
+ new
+
+
+
+
+
+
+
+
+
+
+ Caridina::Events::RoomEvent
Instance methods inherited from class
+
+
+
+ type : String
+ type
+
+
+
+
+
+
+ Caridina::Events::Event
Constructor methods inherited from class
+
+
+
+ new(pull : JSON::PullParser)
+ new
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+Caridina::Events::Event
+
+
+
+ Constructor Detail
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Instance Method Detail
+
+
+
+
+
+
+
+
+
+
+ class Caridina::Events::MSC2676::MessageEdit::Content
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Defined in:
+
+
+
+
+
+
+
+
+
+
+
+ Constructors
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Instance Method Summary
+
+
+
+
+
+
+
+
+
+Instance methods inherited from class
+
+
+
+ body : String
+ body,
+
+
+
+ msgtype : String
+ msgtype
+
+
+
+
+
+
+ Caridina::Events::Message::Content
Constructor methods inherited from class
+
+
+
+ new(pull : JSON::PullParser)
+ new
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Caridina::Events::Message::Content
Constructor methods inherited from class
+
+
+
+ new(pull : JSON::PullParser)
+ new
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+Caridina::Events::Event::Content
+
+
+
+ Constructor Detail
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Instance Method Detail
+
+
+
+
+
+
+
+
+
+
+
+
+ class Caridina::Events::MSC2676::RedactionEdit
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Defined in:
+
+
+
+
+
+
+
+
+
+
+
+ Constructors
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Instance Method Summary
+
+
+
+
+
+
+
+
+
+Instance methods inherited from class
+
+
+
+ content : Content
+ content,
+
+
+
+ unsigned : UnsignedData?
+ unsigned
+
+
+
+
+
+
+ Caridina::Events::Redaction
Constructor methods inherited from class
+
+
+
+ new(pull : JSON::PullParser)
+ new
+
+
+
+
+
+
+
+
+
+
+ Caridina::Events::Redaction
Instance methods inherited from class
+
+
+
+ event_id : String
+ event_id,
+
+
+
+ origin_server_ts : UInt64
+ origin_server_ts,
+
+
+
+ room_id : String?
+ room_id,
+
+
+
+ sender : String
+ sender
+
+
+
+
+
+
+ Caridina::Events::RoomEvent
Constructor methods inherited from class
+
+
+
+ new(pull : JSON::PullParser)
+ new
+
+
+
+
+
+
+
+
+
+
+ Caridina::Events::RoomEvent
Instance methods inherited from class
+
+
+
+ type : String
+ type
+
+
+
+
+
+
+ Caridina::Events::Event
Constructor methods inherited from class
+
+
+
+ new(pull : JSON::PullParser)
+ new
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+Caridina::Events::Event
+
+
+
+ Constructor Detail
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Instance Method Detail
+
+
+
+
+
+
+
+
+
+
+ class Caridina::Events::MSC2676::RedactionEdit::Content
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Defined in:
+
+
+
+
+
+
+
+
+
+
+
+ Constructors
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Instance Method Summary
+
+
+
+
+
+
+
+
+
+Instance methods inherited from class
+
+
+
+ reason : String?
+ reason
+
+
+
+
+
+
+ Caridina::Events::Redaction::Content
Constructor methods inherited from class
+
+
+
+ new(pull : JSON::PullParser)
+ new
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Caridina::Events::Redaction::Content
Constructor methods inherited from class
+
+
+
+ new(pull : JSON::PullParser)
+ new
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+Caridina::Events::Event::Content
+
+
+
+ Constructor Detail
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Instance Method Detail
+
+
+
+
+
+
+
+
+
+
+
+
+ class Caridina::Events::MSC2676::RelatesTo
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Included Modules
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Defined in:
+
+
+
+
+
+
+
+
+
+
+
+ Constructors
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Instance Method Summary
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Constructor Detail
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Instance Method Detail
+
+
+
+
+
+
+
+
+
+
+
+
+ class Caridina::Events::MSC2676::RoomEventEdit
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Defined in:
+
+
+
+
+
+
+
+
+
+
+
+ Constructors
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Instance Method Summary
+
+
+
+
+
+
+
+
+
+Instance methods inherited from class
+
+
+
+ event_id : String
+ event_id,
+
+
+
+ origin_server_ts : UInt64
+ origin_server_ts,
+
+
+
+ room_id : String?
+ room_id,
+
+
+
+ sender : String
+ sender
+
+
+
+
+
+
+ Caridina::Events::RoomEvent
Constructor methods inherited from class
+
+
+
+ new(pull : JSON::PullParser)
+ new
+
+
+
+
+
+
+
+
+
+
+ Caridina::Events::RoomEvent
Instance methods inherited from class
+
+
+
+ type : String
+ type
+
+
+
+
+
+
+ Caridina::Events::Event
Constructor methods inherited from class
+
+
+
+ new(pull : JSON::PullParser)
+ new
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+Caridina::Events::Event
+
+
+
+ Constructor Detail
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Instance Method Detail
+
+
+
+
+
+
+
+
+
+
+
+
+ class Caridina::Events::MSC2676::RoomEventEdit::Content
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Defined in:
+
+
+
+
+
+
+
+
+
+
+
+ Constructors
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Instance Method Summary
+
+
+
+
+
+
+
+
+
+Constructor methods inherited from class
+
+
+
+ new(pull : JSON::PullParser)
+ new
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+Caridina::Events::Event::Content
+
+
+
+ Constructor Detail
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Instance Method Detail
+
+
+
+
+
+
+
+
+
+
+
+
+ struct Caridina::Events::MSC2676::RoomEventEdit::UnsignedData
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Defined in:
+
+
+
+
+
+
+
+
+
+
+
+ Constructors
+
+
+
+
+
+
+
+
+
+
+
+
+
+Instance methods inherited from struct
+
+
+
+ age : Int64
+ age,
+
+
+
+ transaction_id : String?
+ transaction_id
+
+
+
+
+
+
+ Caridina::Events::RoomEvent::UnsignedData
Constructor methods inherited from struct
+
+
+
+ new(pull : JSON::PullParser)
+ new
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+Caridina::Events::RoomEvent::UnsignedData
+
+
+
+ Constructor Detail
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ class Caridina::Events::MSC2676::UnknownEdit
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Defined in:
+
+
+
+
+
+
+
+
+
+
+
+ Constructors
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Instance Method Summary
+
+
+
+
+
+
+
+
+
+Instance methods inherited from class
+
+
+
+ content : Content?
+ content
+
+
+
+
+
+
+ Caridina::Events::Unknown
Constructor methods inherited from class
+
+
+
+ new(pull : JSON::PullParser)
+ new
+
+
+
+
+
+
+
+
+
+
+ Caridina::Events::Unknown
Instance methods inherited from class
+
+
+
+ type : String
+ type
+
+
+
+
+
+
+ Caridina::Events::Event
Constructor methods inherited from class
+
+
+
+ new(pull : JSON::PullParser)
+ new
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+Caridina::Events::Event
+
+
+
+ Constructor Detail
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Instance Method Detail
+
+
+
+
+
+
+
+
+
+
+ class Caridina::Events::MSC2676::UnknownEdit::Content
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Defined in:
+
+
+
+
+
+
+
+
+
+
+
+ Constructors
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Instance Method Summary
+
+
+
+
+
+
+
+
+
+Constructor methods inherited from class
+
+
+
+ new(pull : JSON::PullParser)
+ new
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Caridina::Events::Unknown::Content
Constructor methods inherited from class
+
+
+
+ new(pull : JSON::PullParser)
+ new
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+Caridina::Events::Event::Content
+
+
+
+ Constructor Detail
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Instance Method Detail
+
+
+
+
+
+
+
+
+
+
+
- main
+ main-dev
@@ -211,11 +211,6 @@
-
Defined in:
-
-
- events/state_events.cr
-
-
-
-
@@ -710,8 +708,6 @@
- main
+ main-dev
@@ -211,11 +211,6 @@
-
Defined in:
-
-
- events/state_events.cr
-
-
-
-
@@ -649,8 +647,6 @@
- main
+ main-dev
@@ -211,11 +211,6 @@
-
Defined in:
-
-
- events/state_events.cr
-
-
-
-
@@ -625,8 +623,6 @@
- main
+ main-dev
@@ -211,11 +211,6 @@
-
Defined in:
-
-
- events/state_events.cr
-
-
-
-
@@ -655,8 +653,6 @@
- main
+ main-dev
@@ -211,11 +211,6 @@
-
Defined in:
-
-
- events/state_events.cr:47
-
-
-
-
-
-
- events/state_events.cr:62
-
-
-
-
@@ -675,8 +666,6 @@
- main
+ main-dev
@@ -211,11 +211,6 @@
-
Defined in:
-
-
- events/modules/instant_messaging.cr
-
-
-
-
@@ -682,8 +680,6 @@
- main
+ main-dev
@@ -211,11 +211,6 @@
-
Defined in:
-
-
- events/modules/instant_messaging.cr
-
-
-
-
@@ -650,8 +648,6 @@
- main
+ main-dev
@@ -211,11 +211,6 @@
-
Defined in:
-
-
- events/modules/instant_messaging.cr
-
-
-
-
diff --git a/docs/Caridina/Events/Message/MSC2676/Content.html b/docs/Caridina/Events/Message/MSC2676/Content.html
index 2a2fb30..aff59e1 100644
--- a/docs/Caridina/Events/Message/MSC2676/Content.html
+++ b/docs/Caridina/Events/Message/MSC2676/Content.html
@@ -4,7 +4,7 @@
-
+
@@ -18,7 +18,7 @@
-
- main
+ main-dev
@@ -211,11 +211,6 @@
-
Defined in:
-
-
- events/modules/instant_messaging.cr
-
-
-
-
@@ -570,8 +568,6 @@
- main
+ main-dev
@@ -211,11 +211,6 @@
-
Defined in:
-
-
- events/modules/instant_messaging.cr
-
-
-
-
@@ -716,8 +714,6 @@
- main
+ main-dev
@@ -211,11 +211,6 @@
-
Defined in:
-
-
- events/modules/instant_messaging.cr
-
-
-
-
@@ -699,8 +697,6 @@
- main
+ main-dev
@@ -211,11 +211,6 @@
-
Defined in:
-
-
- events/modules/instant_messaging.cr
-
-
-
-
@@ -645,8 +643,6 @@
- main
+ main-dev
@@ -211,11 +211,6 @@
-
Defined in:
-
-
- events/modules/instant_messaging.cr
-
-
-
-
diff --git a/docs/Caridina/Events/PowerLevels.html b/docs/Caridina/Events/PowerLevels.html
index 615bdc0..7175d35 100644
--- a/docs/Caridina/Events/PowerLevels.html
+++ b/docs/Caridina/Events/PowerLevels.html
@@ -4,7 +4,7 @@
-
+
@@ -18,7 +18,7 @@
-
- main
+ main-dev
@@ -211,11 +211,6 @@
-
Defined in:
-
-
- events/state_events.cr
-
-
-
-
@@ -710,8 +708,6 @@
- main
+ main-dev
@@ -211,11 +211,6 @@
-
Defined in:
-
-
- events/state_events.cr
-
-
-
-
@@ -674,8 +672,6 @@
- main
+ main-dev
@@ -211,11 +211,6 @@
-
Defined in:
-
-
- events/state_events.cr
-
-
-
-
@@ -625,8 +623,6 @@
- main
+ main-dev
@@ -211,11 +211,6 @@
-
Defined in:
-
-
- events/state_events.cr
-
-
-
-
diff --git a/docs/Caridina/Events/Redaction.html b/docs/Caridina/Events/Redaction.html
index c95d94a..cf9a2f2 100644
--- a/docs/Caridina/Events/Redaction.html
+++ b/docs/Caridina/Events/Redaction.html
@@ -4,7 +4,7 @@
-
+
@@ -18,7 +18,7 @@
-
- main
+ main-dev
@@ -211,11 +211,6 @@
-
Defined in:
-
-
- events/room_events.cr
-
-
-
-
@@ -682,8 +680,6 @@
- main
+ main-dev
@@ -211,11 +211,6 @@
-
Defined in:
-
-
- events/room_events.cr
-
-
-
-
@@ -629,8 +627,6 @@
- main
+ main-dev
@@ -211,11 +211,6 @@
-
Defined in:
-
-
- events/room_events.cr
-
-
-
-
diff --git a/docs/Caridina/Events/RoomEvent.html b/docs/Caridina/Events/RoomEvent.html
index 7de0704..7f0b28c 100644
--- a/docs/Caridina/Events/RoomEvent.html
+++ b/docs/Caridina/Events/RoomEvent.html
@@ -4,7 +4,7 @@
-
+
@@ -18,7 +18,7 @@
-
- main
+ main-dev
@@ -211,11 +211,6 @@
-
Defined in:
-
-
- events/room_events.cr
-
-
-
-
@@ -671,8 +669,6 @@
- main
+ main-dev
@@ -211,11 +211,6 @@
-
Defined in:
-
-
- events/room_events.cr
-
-
-
-
@@ -656,8 +654,6 @@
- main
+ main-dev
@@ -211,11 +211,6 @@
-
Defined in:
-
-
- events/state_events.cr
-
-
-
-
@@ -699,8 +697,6 @@
+
+ class Caridina::Events::StrippedState
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Overview
+
+
+ Member
event and in Responses::Sync
in invited rooms's state.
+It is actually a state event, but it does not inherit from StateEvent
as
+some fields are not presents.#content
's type.
+
+
+
+ Included Modules
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Defined in:
+
+
+
+
+
+
+
+
+
+
+
+ Constructors
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Instance Method Summary
+
+
+
+
+
+
+
+
+
+Instance methods inherited from class
+
+
+
+ type : String
+ type
+
+
+
+
+
+
+ Caridina::Events::Event
Constructor methods inherited from class
+
+
+
+ new(pull : JSON::PullParser)
+ new
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+Caridina::Events::Event
+
+
+
+ Constructor Detail
+
+
+ Member
event and in Responses::Sync
in invited rooms's state.
+It is actually a state event, but it does not inherit from StateEvent
as
+some fields are not presents.#content
's type.
+
+
+
+
+ Instance Method Detail
+
+
+
+
+
+
+
- main
+ main-dev
@@ -211,11 +211,6 @@
-
Defined in:
-
-
- events/base.cr
-
-
-
-
diff --git a/docs/Caridina/Events/Unknown.html b/docs/Caridina/Events/Unknown.html
index 02121f1..bb6a15f 100644
--- a/docs/Caridina/Events/Unknown.html
+++ b/docs/Caridina/Events/Unknown.html
@@ -4,7 +4,7 @@
-
+
@@ -18,7 +18,7 @@
-
- main
+ main-dev
@@ -211,11 +211,6 @@
-
Defined in:
-
-
- events/base.cr
-
-
-
-
@@ -536,7 +534,7 @@
@@ -492,13 +497,6 @@
Instance Method Detail
-
- main
+ main-dev
-
Defined in:
-
-
- events/base.cr
-
-
-
-
@@ -612,8 +610,6 @@
- main
+ main-dev
@@ -211,11 +211,6 @@
-
Defined in:
-
-
- responses/base.cr
-
-
-
-
-
-
- responses/filter.cr
-
-
-
-
-
-
- responses/send.cr
-
-
-
-
-
-
- responses/sync.cr
-
-
-
-
-
-
- responses/whoami.cr
-
-
-
-
diff --git a/docs/Caridina/Responses/Filter.html b/docs/Caridina/Responses/Filter.html
index a47b515..e1f5791 100644
--- a/docs/Caridina/Responses/Filter.html
+++ b/docs/Caridina/Responses/Filter.html
@@ -4,7 +4,7 @@
-
+
@@ -18,7 +18,7 @@
-
- main
+ main-dev
@@ -211,11 +211,6 @@
-
Defined in:
-
-
- responses/filter.cr
-
-
-
-
@@ -630,8 +628,6 @@
- main
+ main-dev
@@ -211,11 +211,6 @@
-
Defined in:
-
-
- responses/base.cr
-
-
-
-
@@ -628,8 +626,6 @@
- main
+ main-dev
@@ -211,11 +211,6 @@
-
Defined in:
-
-
- responses/send.cr
-
-
-
-
@@ -630,8 +628,6 @@
- main
+ main-dev
@@ -211,11 +211,6 @@
-
Defined in:
-
-
- responses/sync.cr
-
-
-
-
@@ -635,8 +633,6 @@
- main
+ main-dev
@@ -211,11 +211,6 @@
-
Defined in:
-
-
- responses/sync.cr
-
-
-
-
@@ -550,7 +548,7 @@
@@ -506,13 +511,6 @@
Instance Method Detail
-
- main
+ main-dev
-
Defined in:
-
-
- responses/sync.cr
-
-
-
-
@@ -625,8 +623,6 @@
- main
+ main-dev
@@ -211,11 +211,6 @@
-
Defined in:
-
-
- responses/sync.cr
-
-
-
-
@@ -625,8 +623,6 @@
- main
+ main-dev
@@ -211,11 +211,6 @@
-
Defined in:
-
-
- responses/sync.cr
-
-
-
-
@@ -630,8 +628,6 @@
- main
+ main-dev
@@ -211,11 +211,6 @@
-
Defined in:
-
-
- responses/sync.cr
-
-
-
-
@@ -625,8 +623,6 @@
- main
+ main-dev
@@ -211,11 +211,6 @@
-
Defined in:
-
-
- responses/whoami.cr
-
-
-
-
@@ -630,8 +628,6 @@
- main
+ main-dev
@@ -211,11 +211,6 @@
-
+
+
+
+
+ Overview
+
+
+ Responses::Sync
.
+However #process_response
must be called with a Responses::Sync
manually.
+This allow you to control precisely when you want to handle events.
+
+syncer = Caridina::Syncer.new
+syncer.on(Caridina::Events::Message) do |event|
+ # TODO: actually do something
+end
+
+syncer.process_response(sync)
Events::Event
objects.
+You should use a type restriction in order to access all their fields.
Defined in:
-
-
- syncer.cr
-
-
-
-
@@ -519,7 +543,7 @@
@@ -478,7 +483,7 @@
Instance Method Detail
-
- main
+ main-dev
@@ -211,11 +211,6 @@
-
Alias Definition
- Caridina::Events::Event -> Nil
+ Caridina::Events::Event, Caridina::Syncer::Source -> Nil
@@ -500,13 +505,6 @@
Defined in:
-
-
- syncer.cr
-
-
-
-
diff --git a/docs/Caridina/Syncer/Source.html b/docs/Caridina/Syncer/Source.html
new file mode 100644
index 0000000..a2597d7
--- /dev/null
+++ b/docs/Caridina/Syncer/Source.html
@@ -0,0 +1,669 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ enum Caridina::Syncer::Source
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Defined in:
+
+
+
+
+
+
+
+
+
+
+ Enum Members
+
+
+
+
+
+
+
+
+
+
+
+
+ 1
+ 2
+
+
+
+
+ Instance Method Summary
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Instance Method Detail
+
+
+
+
+
+
+
+
+
+
+
+
+
- main
+ main-dev
@@ -211,11 +211,6 @@
-
matrix = Channel(Caridina::Events::Sync).new
+
+sync = matrix.receivematrix = Channel(Caridina::Events::Sync).new
conn.sync(matrix)
-sync = matrix.receive
syncer = Caridina::Syncer.new
-syncer.on(Caridina::Events::Message) do |event|
- # TODO: actually do something
-end
+
@@ -557,20 +562,20 @@ syncer = Caridina::Syncer.new
+syncer.on(Caridina::Events::Message) do |event|
+ # TODO: actually do something
+end
syncer.process_response(sync)
will be
Caridina::Events::Event
objects. You need to restrict the type of an event
object to access all its fields.
sync.rooms.try &.join.each do |room_id, room|
- room.timeline.events.each do |event|
- case event
- when Caridina::Events::Member
- # someone's membership changed
- when Caridina:: Events::PowerLevels
- # some authorization changed
- when Caridina::Events::Messages
- # someone talked
- else
- # unknown event
- end
- end
-end
+sync.rooms.try &.join.each do |room_id, room|
+ room.timeline.events.each do |event|
+ case event
+ when Caridina::Events::Member
+ # someone's membership changed
+ when Caridina:: Events::PowerLevels
+ # some authorization changed
+ when Caridina::Events::Messages
+ # someone talked
+ else
+ # unknown event
+ end
+ end
+end
Sometimes the event's content can be polymorphic too. That is especially the case for message events. @@ -590,12 +595,12 @@
:warning: This part is in a very early stage. > Currently only a few methods are provided.-
# join a room
-conn.join("!room_id:matrix.org")
-# send a message
-event_id = conn.send_message("!room_id:matrix.org", "Hello, wurld!")
-# edit a message
-conn.edit_message("!room_id:matrix.org", "Hello, world!"))
+# join a room
+conn.join("!room_id:matrix.org")
+# send a message
+event_id = conn.send_message("!room_id:matrix.org", "Hello, wurld!")
+# edit a message
+conn.edit_message("!room_id:matrix.org", "Hello, world!"))