CQHTTP 0.3.0 → 0.3.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/exe/cqhttp-dbus +7 -0
- data/lib/CQHTTP/api.rb +1 -1
- data/lib/CQHTTP/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0a72b3a08e949b279931f027bdd9cf7e70f59c0b
|
4
|
+
data.tar.gz: 910bb53c5d090c941f2b93504aa508124b2d5d95
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 43909c20b0a2acfc6af5b6171c1e9c04117012ca3310378bfe738a6ce7c9b4e7dcb6f2d5f69542bb2b9aa67596d62fe1045fa01313714406a4a9330c651e0e20
|
7
|
+
data.tar.gz: 051b67f03463684616e8a8de76d1c6365f07fbc490f3c313bcc95f05a9391bb52db9acc6481c2066131cca86998c7c060c9030174087f5aa80e48e423b355077
|
data/exe/cqhttp-dbus
CHANGED
@@ -6,7 +6,14 @@ Thread.abort_on_exception = true
|
|
6
6
|
|
7
7
|
# DBus
|
8
8
|
class CQHTTP2DBus < DBus::Object
|
9
|
+
def initialize(*args)
|
10
|
+
@cqhttp = CQHTTP::API.new
|
11
|
+
super
|
12
|
+
end
|
9
13
|
dbus_interface 'org.dastudio.cqhttp' do
|
14
|
+
dbus_method :call, 'in func:s, in args:s' do |func, args|
|
15
|
+
@cqhttp.method_missing func.to_sym, JSON.parse(args, symbolize_names: true)
|
16
|
+
end
|
10
17
|
dbus_signal :message, 'message_type:s, json:s'
|
11
18
|
dbus_signal :event, 'event:s, json:s'
|
12
19
|
dbus_signal :friend_request, 'json:s'
|
data/lib/CQHTTP/api.rb
CHANGED
@@ -37,7 +37,7 @@ module CQHTTP
|
|
37
37
|
def gen_args(name, user_args)
|
38
38
|
args = @func_list[name.to_sym]
|
39
39
|
return {} if args == {}
|
40
|
-
return hash_to_args(args,
|
40
|
+
return hash_to_args(args, user_args) if user_args[0].class == {}.class
|
41
41
|
array_to_args(args, user_args)
|
42
42
|
end
|
43
43
|
|
data/lib/CQHTTP/version.rb
CHANGED