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

dispatching hashtags and mentions in comments #345

Merged
merged 3 commits into from Aug 13, 2015

Conversation

Projects
None yet
3 participants
@erqan
Copy link
Contributor

erqan commented Aug 11, 2015

it also reduces the createSignedUserpost's arguments

@slr slr referenced this pull request Aug 12, 2015

Merged

retwist with comment #294

std::string sig = createSignature(std::string(buf.data(),buf.size()), username);
if(sig.size())
{
v["sig_wort"] = sig;

This comment has been minimized.

@miguelfreitas

miguelfreitas Aug 12, 2015

Owner

what is that "sig_wort"?

This comment has been minimized.

@slr

slr Aug 13, 2015

Contributor

signature of post without rt and sig_rt. it's need to be able to drop them when you want to retwist some post with your comment which is retwist of some another post with comment to avoid overquoting.

e.g. post of sometest, k=66:

{
        "sig_userpost" : "20d6ef02cc111529b7c9fca9b4e3efcabe2c00cd5b6b6d77949b9296ae5213d78ffb0f577bc66033f0bd97cece538a02987ae2afe66379a6e62eab6ae3f7abdc96",
        "userpost" : {
            "height" : 98781,
            "k" : 66,
            "lastk" : 65,
            "msg" : "@sometest2 some?",
            "n" : "sometest",
            "rt" : {
                "height" : 98779,
                "k" : 33,
                "lastk" : 32,
                "msg" : "@sometest test?",
                "n" : "sometest2",
                "rt" : {
                    "height" : 77588,
                    "k" : 64,
                    "lastk" : 63,
                    "msg" : "test 30",
                    "n" : "sometest",
                    "time" : 1426006988
                },
                "sig_rt" : "\u001Fn?�E�gD�6#��;�*����\u0018\u000B�����\u000F\u001E��A.\nf/r���\u001C��2i�j�v�`���\u001D�/�s��\u0013�",
                "time" : 1439382741
            },
            "sig_rt" : "20f13e6a396eaf7b36cd18531c6f8aa712ff0461f07aee40c2fc9c5ce6a36e17f3965706378bd4c9495470af5468afff62fb685259337e832cc882f2ab5db91314",
            "time" : 1439383914
        }
    }

here's overquoting.

now see k=69-70:

{
        "sig_userpost" : "1fce56c36dbf1d3102a1b41b2db0f3b561902262564ffb5ad4be0de97a035a0b739dfdffef423e1aa8ac9db389b09d426bee78ce26e8551f48ad1dfc1c608e54c5",
        "sig_wort" : "20cb7bf8bc5a7994610ec7d4649db1d9e93050c64d69ee17a74e19d090d41e29ccb7b4fcb8a1f8a7e63d19b24d842f8c4391acac1e9882f6a5965285e89d68138d",
        "userpost" : {
            "height" : 98813,
            "k" : 70,
            "lastk" : 69,
            "msg" : "@sometest2 test!",
            "n" : "sometest",
            "rt" : {
                "height" : 98813,
                "k" : 69,
                "lastk" : 68,
                "msg" : "@sometest2 test?",
                "n" : "sometest",
                "time" : 1439408659
            },
            "sig_rt" : "1fd4026bc7dbe40eba92bd9d4f92eaba4333cfeedaa378621cec7eb9cd51ff5255349988357a13f7bc5ddd218f17d56c833dacfa142304b85d4f0dcd85b46f56a2",
            "time" : 1439409893
        }
    },
    {
        "sig_userpost" : "20c7017bfbd9df877bf0cc535c82b4a8bbb4fc7263c422929d362536fe3dd45bc5419a3e9ef1353ab3f7fdaffad209872f18b29a83c71ba66c5f8e161c37c6b624",
        "sig_wort" : "1fd4026bc7dbe40eba92bd9d4f92eaba4333cfeedaa378621cec7eb9cd51ff5255349988357a13f7bc5ddd218f17d56c833dacfa142304b85d4f0dcd85b46f56a2",
        "userpost" : {
            "height" : 98813,
            "k" : 69,
            "lastk" : 68,
            "msg" : "@sometest2 test?",
            "n" : "sometest",
            "rt" : {
                "height" : 77588,
                "k" : 30,
                "lastk" : 29,
                "msg" : "test",
                "n" : "sometest2",
                "time" : 1426006992
            },
            "sig_rt" : "203abab704f0b9e0d52585864202dc408ce6de2d49cccb4dc6c8c2fea71177140416ad21e4c45301b6ba483d617103e82dbfd08ce150801d6b4a9f9964dc81b68f",
            "time" : 1439408659
        }
    }
@miguelfreitas

This comment has been minimized.

Copy link
Owner

miguelfreitas commented Aug 13, 2015

Isn't it easier to just RT the original retwisted post again? Do we need to "fork" the discussion into separated threads, instead of having all comments added to the same original thread?

@slr

This comment has been minimized.

Copy link
Contributor

slr commented Aug 13, 2015

yep, it's always easier to not put new functionality on. but this comment feature would be incomplete without it and you just can't retwist-and-comment some posts.

and yes, sometimes you need fork the discussion.

personally I think it's absolutely required. let's see:

  1. original post by xxx:

xxx: a joke.

  1. retwist of that post with comment by yyy, post is shown in client as citation:

yyy: joke about what a joker xxx is.
citation: xxx: a joke.

if functionality is implemented:

  1. retwist of that comment with comment too by xxx:

xxx: wtf?
citation: yyy: joke about what a joker xxx is.

if functionality is not implemented:

  1. wtf?
@miguelfreitas

This comment has been minimized.

Copy link
Owner

miguelfreitas commented Aug 13, 2015

I don't know, this is conceptually a bit confuse... So you want to comment the comment... Shouldn't you reply instead?

Let's say you'd just quote the comment (not the original post which is discarded from the second RT). But the comment is something that is not meant to stand by itself, it only makes sense because it is a comment over another twist (which is supposedly a complete idea).

If we don't fork the threads don't we get the benefit of a wider audience to the original post?

@slr

This comment has been minimized.

Copy link
Contributor

slr commented Aug 13, 2015

Shouldn't you reply instead?

when you want to reply you reply, when you want reply with citation you reply with citation. think about it in this paradigm.

Let's say you'd just quote the comment (not the original post which is discarded from the second RT). But the comment is something that is not meant to stand by itself

you should be able to click on quote and see all related.

If we don't fork the threads don't we get the benefit of a wider audience to the original post?

it's true but, again, choice is yours.

@slr

This comment has been minimized.

Copy link
Contributor

slr commented Aug 13, 2015

maybe we need reply property too in these posts?

@miguelfreitas

This comment has been minimized.

Copy link
Owner

miguelfreitas commented Aug 13, 2015

It looks "hackish" to me to have another signature field that only takes into computation a given subset of the fields. If we add another fields, then we have to decide field-by-field whether they are computed into this special signature or not? We are adding exceptions to an otherwise very simple rule...

@slr

This comment has been minimized.

Copy link
Contributor

slr commented Aug 13, 2015

this signature should sign entire userpost without rt related stuff only — and just to be able to not increase nesting level by doing quoting things. now I don't see any possible cases of future fields which can break this conditions.

miguelfreitas added a commit that referenced this pull request Aug 13, 2015

Merge pull request #345 from erqan/rt-fav-comments
dispatching hashtags and mentions in comments

@miguelfreitas miguelfreitas merged commit e689705 into miguelfreitas:master Aug 13, 2015

@slr

This comment has been minimized.

Copy link
Contributor

slr commented Aug 13, 2015

thank you.

@erqan erqan deleted the erqan:rt-fav-comments branch Sep 9, 2015

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment