autosubscribe when shout created
This commit is contained in:
parent
dc3f7fe6a5
commit
8b2bbfec7b
|
@ -1,6 +1,7 @@
|
|||
from orm import Shout, ShoutRating, ShoutRatingStorage
|
||||
from orm.base import local_session
|
||||
from resolvers.base import mutation, query, subscription
|
||||
from resolvers.comments import comments_subscribe
|
||||
from auth.authenticate import login_required
|
||||
import asyncio
|
||||
from datetime import datetime
|
||||
|
@ -20,6 +21,8 @@ async def create_shout(_, info, input):
|
|||
shout = new_shout.slug,
|
||||
user = user.slug)
|
||||
|
||||
comments_subscribe(user, new_shout.slug, True)
|
||||
|
||||
if "mainTopic" in input:
|
||||
topic_slugs.append(input["mainTopic"])
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user