Add more methods to LiveThreadService

- Close the live thread
- Configure a live thread's settings
- Invite a user
- Uninvite a user
- Set a contributors permissions
- Revoke a user's contributorship
- Report a live thread

Signed-off-by: Vartan Benohanian <vartanbeno@gmail.com>
This commit is contained in:
Vartan Benohanian
2020-09-17 23:33:47 -04:00
parent f814c51b53
commit 58278ffe5d
5 changed files with 528 additions and 16 deletions
+17 -7
View File
@@ -307,14 +307,22 @@ func (l *listing) Multis() []*Multi {
return l.things.Multis
}
func (l *listing) LiveThreads() []*LiveThread {
if l == nil {
return nil
}
return l.things.LiveThreads
}
type things struct {
Comments []*Comment
Mores []*More
Users []*User
Posts []*Post
Subreddits []*Subreddit
ModActions []*ModAction
Multis []*Multi
Comments []*Comment
Mores []*More
Users []*User
Posts []*Post
Subreddits []*Subreddit
ModActions []*ModAction
Multis []*Multi
LiveThreads []*LiveThread
}
// UnmarshalJSON implements the json.Unmarshaler interface.
@@ -345,6 +353,8 @@ func (t *things) add(things ...thing) {
t.ModActions = append(t.ModActions, v)
case *Multi:
t.Multis = append(t.Multis, v)
case *LiveThread:
t.LiveThreads = append(t.LiveThreads, v)
}
}
}