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

Threads support #10

Open
pinaraf opened this issue Jun 3, 2018 · 1 comment
Open

Threads support #10

pinaraf opened this issue Jun 3, 2018 · 1 comment

Comments

@pinaraf
Copy link
Owner

pinaraf commented Jun 3, 2018

Threads are needed, sadly.
Current quick analysis : a thread is created on a channel, with a thread_ts marking the corresponding 'source' message.

Chaussette in :  "{\"ok\":true,\"reply_to\":8,\"ts\":\"1528057945.000078\",\"text\":\"pour moi qui pige pas l'intérêt du bousin ça va être rigolo\"}"

=>

Chaussette in :  "{\"type\":\"message\",\"channel\":\"D4EPF2N22\",\"user\":\"U23UP0ATZ\",\"text\":\"Le thread, sa vie, son œuvre…\",\"ts\":\"1528058163.000059\",\"source_team\":\"T03DFHCR8\",\"team\":\"T03DFHCR8\",\"thread_ts\":\"1528057945.000078\"}"
Chaussette in :  "{\"type\":\"message\",\"message\":{\"type\":\"message\",\"user\":\"U23UP0ATZ\",\"text\":\"pour moi qui pige pas l'int\\u00e9r\\u00eat du bousin \\u00e7a va \\u00eatre rigolo\",\"thread_ts\":\"1528057945.000078\",\"reply_count\":1,\"replies\":[{\"user\":\"U23UP0ATZ\",\"ts\":\"1528058163.000059\"}],\"unread_count\":1,\"ts\":\"1528057945.000078\"},\"subtype\":\"message_replied\",\"hidden\":true,\"channel\":\"D4EPF2N22\",\"event_ts\":\"1528058163.000067\",\"ts\":\"1528058163.000067\"}"
Chaussette in :  "{\"type\":\"thread_subscribed\",\"subscription\":{\"type\":\"thread\",\"channel\":\"D4EPF2N22\",\"thread_ts\":\"1528057945.000078\",\"date_create\":\"1528058163\",\"active\":true,\"last_read\":\"1528058163.000059\"},\"event_ts\":\"1528058163.000070\"}"

Global implementation : extend SlackMessage to have a std::vector answers. These will be the thread answers. Must be fetched later, on demand (?)

In history : 

{"last_read":"1528058215.000061","replies":[{"ts":"1528058163.000059","user":"U23UP0ATZ"},{"ts":"1528058185.000096","user":"U23UP0ATZ"},{"ts":"1528058215.000061","user":"U23UP0ATZ"}],"reply_count":3,"subscribed":true,"text":"pour moi qui pige pas l'intérêt du bousin ça va être rigolo","thread_ts":"1528057945.000078","ts":"1528057945.000078","type":"message","unread_count":0,"user":"U23UP0ATZ"}

User interface : display the thread inline, like a subtree, with a ± icon to expand/reduce the subtree. Hide by default, highlight when there is some unread content ?

What we don't want : the official slack thread ui.

@pinaraf
Copy link
Owner Author

pinaraf commented Jun 3, 2018

When ticking "also send direct message" : 

Chaussette in :  "{\"type\":\"message\",\"channel\":\"D4EPF2N22\",\"user\":\"U42KNNKTP\",\"text\":\"test en cochant la case à la con\",\"ts\":\"1528059170.000082\",\"source_team\":\"T03DFHCR8\",\"team\":\"T03DFHCR8\",\"thread_ts\":\"1528057945.000078\",\"reply_broadcast\":true}"

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

No branches or pull requests

1 participant