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

Inbox access (not notifications) #137

Open
Vampire opened this issue Apr 6, 2023 · 4 comments
Open

Inbox access (not notifications) #137

Vampire opened this issue Apr 6, 2023 · 4 comments
Labels
enhancement New feature or request help wanted Extra attention is needed

Comments

@Vampire
Copy link

Vampire commented Apr 6, 2023

I'm aware of #120. This issue is about actively looking into the inbox. When authenticating, I have the app permission to access the inbox, but I don't see any way to access the inbox.

It would be nice if there were a way to display the inbox actively.

@tylerbwong tylerbwong added the enhancement New feature or request label Apr 6, 2023
@tylerbwong
Copy link
Owner

tylerbwong commented Apr 6, 2023

Luckily for you, it's already been added in da1b10f! Just figuring out some last minute things with not being able to mark read/unread from the API.

@tylerbwong
Copy link
Owner

This actually brings up a good question that I would like anyone who has feedback to chime in about! I'll pin this issue and we can talk about surfacing the inbox more in-depth here.

As I said in the above message, the Stack Exchange API does not provide a way for client apps to mark an item as read/unread. It does however send state down with each inbox item in an isUnread boolean. That being said, how would folks like the app to handle read/unread state. Off the top of my head there are a few options:

  1. Render inbox items as read/unread as well as have an unread indicator in the bottom bar icon, but do nothing else.
  2. Handle marking items as read/unread locally on the app. This means that the read/unread state will go out of sync with the website and it will be reset on logout, or clearing app data.
  3. Completely ignore read/unread state for inbox items and do not render them any differently as well as do not show any unread indicator.

Would love to hear people's thoughts!

@tylerbwong tylerbwong added the help wanted Extra attention is needed label Apr 7, 2023
@tylerbwong tylerbwong pinned this issue Apr 7, 2023
@Vampire
Copy link
Author

Vampire commented Apr 7, 2023

Three more options:

Make them add an API to handle it properly and use it. That's my favorite of course. :-D I wonder that there is no API, the official apps had that functionality, didn't they?

Use whatever api call the official web page also uses it possible.

Have the unread state not as boolean, but tri-state:

  • completely unread
  • completely read (this includes read on the web but not in the app)
  • only read in the app

@tylerbwong
Copy link
Owner

Make them add an API to handle it properly and use it. That's my favorite of course. :-D I wonder that there is no API, the official apps had that functionality, didn't they?

Yea the official apps actually had a set of mobile exclusive APIs under mobile.stackexchange.com that were eventually sunsetted and do not work anymore. Was pretty bummed when I found out they weren't available.

Use whatever api call the official web page also uses it possible.

I actually dug into this a little bit and found that the site hits https://stackoverflow.com/topbar/mark-inbox-as-unread with the payload:

inboxId: ...
relatedPostId: ...
fkey: ...

but I was not able to get it working as I'm sure there are other parameters/headers I'm missing in the request.

The last option is interesting! It does make things a little more complicated and I'm sure people will wonder why it has to be that way though...but that is unavoidable and we'll get that with a lot of the options I mentioned as well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

3 participants
@Vampire @tylerbwong and others