Commit graph

1410 commits

Author SHA1 Message Date
Jorty
c171f9790b Move emoji glob setting to config.exs
Also, a bit of formatting, and the glob includes an "/emoji/" prefix to
make it more intuitive to users
2018-06-30 17:58:44 -04:00
Jorty
0bfbf15b37 Allow emojis to be added automatically 2018-06-30 17:58:37 -04:00
William Pitcock
971bb4f2bd activity interpretation: formatting 2018-06-27 13:38:19 +00:00
William Pitcock
66819ea784 twitter api: use ActivityView.render_content() where appropriate instead of duplicating the logic 2018-06-27 13:38:07 +00:00
William Pitcock
ea982e7503 mastodon api: add interpreter for Article activity types 2018-06-27 13:38:00 +00:00
William Pitcock
121c1f6230 twitter api: refactor activity html generation, add support for Articles 2018-06-27 13:37:53 +00:00
William Pitcock
bd479606ba utils: make_create_data: add support for Article objects 2018-06-27 13:37:35 +00:00
William Pitcock
c42f28b82c transmogrifier: accept Article activities 2018-06-27 13:37:26 +00:00
William Pitcock
2f14996d9a twitter api: allow setting default_scope 2018-06-27 13:15:55 +00:00
William Pitcock
dcdf7b6686 twitter api: user view: show default message scope if known 2018-06-27 13:15:50 +00:00
William Pitcock
4f6de34f4f mastodon api: use info["default_scope"] if available for post scope 2018-06-27 13:15:42 +00:00
William Pitcock
7c63e70de1 activitypub: use Activity.normalize() in several places instead of using Activity.get_by_ap_id() directly. 2018-06-27 13:08:12 +00:00
William Pitcock
6f4ca7ddf7 ostatus: use Activity.normalize() instead of directly using Activity.get_by_ap_id(). 2018-06-27 13:08:05 +00:00
William Pitcock
5b240c3b18 federator: use Activity.normalize() instead of directly using Activity.get_by_ap_id(). 2018-06-27 13:07:55 +00:00
William Pitcock
bc05548370 ostatus: use Object.normalize() instead of Object.get_by_ap_id() directly. 2018-06-27 13:07:45 +00:00
William Pitcock
49da04c509 common api: use Object.normalize() instead of Object.get_by_ap_id() directly. 2018-06-27 13:07:35 +00:00
William Pitcock
15d624e077 activitypub: use Object.normalize() instead of Object.get_by_ap_id() directly. 2018-06-27 13:07:29 +00:00
William Pitcock
fb04fecfb4 streamer: use Object.normalize() instead of Object.get_by_ap_id() directly. 2018-06-27 13:07:23 +00:00
William Pitcock
47189531c5 user: use Object.normalize() instead of Object.get_by_ap_id() directly. 2018-06-27 13:07:17 +00:00
William Pitcock
b036a19c21 activity: add normalize() to find a complete activity given either URI or partial structure 2018-06-27 13:07:12 +00:00
William Pitcock
a200943240 object: add helper functions to handle various forms of a given object and return a normalized one 2018-06-27 13:06:52 +00:00
Tristan Mahé
dc8ace29d1 use the correct end file 2018-06-26 15:09:45 -07:00
Tristan Mahé
ca63585a32 maybe I should learn proper elixir ;D 2018-06-26 14:35:35 -07:00
Tristan Mahé
d8d43f1173 do the filtering 2018-06-26 14:03:23 -07:00
Tristan Mahé
c67cf8e9af format... 2018-06-26 13:49:57 -07:00
Tristan Mahé
cb21bf5fc2 filter exif data #187 2018-06-26 13:45:47 -07:00
Haelwenn (lanodan) Monnier
beb940a57e
[Pleroma.Web.MastodonAPI.MastodonAPIController]: Add rights to initial_state
Related to https://git.pleroma.social/pleroma/mastofe/issues/20
2018-06-26 20:48:35 +02:00
lambda
fc012491a5 Merge branch 'fix/mutes.json-emptyarray' into 'develop'
Return empty array from /api/qvitter/mutes.json

See merge request pleroma/pleroma!234
2018-06-25 08:45:42 +00:00
lambda
dfc96f222c Merge branch 'feature/configurable-blocks' into 'develop'
Add more configurability to how blocks work

See merge request pleroma/pleroma!203
2018-06-25 06:12:29 +00:00
squidboi
ea214b8ba6
combined outgoing_blocks with statement 2018-06-24 23:05:44 -07:00
Vivian Lim
6160a1b3c0 mix format 2018-06-24 15:24:41 -07:00
Vivian Lim
1299bccc7d return unquoted empty array from /api/qvitter/mutes.json 2018-06-23 23:20:30 -07:00
Vivian Lim
6316003946 fixes- found that TwitterAPI.Controller adds .json suffix already 2018-06-23 23:05:54 -07:00
Vivian Lim
f2badd4424 return empty array for api/qvitter/mutes.json queries instead of html 2018-06-23 22:21:39 -07:00
squidboi
c4038ede07
fix mind-crushingly dumb syntax error 2018-06-23 14:32:00 -07:00
squidboi
f4990283de
change moved attributes into normal variables 2018-06-23 14:27:07 -07:00
squidboi
4e099fcfa9
move configurable module attributes into relevant functions 2018-06-23 14:16:08 -07:00
Haelwenn (lanodan) Monnier
5a4a45b875
[Pleroma.Web.MastodonApi.MastodonApiController] Add initial_state.meta.max_toot_chars 2018-06-23 16:22:49 +02:00
Haelwenn (lanodan) Monnier
a05c0ff61d
[Pleroma.Web.MastodonApi.MastodonApiController] Add /api/v2/search 2018-06-23 16:22:47 +02:00
Haelwenn (lanodan) Monnier
359093d73b
Fake 2.4.0 API 2018-06-23 16:12:57 +02:00
Haelwenn (lanodan) Monnier
c45133377a
lib/pleroma/web/activity_pub/mrf/simple_policy.ex: mix format
Hnng!
2018-06-23 16:12:57 +02:00
Francis Dinh
082920044a Normalize file extension for uploaded files 2018-06-21 14:04:12 -04:00
William Pitcock
60d6038be5 mrf simple: add accept lists
accept lists supplement reject lists by requiring that any message accepted by contained
by the accept list.

in other words, this functionality can be used to implement instances similar to
awoo.space.
2018-06-19 21:28:24 +00:00
lambda
90cf75f4a7 Merge branch 'features/column_media_streaming' into 'develop'
Add streaming to media tabs of federated and local TLs

See merge request pleroma/pleroma!225
2018-06-19 09:50:05 +00:00
lambda
be800d7936 Merge branch 'bugfix/block-follow-relationships' into 'develop'
fix follow relationship leaks when blocked

See merge request pleroma/pleroma!230
2018-06-19 09:42:45 +00:00
William Pitcock
056305dfa7 user: add helper function to fetch a user given only an ap_id (fix tests) 2018-06-19 08:31:06 +00:00
lambda
db0731b6ac Merge branch 'feature/exclude-replies-filter' into 'develop'
activitypub: support filtering activities by whether or not they are a reply (closes #109)

Closes #109

See merge request pleroma/pleroma!226
2018-06-19 05:15:11 +00:00
William Pitcock
320ca7b11e user: when processing a block in User.block(), ensure all follow relationships are broken
this is needed for activitypub conformance

ref #213
2018-06-19 00:59:26 +00:00
William Pitcock
c95941e64d activitypub transmogrifier: fix handling of contentMap. 2018-06-18 22:14:50 +00:00
William Pitcock
4f589998ee activitypub: support filtering activities by whether or not they are a reply (closes #109) 2018-06-18 03:21:32 +00:00
Haelwenn (lanodan) Monnier
b670d4d683
MastodonAPI: Add streaming to media tabs of federated and local TLs 2018-06-17 16:17:15 +02:00
Henry Jameson
0b1ca6a584 Token-generating task 2018-06-17 14:30:07 +03:00
squidboi
2e294ee44a Merge branch 'develop' into feature/configurable-blocks 2018-06-16 15:37:16 -07:00
lambda
1ea4a18ad8 Merge branch 'feature/configure-mrf-rejectnonpublic' into 'develop'
Configs for mrf_rejectnonpublic

See merge request pleroma/pleroma!205
2018-06-16 10:39:36 +00:00
eal
a938d07df1 Merge branch 'bugfix/mastofe_thread_render' into 'develop'
lib/pleroma/web/mastodon_api/views/status_view.ex: Fix status.json so it renders threads

See merge request pleroma/pleroma!223
2018-06-15 20:43:30 +00:00
Haelwenn (lanodan) Monnier
72c2915ecd
Pleroma.Web.MastodonAPI.StatusView: Fix status.json so it renders threads 2018-06-15 22:14:17 +02:00
lain
00d7d109ef Fix typo 2018-06-15 22:01:17 +02:00
lambda
de20c8d620 Merge branch 'fix/missing-file-extension' into 'develop'
Add missing file extension if file does not have one

See merge request pleroma/pleroma!222
2018-06-14 19:11:30 +00:00
Francis Dinh
0a95b5594b Add missing file extension if file does not have one 2018-06-14 12:16:34 -04:00
eal
12c7a023de upload.ex: add MPEG Layer 3 file header. 2018-06-14 16:41:08 +03:00
lambda
2723fb5150 Merge branch 'bugfix/mrf-orphaning' into 'develop'
activitypub transmogrifier: handle activity lookup failure

Closes #156

See merge request pleroma/pleroma!216
2018-06-14 07:20:54 +00:00
lambda
8c7fdcb31b Merge branch 'feature/twitterapi-unrepeat' into 'develop'
Add TwitterAPI unretweet endpoint and cleanup AP.unannounce

See merge request pleroma/pleroma!218
2018-06-14 07:19:36 +00:00
lambda
2c303b3302 Merge branch 'bugfix/oauth2-param-name' into 'develop'
oauth: support either name or username parameter with grant_type=password

Closes #180

See merge request pleroma/pleroma!219
2018-06-14 07:14:18 +00:00
lambda
280ac243aa Merge branch 'bugfix/oauth-password-with-email' into 'develop'
oauth: fix password-based login when username is email address

Closes #199

See merge request pleroma/pleroma!220
2018-06-14 07:13:05 +00:00
William Pitcock
5442466569 oauth: fix password-based login when username is email address
closes #199
2018-06-14 02:32:30 +00:00
William Pitcock
4894b88b1b oauth: support either name or username parameter with grant_type=password
closes #180
2018-06-14 02:07:43 +00:00
Francis Dinh
1555c66650 Add unretweet TwAPI endpoint and cleanup AP.unannounce 2018-06-13 21:33:36 -04:00
William Pitcock
401e8af943 activitypub transmogrifier: handle activity lookup failure
with the introduction of MRF, it is possible that an activity may be orphaned from it's parent, if
an activity in the chain was rejected by the active MRF policies.  accordingly, handle this in the
same way as any other orphaned activity.

closes #156
2018-06-13 22:19:38 +00:00
William Pitcock
b5bc08fac3 streamer: don't relay boosts of messages which would otherwise be blocked 2018-06-13 21:59:56 +00:00
lambda
ea42ba603f Merge branch 'feature/webfinger-rfc7033-compliant' into 'develop'
webfinger: send JRD by default instead of XRD

See merge request pleroma/pleroma!211
2018-06-13 07:18:03 +00:00
William Pitcock
3d402a9e20 webfinger: send JRD by default instead of XRD
JRD being the default representation for WebFinger responses was standardized 5 years ago in
RFC 7033.
2018-06-13 07:03:14 +00:00
William Pitcock
59f95a7095 webfinger: refactor webfinger() functions
- remove code duplication
- move user lookup to parent with statement
- tighten both user lookup by nickname and activitypub URI with a type constraint
2018-06-13 06:42:27 +00:00
Henry Jameson
9c1cf1befb formatting 2018-06-12 15:01:40 +03:00
Henry Jameson
f42ffbe9a8 Initial invites support + tests. 2018-06-12 14:55:16 +03:00
lambda
3f42806b1b Merge branch 'develop' into 'develop'
Dedupe uploads

See merge request pleroma/pleroma!115
2018-06-12 08:26:26 +00:00
lambda
564c73ab24 Merge branch 'feature/list-streaming' into 'develop'
MastoAPI: Add streaming for lists.

See merge request pleroma/pleroma!183
2018-06-12 07:19:45 +00:00
William Pitcock
9810471237 router: remove stub /domain_blocks entry 2018-06-11 23:40:19 +00:00
William Pitcock
f8e0942745 twitter api: add approve/deny endpoints 2018-06-11 22:15:53 +00:00
William Pitcock
e08cf21e5b twitter api: add friend requests list api 2018-06-11 22:15:53 +00:00
William Pitcock
ba8dab7542 twitterapi: user view: return if an account is locked or not 2018-06-11 22:15:53 +00:00
William Pitcock
d96377f359 activitypub transmogrifier: accept/reject outgoing: we might send the actual object instead of the URI in some cases, handle it 2018-06-11 22:15:53 +00:00
William Pitcock
5eed1ea181 run mix format 2018-06-11 22:15:53 +00:00
William Pitcock
993312cdb3 twitterapi: add profile setting for locked/unlocked accounts 2018-06-11 22:15:53 +00:00
William Pitcock
4084889a2d activitypub transmogrifier: remove debug code 2018-06-11 22:15:53 +00:00
William Pitcock
1452b2823f user: add a workaround for situations where Pleroma may believe a followee is followed
this was caused by lack of Undo follows in the early days, and can likely be eventually removed
2018-06-11 22:15:53 +00:00
William Pitcock
76f80ba8c2 activitypub: when unfollowing, update the follow activity's disposition to 'cancelled' so it cannot be reused 2018-06-11 22:15:53 +00:00
William Pitcock
a2c4a5a75b mastodon api: allow setting an account locked or not 2018-06-11 22:15:53 +00:00
William Pitcock
ad7188fe92 user: use Enum.uniq on the follow request query 2018-06-11 22:15:53 +00:00
William Pitcock
f328de8eb7 activitypub transmogrifier: send Rejects in the format Mastodon wants 2018-06-11 22:15:53 +00:00
William Pitcock
876ad6aa38 activitypub transmogrifier: send @context on accept activities 2018-06-11 22:15:53 +00:00
William Pitcock
760eb72a38 add a bunch of stuff 2018-06-11 22:15:53 +00:00
William Pitcock
6f89d2d583 stash api controller 2018-06-11 22:15:53 +00:00
William Pitcock
9c88933422 implement tracking of follow requests 2018-06-11 22:15:53 +00:00
William Pitcock
6041380774 activitypub transmogrifier: learn locked state in Update messages 2018-06-11 22:15:27 +00:00
William Pitcock
e5206752e1 activitypub: only send accept back automatically if the account is not locked 2018-06-11 22:15:27 +00:00
lambda
7f79b467b1 Merge branch 'feature/domain-blocks' into 'develop'
Domain blocks

See merge request pleroma/pleroma!190
2018-06-11 11:19:45 +00:00
squidboi
07f0cfa53f
add allow_followersonly and allow_direct options for configuring mrf_rejectnonpublic 2018-06-10 16:40:51 -07:00
squidboi
4f9ecfc77a formatting 2018-06-09 04:28:11 +00:00
squidboi
8903f1ad4d more fixes 2018-06-08 19:07:14 -07:00
squidboi
16d896f526 fixes 2018-06-08 19:01:14 -07:00
squidboi
b3580b6971 add option to not deny follow if blocked (fixed) 2018-06-08 18:29:41 -07:00
squidboi
2847fc8f90 add option to not unfollow on block, and option to not federate outgoing blocks 2018-06-08 17:12:16 -07:00
lambda
45a935f0bd Merge branch 'users' into 'develop'
Fix users lookup/return type

See merge request pleroma/pleroma!201
2018-06-08 11:10:10 +00:00
lambda
bb639a362e Merge branch 'feature/rejectnonpublic' into 'develop'
Add MRF to drop all posts with "followers-only" or "direct" privacy settings

See merge request pleroma/pleroma!202
2018-06-08 11:08:50 +00:00
Rachel H
fa0c2727d8 Fix users lookup/return type
* Allow viewing user in frontend by id on pageload
2018-06-07 23:18:45 -07:00
lambda
4a16ade2ee Merge branch 'mastopost' into 'develop'
Allow posting images without text in mastofe

See merge request pleroma/pleroma!194
2018-06-08 06:02:21 +00:00
squidboi
e2c4013c88
s/get_by_ap_id/get_cached_by_ap_id/ 2018-06-07 22:33:50 -07:00
squidboi
6e7f91bf8f
final format 2018-06-07 22:14:39 -07:00
squidboi
82225dfc8d
even more formatting 2018-06-07 22:10:11 -07:00
lambda
c86823f724 Merge branch 'bugfix/locked-account-regression' into 'develop'
security fix: locked account regression

See merge request pleroma/pleroma!200
2018-06-08 05:10:08 +00:00
squidboi
990cde7439
more formatting 2018-06-07 22:03:24 -07:00
squidboi
5b9e1f228a
formatting 2018-06-07 21:55:58 -07:00
squidboi
f69d38e455
add mrf for dropping follower-only and direct posts 2018-06-07 21:00:57 -07:00
William Pitcock
1e9dd6fbc2 user: fix maybe_direct_follow() after user_info() refactoring broke it slightly 2018-06-08 02:52:36 +00:00
William Pitcock
47c7e259c4 activitypub transmogrifier: fix locked account state from being clobbered 2018-06-08 02:52:29 +00:00
William Pitcock
a003bdc30a activitypub transmogrifier: learn locked state in Update messages 2018-06-08 02:52:24 +00:00
lambda
839cb7b424 Merge branch 'develop' into 'mastopost'
# Conflicts:
#   .gitignore
2018-06-07 16:29:33 +00:00
lambda
595ca3bb3a Merge branch 'feature/quarantine' into 'develop'
add the ability to 'quarantine' an activitypub peer, causing them to be treated as an OStatus peer.

See merge request pleroma/pleroma!199
2018-06-07 14:44:08 +00:00
William Pitcock
09604182d0 add the ability to 'quarantine' an activitypub peer, causing them to be treated as an OStatus peer. 2018-06-07 14:38:09 +00:00
Rachel H
1525a0404b Fix follow errors 2018-06-07 00:39:24 -07:00
Sir_Boops
3f0440ac3c
Dedupe uploads 2018-06-06 13:25:44 -06:00
Rachel H
b4292295d7 Allow posting images without text in mastofe 2018-06-06 11:29:49 -07:00
eal
29c9c8d93b Extract host from ap_id, add index 2018-06-06 21:13:40 +03:00
lambda
0a0c6bf394 Merge branch 'bugfix/webfinger-xml-crash' into 'develop'
webfinger robustness improvements

See merge request pleroma/pleroma!195
2018-06-06 16:44:44 +00:00
William Pitcock
1abf0f3b3e webfinger: use https as default fallback instead of http
realistically, all instances need to be on https anyway to properly federate with all
software
2018-06-06 16:27:14 +00:00
William Pitcock
aaa81d3540 XML: handle erlang errors too 2018-06-06 16:27:13 +00:00
lambda
b5d8213e70 Merge branch 'fix/oauth-http-basic' into 'develop'
Make OAuth token endpoint work with HTTP Basic auth

See merge request pleroma/pleroma!191
2018-06-06 08:27:08 +00:00
D Anzorge
3607dc4558 Make token exchange return errors with 400 as status code 2018-06-06 03:14:50 +02:00
eal
f9719b064c Merge branch 'fix/emoji-picker' into 'develop'
set visible_in_picker to true in custom_emojis

Closes #177 and mastofe#16

See merge request pleroma/pleroma!188
2018-06-05 21:18:25 +00:00
D Anzorge
73904e8f78 Make OAuth token endpoint work with HTTP Basic auth
client_id/client_secret can now be supplied in an Authorization header
2018-06-04 00:59:00 +02:00
eal
9075b6d25b ActivityPub.ex: filter domain blocked activities. 2018-06-03 23:33:33 +03:00
eal
4856962434 MastoAPI: add domain blocking. 2018-06-03 22:21:23 +03:00
lain
8073af6e10 Better error handling for OstatusController. 2018-06-03 21:04:44 +02:00
eal
87566b6e2f user.ex: add domain blocks. 2018-06-03 22:01:37 +03:00
lain
06439f64d0 Better error handling for ActivityPubController 2018-06-03 19:58:59 +02:00
lain
4856ba596f Better error handling for MastodonApiController. 2018-06-03 19:28:11 +02:00
lain
0f70e83e8c Better error handling in TwitterApiController. 2018-06-03 19:11:22 +02:00
Haelwenn (lanodan) Monnier
b143694b98
lib/pleroma/web/mastodon_api/mastodon_api_controller.ex: set visible_in_picker to true in custom_emojis
Fixes: https://github.com/ilianaw/emojos.in/issues/4
Closes: https://git.pleroma.social/pleroma/pleroma/issues/177
Closes: https://git.pleroma.social/pleroma/mastofe/issues/16
2018-06-03 18:41:18 +02:00
eal
dca1d6d162 Merge branch 'fix/user-timeline-reading-user' into 'develop'
MastoAPI user timelines: render statuses for the logged in user.

See merge request pleroma/pleroma!187
2018-06-01 09:35:29 +00:00
eal
8c609ee3f9 MastoAPI user timelines: render statuses for the logged in user. 2018-06-01 12:30:11 +03:00
lambda
98b8f08783 Merge branch 'fix/twitterapi-incorrect-follows-you' into 'develop'
TwitterAPI: fix "Follows you" being shown for the wrong user.

Closes pleroma-fe#89

See merge request pleroma/pleroma!185
2018-06-01 08:51:04 +00:00
eal
935e544e19 TwitterAPI: fix "Follows you" being shown for the wrong user. 2018-05-31 15:27:42 +03:00
lain
349400c06a Fix url guessing attacks. 2018-05-30 20:00:27 +02:00
eal
5d3fdbc082 MastoAPI: Add streaming for lists. 2018-05-30 16:48:59 +03:00
eal
7cb2e2971e MastoAPI: fix dm_timeline getting non-create activities. 2018-05-30 15:02:22 +03:00
eal
35cb8969c4 MastoAPI: Fix link headers with restrictive params. 2018-05-29 13:31:36 +03:00
lain
461f201caa Merge branch 'develop' of git.pleroma.social:pleroma/pleroma into develop 2018-05-28 12:39:49 +02:00
lain
3ece4a3ebc Only return certain activities in TwitterAPI mentions. 2018-05-28 12:38:48 +02:00
William Pitcock
d7eb2e1b65 run mix format 2018-05-27 13:06:38 +00:00
William Pitcock
a8df7fc690 formatter: use class='mention' on links to user profiles
helps mastodon frontend and apps have better context:
https://mastodon.social/users/Gargron/statuses/100101267352899379
2018-05-27 12:56:24 +00:00