@impro.social/impro-plugin 0.0.11 → 0.0.12
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.
- package/main.js +37 -0
- package/package.json +1 -1
package/main.js
CHANGED
|
@@ -147,6 +147,17 @@ class PluginData {
|
|
|
147
147
|
getProfile(did) {
|
|
148
148
|
return hostCall("getProfile", { did });
|
|
149
149
|
}
|
|
150
|
+
// Like getProfile, but includes viewer relationship details not present
|
|
151
|
+
// on the basic profile view: viewer.following, viewer.followedBy, and
|
|
152
|
+
// viewer.knownFollowers (a summary of mutual followers).
|
|
153
|
+
getDetailedProfile(did) {
|
|
154
|
+
return hostCall("getDetailedProfile", { did });
|
|
155
|
+
}
|
|
156
|
+
// The full known-followers list for did (the summary on
|
|
157
|
+
// getDetailedProfile's viewer.knownFollowers is capped to a handful).
|
|
158
|
+
getKnownFollowers(did) {
|
|
159
|
+
return hostCall("getKnownFollowers", { did });
|
|
160
|
+
}
|
|
150
161
|
getRecord(repo, collection, rkey) {
|
|
151
162
|
return hostCall("getRecord", { repo, collection, rkey });
|
|
152
163
|
}
|
|
@@ -164,6 +175,32 @@ class App {
|
|
|
164
175
|
refreshFeedFilters(feedURI = null) {
|
|
165
176
|
return hostCall("refreshFeedFilters", feedURI);
|
|
166
177
|
}
|
|
178
|
+
|
|
179
|
+
// Actions on behalf of the signed-in user. Each method requires the
|
|
180
|
+
// corresponding scope ("mute", "block", "feedFeedback") to be declared in
|
|
181
|
+
// the plugin manifest's `permissions.actions` array, which the user must
|
|
182
|
+
// grant at install time.
|
|
183
|
+
muteActor(did) {
|
|
184
|
+
return hostCall("muteActor", { did, mute: true });
|
|
185
|
+
}
|
|
186
|
+
unmuteActor(did) {
|
|
187
|
+
return hostCall("muteActor", { did, mute: false });
|
|
188
|
+
}
|
|
189
|
+
blockActor(did) {
|
|
190
|
+
return hostCall("blockActor", { did, block: true });
|
|
191
|
+
}
|
|
192
|
+
unblockActor(did) {
|
|
193
|
+
return hostCall("blockActor", { did, block: false });
|
|
194
|
+
}
|
|
195
|
+
// Acts like the user clicking "Show less like this": sends the requestLess
|
|
196
|
+
// feedback signal to the feed that served the post and collapses the post
|
|
197
|
+
// behind a feedback message in feeds.
|
|
198
|
+
showLessLikeThis(postUri, feedUri) {
|
|
199
|
+
return hostCall("showLessLikeThis", { postUri, feedUri });
|
|
200
|
+
}
|
|
201
|
+
showMoreLikeThis(postUri, feedUri) {
|
|
202
|
+
return hostCall("showMoreLikeThis", { postUri, feedUri });
|
|
203
|
+
}
|
|
167
204
|
}
|
|
168
205
|
|
|
169
206
|
export async function fetch(url, init = {}) {
|