chatrix 1.4.0 → 1.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/chatrix/room.rb +12 -11
- data/lib/chatrix/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5db74eaefe6dd15ac8e203ba5e5e9ecf2a635fba
|
4
|
+
data.tar.gz: 5828abb85550bdabf09aaa73cc2917ba9da163bc
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b2cc62457497305463a1e52b1463979e308a304da748cb1aa464e9023ff60195360c694d5609b2d1fc181daf5069221a4c9e6433044eb9c7f18440cab89c51d8
|
7
|
+
data.tar.gz: 855f3e932b52a8fd4a2afd3426abf14299577b55856f5d958c61efb62fb337f0fa1ce05d2f8bf589642e18ca6a4c4c15681a1cd483452e7cc9747be2fdc48c7c
|
data/lib/chatrix/room.rb
CHANGED
@@ -12,6 +12,8 @@ module Chatrix
|
|
12
12
|
class Room
|
13
13
|
include Wisper::Publisher
|
14
14
|
|
15
|
+
extend Forwardable
|
16
|
+
|
15
17
|
# @return [String] The ID of this room.
|
16
18
|
attr_reader :id
|
17
19
|
|
@@ -28,6 +30,15 @@ module Chatrix
|
|
28
30
|
# @return [Messaging] Handle various message actions through this object.
|
29
31
|
attr_reader :messaging
|
30
32
|
|
33
|
+
def_delegators :state, :canonical_alias, :name, :topic, :creator,
|
34
|
+
:guest_access, :join_rule, :history_visibility, :permissions,
|
35
|
+
:member?
|
36
|
+
|
37
|
+
def_delegators :admin, :join, :leave, :kick, :ban, :unban
|
38
|
+
|
39
|
+
def_delegators :messaging, :send_message, :send_notice, :send_emote,
|
40
|
+
:send_html
|
41
|
+
|
31
42
|
# Initializes a new Room instance.
|
32
43
|
#
|
33
44
|
# @param id [String] The room ID.
|
@@ -42,18 +53,8 @@ module Chatrix
|
|
42
53
|
@timeline = Components::Timeline.new self, @users
|
43
54
|
@messaging = Components::Messaging.new self, @matrix
|
44
55
|
@admin = Components::Admin.new self, @matrix
|
45
|
-
end
|
46
|
-
|
47
|
-
# Convenience method to get the canonical alias from this room's state.
|
48
|
-
# @return [String] The canonical alias for this room.
|
49
|
-
def canonical_alias
|
50
|
-
@state.canonical_alias
|
51
|
-
end
|
52
56
|
|
53
|
-
|
54
|
-
# @return [String] The name for this room.
|
55
|
-
def name
|
56
|
-
@state.name
|
57
|
+
@timeline.on(:message) { |r, m| broadcast(:message, r, m) }
|
57
58
|
end
|
58
59
|
|
59
60
|
# Process join events for this room.
|
data/lib/chatrix/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: chatrix
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.5.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Adam Hellberg
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-
|
11
|
+
date: 2016-09-18 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: httparty
|