redd 0.8.7 → 0.8.8
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/redd/models/moderatable.rb +7 -4
- data/lib/redd/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: 1d009c1ad3efb5faf6e46155a0c8dbd643762c2d
|
|
4
|
+
data.tar.gz: 0f3d80e834eb5294de32c59838a1f896ff0ab354
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: b7d188f6d4cedb9f286bea9f9b9d1a38f5cd5f5c2151f2600737abf5f8c5e49634e59f14965f96312cafcda8ae697f130cb4f942183085360bda23bc2597636f
|
|
7
|
+
data.tar.gz: 0e764013df9c65079f807200721649474f4eb2e51d87c2aee62180f0d285c22d9b5d69e5345b1cead59a2fe979aeaf6befb0a2d8e082253dfcb509c5877b6099
|
|
@@ -16,11 +16,14 @@ module Redd
|
|
|
16
16
|
end
|
|
17
17
|
|
|
18
18
|
# Distinguish a link or comment with a sigil to show that it has been created by a moderator.
|
|
19
|
-
# @param how [:yes, :no, :admin, :special] how to distinguish the thing
|
|
20
|
-
# @
|
|
21
|
-
def distinguish(how = :yes
|
|
19
|
+
# @param how [:yes, :no, :admin, :special, :sticky] how to distinguish the thing
|
|
20
|
+
# @note :sticky is for comments. see {Submission#make_sticky} for posts.
|
|
21
|
+
def distinguish(how = :yes)
|
|
22
22
|
params = { id: get_attribute(:name), how: how }
|
|
23
|
-
|
|
23
|
+
if how == :sticky
|
|
24
|
+
params[:how] = :yes
|
|
25
|
+
params[:sticky] = true
|
|
26
|
+
end
|
|
24
27
|
@client.post('/api/distinguish', params)
|
|
25
28
|
end
|
|
26
29
|
|
data/lib/redd/version.rb
CHANGED