Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

View author profile functionality #42

Open
wants to merge 2 commits into
base: dev
Choose a base branch
from
Open

Conversation

AckslD
Copy link
Collaborator

@AckslD AckslD commented Feb 25, 2021

Closes #11

@todo
Copy link

todo bot commented Feb 25, 2021

handle error better

if isinstance(post, fpapi.Error): # TODO handle error better
raise ConnectionError("Could not get post")
def _get_header_message_with_categories(context):
formatted_categories = ", ".join(context.user_data[user_data.POST_CATEGORIES])


This comment was generated by todo based on a TODO comment in 62c1c37 in #42. cc @FightPandemics.

@todo
Copy link

todo bot commented Feb 25, 2021

handle errors better

raise ConnectionError("Could not get current profile") # TODO handle errors better
user_info_view = views.UserProfile(response).display()
update.effective_message.reply_text(text=user_info_view)


This comment was generated by todo based on a TODO comment in b9d4a2a in #42. cc @FightPandemics.

@todo
Copy link

todo bot commented Feb 25, 2021

handle errors better

raise ConnectionError("Could not get posts") # TODO handle errors better
return posts


This comment was generated by todo based on a TODO comment in b9d4a2a in #42. cc @FightPandemics.

@todo
Copy link

todo bot commented Feb 25, 2021

handle errors better

raise ConnectionError("Could not get post") # TODO handle errors better
reply_text = views.Post(post_json=post).display()
util.reply(
update=update,
context=context,
text=reply_text,


This comment was generated by todo based on a TODO comment in b9d4a2a in #42. cc @FightPandemics.

@todo
Copy link

todo bot commented Feb 25, 2021

handle errors better

raise ConnectionError("Could not get post") # TODO handle errors better
post = views.Post(post_json=raw_post)
response = fpapi.get_user_profile(user_id=post.author_id)
if _is_error(response):
raise ConnectionError("Could not get user profile") # TODO handle errors better
return views.UserProfile(response)


This comment was generated by todo based on a TODO comment in b9d4a2a in #42. cc @FightPandemics.

@todo
Copy link

todo bot commented Feb 25, 2021

handle errors better

raise ConnectionError("Could not get user profile") # TODO handle errors better
return views.UserProfile(response)
ViewMyProfileQueryHandler = CallbackQueryHandler(view_my_profile, pattern=patterns.VIEW_MY_PROFILE)
ViewMyPostsQueryHandler = CallbackQueryHandler(view_my_posts, pattern=patterns.VIEW_MY_POSTS)


This comment was generated by todo based on a TODO comment in b9d4a2a in #42. cc @FightPandemics.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

FP Chatbot on Telegram- View Author Profile flow
1 participant