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

WIP implement mentions + findUser falls back to webfinger #28

Merged
merged 2 commits into from
Mar 28, 2020

Conversation

traumschule
Copy link

@traumschule traumschule commented Mar 21, 2020

see #26, #27

  1. match @user@domain or @user (base_url is used)
  2. wrap in html
  3. create mention object
  4. add cc
  5. test search with non-pgi

Note: the output specification requires "cc": [<user_id>]. When mentioning multiple users backend raised 500 because the cc list was inserted as an array. Hence line 46 in Publish.svelte is ap_object.cc = mentions.map(m => m.href); instead of ap_object.cc = [mentions.map(m => m.href)];

const data = wrapHashTagsWithLink(wrapLinksWithTags(content));

let ap_object = getCreateObject(data, tags);
const data = wrapMentions(wrapHashTagsWithLink(wrapLinksWithTags(content)));
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:)))

@autogestion
Copy link
Owner

autogestion commented Mar 22, 2020

Screenshot_39
tested mentions. looks like domain part should be cropped. Or maybe put the hole username (with domain) inside <span>$2</span>

@autogestion
Copy link
Owner

and renders incorrect url in cc (which will be used by server to notify person which was mentioned)
Screenshot_41

- Publish ("Create"): separate publish and sendPost 
- Search: factor out requests to utils/user.js
- needs testing for non-pgi
@traumschule
Copy link
Author

thanks for testing! needs some more :)

@traumschule traumschule changed the title implement mentions (fixes #27) WIP implement mentions + findUser falls back to webfinger Mar 22, 2020
@autogestion
Copy link
Owner

autogestion commented Mar 23, 2020

Have tested mentions, works fine
Screenshot_42
Mentioned user do not follow test acc, still got post where he is mentioned

Same time, fallback to webginger failed when tried to search for [email protected]

@autogestion autogestion linked an issue Mar 23, 2020 that may be closed by this pull request
@autogestion autogestion merged commit cb06a86 into autogestion:master Mar 28, 2020
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.

Implement mentions
2 participants