ruboty-scoped_alias 0.1.0 → 0.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/ruboty/handlers/scoped_alias.rb +4 -4
- data/lib/ruboty/scoped_alias/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: c376a6827d03ee835f5e5ef81fdefc1bfa768c64
|
4
|
+
data.tar.gz: e690decb57eb6f27c8f5d1547fb49cb2eed963cf
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c8df0aa16086f1b6f4e9681a84c2d3e91f5d8c2856b23fb17ca9d8befc844fa89642cec70c76d88bd730e85db82f6a4fe78f84b70f14c36049aca16ca8f6c07e
|
7
|
+
data.tar.gz: 6bdae3d433f45df10bdaa1f86e44386ba58682f5b40de70336f9a5ea343aaddb8612e32946ea5a1828d9c8c1016ab7eac369e13bb23f0d65a627b5e8d86b80e8
|
@@ -29,7 +29,7 @@ module Ruboty
|
|
29
29
|
)
|
30
30
|
|
31
31
|
def create(message)
|
32
|
-
scope = message
|
32
|
+
scope = message.from
|
33
33
|
from = message[:original]
|
34
34
|
to = message[:alias]
|
35
35
|
table[scope] ||= {}
|
@@ -38,7 +38,7 @@ module Ruboty
|
|
38
38
|
end
|
39
39
|
|
40
40
|
def delete(message)
|
41
|
-
scope = message
|
41
|
+
scope = message.from
|
42
42
|
table[scope] ||= {}
|
43
43
|
if table[scope].delete(message[:alias])
|
44
44
|
message.reply("Deleted")
|
@@ -48,11 +48,11 @@ module Ruboty
|
|
48
48
|
end
|
49
49
|
|
50
50
|
def list(message)
|
51
|
-
message.reply(aliases(message
|
51
|
+
message.reply(aliases(message.from), code: true)
|
52
52
|
end
|
53
53
|
|
54
54
|
def resolve(message)
|
55
|
-
scope = message
|
55
|
+
scope = message.from
|
56
56
|
table[scope] ||= {}
|
57
57
|
from = message.body.gsub(prefix, "")
|
58
58
|
if aliased = table[scope][from]
|