git-point icon indicating copy to clipboard operation
git-point copied to clipboard

Add the subscribe/unsubscribe issue button

Open mittalyashu opened this issue 6 years ago • 16 comments

Can you add the option the show notification of the issue?

mittalyashu avatar Oct 19 '17 14:10 mittalyashu

Hi @mittalyashu, can you explain a bit more? Do you mean the red message dot on app icon?

chinesedfan avatar Oct 19 '17 14:10 chinesedfan

Sure.

For example, we have created a new issue or subscribed to the issue which is already created. image

Basically github sends us an email for each new cooments of the issue (the issues you have subscribed). Isn't it would be great, if we could get the notifications on the mobile application itself.

mittalyashu avatar Oct 19 '17 18:10 mittalyashu

Possibly a duplicate of #101? Correct me if I'm wrong and I'll reopen!

andrewda avatar Oct 20 '17 01:10 andrewda

@andrewda I think it is not. This issue just wants to add the subscribe/unsubscribe button. I reopen with the issue title updated.

chinesedfan avatar Oct 20 '17 02:10 chinesedfan

No @chinesedfan , you got me wrong. I am not talking about notifications of the repo we are watching. I am talking about the notifications of the issues, we create on GitHub.

Can you join this chat, so that we can discuss it properly?

mittalyashu avatar Oct 20 '17 14:10 mittalyashu

@mittalyashu Can we chat on Gitter? Sorry, in China, it is hard to visit flock.com due to network issues.

chinesedfan avatar Oct 20 '17 14:10 chinesedfan

Oh! I see.

mittalyashu avatar Oct 22 '17 18:10 mittalyashu

I would like to take this issue 😄

jarvisluong avatar Feb 11 '18 10:02 jarvisluong

Great!

Just to avoid confusion giving the prior conversation, the idea is to give the ability to the end-user to subscribe/unsubscribe from an issue thread.

machour avatar Feb 11 '18 10:02 machour

I was wandering around github v3 api docs but couldn't find where to get subscription status and then update the status... 😢

jarvisluong avatar Feb 11 '18 11:02 jarvisluong

As far as I understand, here are the involved endpoints:

  • Check subscription status: https://developer.github.com/v3/activity/notifications/#get-a-thread-subscription
  • Change subscription status: https://developer.github.com/v3/activity/notifications/#set-a-thread-subscription
  • The thread ID would be the id property returned in the Issue object (for example, this very issue thread id is 266856405)

machour avatar Feb 11 '18 11:02 machour

This is what I tried using those API. The response is kinda weird. Btw this is the link to that Issue: https://github.com/facebook/react-native/issues/17935 error

jarvisluong avatar Feb 11 '18 11:02 jarvisluong

Are you authenticated?

machour avatar Feb 11 '18 11:02 machour

Yes, here are my headers I even changed the thread id to this particular issue but the response is still the same

picture

jarvisluong avatar Feb 11 '18 11:02 jarvisluong

The thread ID would be the id property returned in the Issue object

@machour I am afraid that the thread id is different with the issue id. Because I got the same response with you. The Github document says,

Notifications come back as "threads". A Thread contains information about the current discussion of an Issue/PullRequest/Commit.

So for example, even for the same issue, different threads will be generated for different users. That's why Github always complains about no admin rights.

I found a usable thread id, 268248680, in my notifications. But it should not work for you guys. 😄


Edited: Or maybe we are in the same thread.

chinesedfan avatar Feb 12 '18 03:02 chinesedfan

Interesting.. so how would someone get a working thread id? 🤔

machour avatar Feb 12 '18 10:02 machour