\ No newline at end of file
diff --git a/priv/static/schemas/litepub-0.1.jsonld b/priv/static/schemas/litepub-0.1.jsonld
index 650118475e..3569165a40 100644
--- a/priv/static/schemas/litepub-0.1.jsonld
+++ b/priv/static/schemas/litepub-0.1.jsonld
@@ -2,6 +2,7 @@
"@context": [
"https://www.w3.org/ns/activitystreams",
"https://w3id.org/security/v1",
+ "https://purl.archive.org/socialweb/webfinger",
{
"Emoji": "toot:Emoji",
"Hashtag": "as:Hashtag",
@@ -17,6 +18,7 @@
"ostatus": "http://ostatus.org#",
"schema": "http://schema.org#",
"toot": "http://joinmastodon.org/ns#",
+ "fedibird": "http://fedibird.com/ns#",
"value": "schema:value",
"sensitive": "as:sensitive",
"litepub": "http://litepub.social/ns#",
@@ -26,6 +28,8 @@
"@id": "litepub:listMessage",
"@type": "@id"
},
+ "quoteUrl": "as:quoteUrl",
+ "quoteUri": "fedibird:quoteUri",
"oauthRegistrationEndpoint": {
"@id": "litepub:oauthRegistrationEndpoint",
"@type": "@id"
@@ -37,7 +41,9 @@
"@type": "@id"
},
"vcard": "http://www.w3.org/2006/vcard/ns#",
- "formerRepresentations": "litepub:formerRepresentations"
+ "formerRepresentations": "litepub:formerRepresentations",
+ "sm": "http://smithereen.software/ns#",
+ "nonAnonymous": "sm:nonAnonymous"
}
]
}
diff --git a/priv/static/static/css/1264.177d0bf6917b317388ae.css b/priv/static/static/css/1264.177d0bf6917b317388ae.css
deleted file mode 100644
index 63976a6d74..0000000000
Binary files a/priv/static/static/css/1264.177d0bf6917b317388ae.css and /dev/null differ
diff --git a/priv/static/static/css/1264.177d0bf6917b317388ae.css.map b/priv/static/static/css/1264.177d0bf6917b317388ae.css.map
deleted file mode 100644
index 326c27d149..0000000000
--- a/priv/static/static/css/1264.177d0bf6917b317388ae.css.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"file":"static/css/1264.177d0bf6917b317388ae.css","mappings":"AAEE,oBACE,gBACA,aCFF,qBACE,aCAJ,aACE,kBAEA,mBACE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BAGF,uDAME,mBAFA,uBAFA,SACA,gBAEA,sCACA,CAGF,kFAGE,gBAGF,4BAME,MAAK,CADL,cAJA,cAQF,4BACE,eAGF,kCACE,aAGF,gBACE,kBACA,mBAKF,gCACE,aACA,mBAEA,WAAU,CADV,4BACA,CAEA,qCACE,YAGA,eAFA,eACA,YAEA,UCzUN,uBACE,YAEA,qCACE,0CACA,qBACA,qBAEA,oFAEE,cACA,mBACA,0GACE,gBAIJ,sDACE,aAEA,mEACE,SACA,kBAIJ,gDACE,mBAEA,kBADA,gBACA,CAGF,4CACE,eAGF,8CAGE,aADA,eADA,UAEA,CAGF,wGAEE,sBACA,SvBjCW,CuBoCb,mDACE","sources":["webpack://pleroma_fe/./src/components/importer/importer.vue","webpack://pleroma_fe/./src/components/exporter/exporter.vue","webpack://pleroma_fe/./src/components/autosuggest/autosuggest.vue","webpack://pleroma_fe/./src/_variables.scss","webpack://pleroma_fe/./src/components/block_card/block_card.vue","webpack://pleroma_fe/./src/components/mute_card/mute_card.vue","webpack://pleroma_fe/./src/components/domain_mute_card/domain_mute_card.vue","webpack://pleroma_fe/./src/components/selectable_list/selectable_list.vue","webpack://pleroma_fe/./src/hocs/with_subscription/with_subscription.scss","webpack://pleroma_fe/./src/components/settings_modal/tabs/mutes_and_blocks_tab.scss","webpack://pleroma_fe/./src/components/settings_modal/helpers/modified_indicator.vue","webpack://pleroma_fe/./src/components/settings_modal/helpers/server_side_indicator.vue","webpack://pleroma_fe/./src/components/settings_modal/tabs/security_tab/mfa_backup_codes.vue","webpack://pleroma_fe/./src/components/settings_modal/tabs/security_tab/mfa.vue","webpack://pleroma_fe/./node_modules/cropperjs/dist/cropper.css","webpack://pleroma_fe/./src/components/image_cropper/image_cropper.vue","webpack://pleroma_fe/./src/components/settings_modal/tabs/profile_tab.scss","webpack://pleroma_fe/./src/components/settings_modal/helpers/size_setting.vue","webpack://pleroma_fe/./src/components/settings_modal/tabs/general_tab.vue","webpack://pleroma_fe/./src/components/color_input/color_input.scss","webpack://pleroma_fe/./src/components/color_input/color_input.vue","webpack://pleroma_fe/./src/components/shadow_control/shadow_control.vue","webpack://pleroma_fe/./src/components/font_control/font_control.vue","webpack://pleroma_fe/./src/components/contrast_ratio/contrast_ratio.vue","webpack://pleroma_fe/./src/components/settings_modal/tabs/theme_tab/preview.vue","webpack://pleroma_fe/./src/components/settings_modal/tabs/theme_tab/theme_tab.scss","webpack://pleroma_fe/./src/components/settings_modal/settings_modal_content.scss"],"sourcesContent":["\n.importer {\n &-uploading {\n font-size: 1.5em;\n margin: 0.25em;\n }\n}\n","\n.exporter {\n &-processing {\n margin: 0.25em;\n }\n}\n","\n@import '../../_variables.scss';\n\n.autosuggest {\n position: relative;\n\n &-input {\n display: block;\n width: 100%;\n }\n\n &-results {\n position: absolute;\n left: 0;\n top: 100%;\n right: 0;\n max-height: 400px;\n background-color: $fallback--bg;\n background-color: var(--bg, $fallback--bg);\n border-style: solid;\n border-width: 1px;\n border-color: $fallback--border;\n border-color: var(--border, $fallback--border);\n border-radius: $fallback--inputRadius;\n border-radius: var(--inputRadius, $fallback--inputRadius);\n border-top-left-radius: 0;\n border-top-right-radius: 0;\n box-shadow: 1px 1px 4px rgba(0, 0, 0, 0.6);\n box-shadow: var(--panelShadow);\n overflow-y: auto;\n z-index: 1;\n }\n}\n","$main-color: #f58d2c;\n$main-background: white;\n$darkened-background: whitesmoke;\n\n$fallback--bg: #121a24;\n$fallback--fg: #182230;\n$fallback--faint: rgba(185, 185, 186, .5);\n$fallback--text: #b9b9ba;\n$fallback--link: #d8a070;\n$fallback--icon: #666;\n$fallback--lightBg: rgb(21, 30, 42);\n$fallback--lightText: #b9b9ba;\n$fallback--border: #222;\n$fallback--cRed: #ff0000;\n$fallback--cBlue: #0095ff;\n$fallback--cGreen: #0fa00f;\n$fallback--cOrange: orange;\n\n$fallback--alertError: rgba(211,16,20,.5);\n$fallback--alertWarning: rgba(111,111,20,.5);\n\n$fallback--panelRadius: 10px;\n$fallback--checkboxRadius: 2px;\n$fallback--btnRadius: 4px;\n$fallback--inputRadius: 4px;\n$fallback--tooltipRadius: 5px;\n$fallback--avatarRadius: 4px;\n$fallback--avatarAltRadius: 10px;\n$fallback--attachmentRadius: 10px;\n$fallback--chatMessageRadius: 10px;\n\n$fallback--buttonShadow: 0px 0px 2px 0px rgba(0, 0, 0, 1), 0px 1px 0px 0px rgba(255, 255, 255, 0.2) inset, 0px -1px 0px 0px rgba(0, 0, 0, 0.2) inset;\n\n$status-margin: 0.75em;\n","\n.block-card-content-container {\n margin-top: 0.5em;\n text-align: right;\n button {\n width: 10em;\n }\n}\n","\n.mute-card-content-container {\n margin-top: 0.5em;\n text-align: right;\n button {\n width: 10em;\n }\n}\n","\n.domain-mute-card {\n flex: 1 0;\n display: flex;\n justify-content: space-between;\n align-items: center;\n padding: 0.6em 1em 0.6em 0;\n\n &-domain {\n margin-right: 1em;\n overflow: hidden;\n text-overflow: ellipsis;\n }\n\n button {\n width: 10em;\n }\n\n .autosuggest-results & {\n padding-left: 1em;\n }\n}\n","\n@import '../../_variables.scss';\n\n.selectable-list {\n &-item-inner {\n display: flex;\n align-items: center;\n\n > * {\n min-width: 0;\n }\n }\n\n &-item-selected-inner {\n background-color: $fallback--lightBg;\n background-color: var(--selectedMenu, $fallback--lightBg);\n color: var(--selectedMenuText, $fallback--text);\n --faint: var(--selectedMenuFaintText, $fallback--faint);\n --faintLink: var(--selectedMenuFaintLink, $fallback--faint);\n --lightText: var(--selectedMenuLightText, $fallback--lightText);\n --icon: var(--selectedMenuIcon, $fallback--icon);\n }\n\n &-header {\n display: flex;\n align-items: center;\n padding: 0.6em 0;\n border-bottom: 2px solid;\n border-bottom-color: $fallback--border;\n border-bottom-color: var(--border, $fallback--border);\n\n &-actions {\n flex: 1;\n }\n }\n\n &-checkbox-wrapper {\n padding: 0 10px;\n flex: none;\n }\n}\n",".with-subscription {\n &-loading {\n padding: 10px;\n text-align: center;\n\n .error {\n font-size: 1rem;\n }\n }\n}",".mutes-and-blocks-tab {\n height: 100%;\n\n .usersearch-wrapper {\n padding: 1em;\n }\n\n .bulk-actions {\n text-align: right;\n padding: 0 1em;\n min-height: 2em;\n }\n\n .bulk-action-button {\n width: 10em\n }\n\n .domain-mute-form {\n padding: 1em;\n display: flex;\n flex-direction: column\n }\n\n .domain-mute-button {\n align-self: flex-end;\n margin-top: 1em;\n width: 10em\n }\n}\n","\n.ModifiedIndicator {\n display: inline-block;\n position: relative;\n}\n\n.modified-tooltip {\n margin: 0.5em 1em;\n min-width: 10em;\n text-align: center;\n}\n","\n.ServerSideIndicator {\n display: inline-block;\n position: relative;\n}\n\n.serverside-tooltip {\n margin: 0.5em 1em;\n min-width: 10em;\n text-align: center;\n}\n","\n@import '../../../../_variables.scss';\n\n.mfa-backup-codes {\n .warning {\n color: $fallback--cOrange;\n color: var(--cOrange, $fallback--cOrange);\n }\n .backup-codes {\n font-family: var(--postCodeFont, monospace);\n }\n}\n","\n@import '../../../../_variables.scss';\n.mfa-settings {\n .mfa-heading, .method-item {\n display: flex;\n flex-wrap: wrap;\n justify-content: space-between;\n align-items: baseline;\n }\n\n .warning {\n color: $fallback--cOrange;\n color: var(--cOrange, $fallback--cOrange);\n }\n\n .setup-otp {\n display: flex;\n justify-content: center;\n flex-wrap: wrap;\n .qr-code {\n flex: 1;\n padding-right: 10px;\n }\n .verify { flex: 1; }\n .error { margin: 4px 0 0 0; }\n .confirm-otp-actions {\n button {\n width: 15em;\n margin-top: 5px;\n }\n\n }\n }\n}\n","/*!\n * Cropper.js v1.5.12\n * https://fengyuanchen.github.io/cropperjs\n *\n * Copyright 2015-present Chen Fengyuan\n * Released under the MIT license\n *\n * Date: 2021-06-12T08:00:11.623Z\n */\n\n.cropper-container {\n direction: ltr;\n font-size: 0;\n line-height: 0;\n position: relative;\n -ms-touch-action: none;\n touch-action: none;\n -webkit-user-select: none;\n -moz-user-select: none;\n -ms-user-select: none;\n user-select: none;\n}\n\n.cropper-container img {\n display: block;\n height: 100%;\n image-orientation: 0deg;\n max-height: none !important;\n max-width: none !important;\n min-height: 0 !important;\n min-width: 0 !important;\n width: 100%;\n}\n\n.cropper-wrap-box,\n.cropper-canvas,\n.cropper-drag-box,\n.cropper-crop-box,\n.cropper-modal {\n bottom: 0;\n left: 0;\n position: absolute;\n right: 0;\n top: 0;\n}\n\n.cropper-wrap-box,\n.cropper-canvas {\n overflow: hidden;\n}\n\n.cropper-drag-box {\n background-color: #fff;\n opacity: 0;\n}\n\n.cropper-modal {\n background-color: #000;\n opacity: 0.5;\n}\n\n.cropper-view-box {\n display: block;\n height: 100%;\n outline: 1px solid #39f;\n outline-color: rgba(51, 153, 255, 0.75);\n overflow: hidden;\n width: 100%;\n}\n\n.cropper-dashed {\n border: 0 dashed #eee;\n display: block;\n opacity: 0.5;\n position: absolute;\n}\n\n.cropper-dashed.dashed-h {\n border-bottom-width: 1px;\n border-top-width: 1px;\n height: calc(100% / 3);\n left: 0;\n top: calc(100% / 3);\n width: 100%;\n}\n\n.cropper-dashed.dashed-v {\n border-left-width: 1px;\n border-right-width: 1px;\n height: 100%;\n left: calc(100% / 3);\n top: 0;\n width: calc(100% / 3);\n}\n\n.cropper-center {\n display: block;\n height: 0;\n left: 50%;\n opacity: 0.75;\n position: absolute;\n top: 50%;\n width: 0;\n}\n\n.cropper-center::before,\n.cropper-center::after {\n background-color: #eee;\n content: ' ';\n display: block;\n position: absolute;\n}\n\n.cropper-center::before {\n height: 1px;\n left: -3px;\n top: 0;\n width: 7px;\n}\n\n.cropper-center::after {\n height: 7px;\n left: 0;\n top: -3px;\n width: 1px;\n}\n\n.cropper-face,\n.cropper-line,\n.cropper-point {\n display: block;\n height: 100%;\n opacity: 0.1;\n position: absolute;\n width: 100%;\n}\n\n.cropper-face {\n background-color: #fff;\n left: 0;\n top: 0;\n}\n\n.cropper-line {\n background-color: #39f;\n}\n\n.cropper-line.line-e {\n cursor: ew-resize;\n right: -3px;\n top: 0;\n width: 5px;\n}\n\n.cropper-line.line-n {\n cursor: ns-resize;\n height: 5px;\n left: 0;\n top: -3px;\n}\n\n.cropper-line.line-w {\n cursor: ew-resize;\n left: -3px;\n top: 0;\n width: 5px;\n}\n\n.cropper-line.line-s {\n bottom: -3px;\n cursor: ns-resize;\n height: 5px;\n left: 0;\n}\n\n.cropper-point {\n background-color: #39f;\n height: 5px;\n opacity: 0.75;\n width: 5px;\n}\n\n.cropper-point.point-e {\n cursor: ew-resize;\n margin-top: -3px;\n right: -3px;\n top: 50%;\n}\n\n.cropper-point.point-n {\n cursor: ns-resize;\n left: 50%;\n margin-left: -3px;\n top: -3px;\n}\n\n.cropper-point.point-w {\n cursor: ew-resize;\n left: -3px;\n margin-top: -3px;\n top: 50%;\n}\n\n.cropper-point.point-s {\n bottom: -3px;\n cursor: s-resize;\n left: 50%;\n margin-left: -3px;\n}\n\n.cropper-point.point-ne {\n cursor: nesw-resize;\n right: -3px;\n top: -3px;\n}\n\n.cropper-point.point-nw {\n cursor: nwse-resize;\n left: -3px;\n top: -3px;\n}\n\n.cropper-point.point-sw {\n bottom: -3px;\n cursor: nesw-resize;\n left: -3px;\n}\n\n.cropper-point.point-se {\n bottom: -3px;\n cursor: nwse-resize;\n height: 20px;\n opacity: 1;\n right: -3px;\n width: 20px;\n}\n\n@media (min-width: 768px) {\n .cropper-point.point-se {\n height: 15px;\n width: 15px;\n }\n}\n\n@media (min-width: 992px) {\n .cropper-point.point-se {\n height: 10px;\n width: 10px;\n }\n}\n\n@media (min-width: 1200px) {\n .cropper-point.point-se {\n height: 5px;\n opacity: 0.75;\n width: 5px;\n }\n}\n\n.cropper-point.point-se::before {\n background-color: #39f;\n bottom: -50%;\n content: ' ';\n display: block;\n height: 200%;\n opacity: 0;\n position: absolute;\n right: -50%;\n width: 200%;\n}\n\n.cropper-invisible {\n opacity: 0;\n}\n\n.cropper-bg {\n background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQAQMAAAAlPW0iAAAAA3NCSVQICAjb4U/gAAAABlBMVEXMzMz////TjRV2AAAACXBIWXMAAArrAAAK6wGCiw1aAAAAHHRFWHRTb2Z0d2FyZQBBZG9iZSBGaXJld29ya3MgQ1M26LyyjAAAABFJREFUCJlj+M/AgBVhF/0PAH6/D/HkDxOGAAAAAElFTkSuQmCC');\n}\n\n.cropper-hide {\n display: block;\n height: 0;\n position: absolute;\n width: 0;\n}\n\n.cropper-hidden {\n display: none !important;\n}\n\n.cropper-move {\n cursor: move;\n}\n\n.cropper-crop {\n cursor: crosshair;\n}\n\n.cropper-disabled .cropper-drag-box,\n.cropper-disabled .cropper-face,\n.cropper-disabled .cropper-line,\n.cropper-disabled .cropper-point {\n cursor: not-allowed;\n}\n","\n.image-cropper {\n &-img-input {\n display: none;\n }\n\n &-image-container {\n position: relative;\n\n img {\n display: block;\n max-width: 100%;\n }\n }\n\n &-buttons-wrapper {\n margin-top: 10px;\n\n button {\n margin-top: 5px;\n }\n }\n}\n","@import '../../../_variables.scss';\n.profile-tab {\n .bio {\n margin: 0;\n }\n\n .visibility-tray {\n padding-top: 5px;\n }\n\n input[type=file] {\n padding: 5px;\n height: auto;\n }\n\n .banner-background-preview {\n max-width: 100%;\n width: 300px;\n position: relative;\n\n img {\n width: 100%;\n }\n }\n\n .uploading {\n font-size: 1.5em;\n margin: 0.25em;\n }\n\n .name-changer {\n width: 100%;\n }\n\n .current-avatar-container {\n position: relative;\n width: 150px;\n height: 150px;\n }\n\n .current-avatar {\n display: block;\n width: 100%;\n height: 100%;\n border-radius: $fallback--avatarRadius;\n border-radius: var(--avatarRadius, $fallback--avatarRadius);\n }\n\n .reset-button {\n position: absolute;\n top: 0.2em;\n right: 0.2em;\n border-radius: $fallback--tooltipRadius;\n border-radius: var(--tooltipRadius, $fallback--tooltipRadius);\n background-color: rgba(0, 0, 0, 0.6);\n opacity: 0.7;\n width: 1.5em;\n height: 1.5em;\n text-align: center;\n line-height: 1.5em;\n font-size: 1.5em;\n cursor: pointer;\n\n &:hover {\n opacity: 1;\n }\n\n svg {\n color: white;\n }\n }\n\n .oauth-tokens {\n width: 100%;\n\n th {\n text-align: left;\n }\n\n .actions {\n text-align: right;\n }\n }\n\n &-usersearch-wrapper {\n padding: 1em;\n }\n\n &-bulk-actions {\n text-align: right;\n padding: 0 1em;\n min-height: 2em;\n\n button {\n width: 10em;\n }\n }\n\n &-domain-mute-form {\n padding: 1em;\n display: flex;\n flex-direction: column;\n\n button {\n align-self: flex-end;\n margin-top: 1em;\n width: 10em;\n }\n }\n\n .setting-subitem {\n margin-left: 1.75em;\n }\n\n .profile-fields {\n display: flex;\n\n & > .emoji-input {\n flex: 1 1 auto;\n margin: 0 0.2em 0.5em;\n min-width: 0;\n }\n\n .delete-field {\n width: 20px;\n align-self: center;\n margin: 0 0.2em 0.5em;\n padding: 0 0.5em;\n }\n }\n}\n","\n.css-unit-input, .css-unit-input select {\n margin-left: 0.5em;\n width: 4em !important;\n max-width: 4em !important;\n min-width: 4em !important;\n}\n","\n.column-settings {\n display: flex;\n justify-content: space-evenly;\n flex-wrap: wrap;\n}\n.column-settings .size-label {\n display: block;\n margin-bottom: 0.5em;\n margin-top: 0.5em;\n}\n","@import '../../_variables.scss';\n\n.color-input {\n display: inline-flex;\n\n &-field.input {\n display: inline-flex;\n flex: 0 0 0;\n max-width: 9em;\n align-items: stretch;\n padding: .2em 8px;\n\n input {\n background: none;\n color: $fallback--lightText;\n color: var(--inputText, $fallback--lightText);\n border: none;\n padding: 0;\n margin: 0;\n\n &.textColor {\n flex: 1 0 3em;\n min-width: 3em;\n padding: 0;\n }\n\n &.nativeColor {\n flex: 0 0 2em;\n min-width: 2em;\n align-self: stretch;\n min-height: 100%;\n }\n }\n .computedIndicator,\n .transparentIndicator {\n flex: 0 0 2em;\n min-width: 2em;\n align-self: stretch;\n min-height: 100%;\n }\n .transparentIndicator {\n // forgot to install counter-strike source, ooops\n background-color: #FF00FF;\n position: relative;\n &::before, &::after {\n display: block;\n content: '';\n background-color: #000000;\n position: absolute;\n height: 50%;\n width: 50%;\n }\n &::after {\n top: 0;\n left: 0;\n }\n &::before {\n bottom: 0;\n right: 0;\n }\n }\n }\n\n .label {\n flex: 1 1 auto;\n }\n\n}\n","\n.color-control {\n input.text-input {\n max-width: 7em;\n flex: 1;\n }\n}\n","\n@import '../../_variables.scss';\n.shadow-control {\n display: flex;\n flex-wrap: wrap;\n justify-content: center;\n margin-bottom: 1em;\n\n .shadow-preview-container,\n .shadow-tweak {\n margin: 5px 6px 0 0;\n }\n .shadow-preview-container {\n flex: 0;\n display: flex;\n flex-wrap: wrap;\n\n $side: 15em;\n\n input[type=number] {\n width: 5em;\n min-width: 2em;\n }\n .x-shift-control,\n .y-shift-control {\n display: flex;\n flex: 0;\n\n &[disabled=disabled] *{\n opacity: .5\n }\n\n }\n\n .x-shift-control {\n align-items: flex-start;\n }\n\n .x-shift-control .wrap,\n input[type=range] {\n margin: 0;\n width: $side;\n height: 2em;\n }\n .y-shift-control {\n flex-direction: column;\n align-items: flex-end;\n .wrap {\n width: 2em;\n height: $side;\n }\n input[type=range] {\n transform-origin: 1em 1em;\n transform: rotate(90deg);\n }\n }\n .preview-window {\n flex: 1;\n background-color: #999999;\n display: flex;\n align-items: center;\n justify-content: center;\n background-image:\n linear-gradient(45deg, #666666 25%, transparent 25%),\n linear-gradient(-45deg, #666666 25%, transparent 25%),\n linear-gradient(45deg, transparent 75%, #666666 75%),\n linear-gradient(-45deg, transparent 75%, #666666 75%);\n background-size: 20px 20px;\n background-position:0 0, 0 10px, 10px -10px, -10px 0;\n\n border-radius: $fallback--inputRadius;\n border-radius: var(--inputRadius, $fallback--inputRadius);\n\n .preview-block {\n width: 33%;\n height: 33%;\n background-color: $fallback--bg;\n background-color: var(--bg, $fallback--bg);\n border-radius: $fallback--panelRadius;\n border-radius: var(--panelRadius, $fallback--panelRadius);\n }\n }\n }\n\n .shadow-tweak {\n flex: 1;\n min-width: 280px;\n\n .id-control {\n align-items: stretch;\n\n .shadow-switcher {\n flex: 1;\n }\n\n .shadow-switcher, .btn {\n min-width: 1px;\n margin-right: 5px;\n }\n\n .btn {\n padding: 0 .4em;\n margin: 0 .1em;\n }\n }\n }\n}\n","\n@import '../../_variables.scss';\n.font-control {\n input.custom-font {\n min-width: 10em;\n }\n &.custom {\n /* TODO Should make proper joiners... */\n .font-switcher {\n border-top-right-radius: 0;\n border-bottom-right-radius: 0;\n }\n .custom-font {\n border-top-left-radius: 0;\n border-bottom-left-radius: 0;\n }\n }\n}\n","\n.contrast-ratio {\n display: flex;\n justify-content: flex-end;\n\n margin-top: -4px;\n margin-bottom: 5px;\n\n .label {\n margin-right: 1em;\n }\n\n .rating {\n display: inline-block;\n text-align: center;\n margin-left: 0.5em;\n }\n}\n","\n.preview-container {\n position: relative;\n}\n.underlay-preview {\n position: absolute;\n top: 0;\n bottom: 0;\n left: 10px;\n right: 10px;\n}\n","@import 'src/_variables.scss';\n.theme-tab {\n padding-bottom: 2em;\n .theme-warning {\n display: flex;\n align-items: baseline;\n margin-bottom: .5em;\n .buttons {\n .btn {\n margin-bottom: .5em;\n }\n }\n }\n .preset-switcher {\n margin-right: 1em;\n }\n\n .style-control {\n display: flex;\n align-items: baseline;\n margin-bottom: 5px;\n\n .label {\n flex: 1;\n }\n\n &.disabled {\n input, select {\n opacity: .5\n }\n }\n\n .opt {\n margin: .5em;\n }\n\n .color-input {\n flex: 0 0 0;\n }\n\n input, select {\n min-width: 3em;\n margin: 0;\n flex: 0;\n\n &[type=number] {\n min-width: 5em;\n }\n\n &[type=range] {\n flex: 1;\n min-width: 3em;\n align-self: flex-start;\n }\n }\n }\n\n .reset-container {\n flex-wrap: wrap;\n }\n\n .fonts-container,\n .reset-container,\n .apply-container,\n .radius-container,\n .color-container,\n {\n display: flex;\n }\n\n .fonts-container,\n .radius-container {\n flex-direction: column;\n }\n\n .color-container{\n > h4 {\n width: 99%;\n }\n flex-wrap: wrap;\n justify-content: space-between;\n }\n\n .fonts-container,\n .color-container,\n .shadow-container,\n .radius-container,\n .presets-container {\n margin: 1em 1em 0;\n }\n\n .tab-header {\n display: flex;\n justify-content: space-between;\n align-items: baseline;\n width: 100%;\n min-height: 30px;\n margin-bottom: 1em;\n\n p {\n flex: 1;\n margin: 0;\n margin-right: .5em;\n }\n }\n\n .tab-header-buttons {\n display: flex;\n flex-direction: column;\n\n .btn {\n min-width: 1px;\n flex: 0 auto;\n padding: 0 1em;\n margin-bottom: .5em;\n }\n }\n\n .shadow-selector {\n .override {\n flex: 1;\n margin-left: .5em;\n }\n .select-container {\n margin-top: -4px;\n margin-bottom: -3px;\n }\n }\n\n .save-load,\n .save-load-options {\n display: flex;\n justify-content: center;\n align-items: baseline;\n flex-wrap: wrap;\n\n .presets,\n .import-export {\n margin-bottom: .5em;\n }\n\n .import-export {\n display: flex;\n }\n\n .override {\n margin-left: .5em;\n }\n }\n\n .save-load-options {\n flex-wrap: wrap;\n margin-top: .5em;\n justify-content: center;\n .keep-option {\n margin: 0 .5em .5em;\n min-width: 25%;\n }\n }\n\n .preview-container {\n border-top: 1px dashed;\n border-bottom: 1px dashed;\n border-color: $fallback--border;\n border-color: var(--border, $fallback--border);\n margin: 1em 0;\n padding: 1em;\n background-color: var(--wallpaper);\n background-image: var(--body-background-image);\n background-size: cover;\n background-position: 50% 50%;\n\n .dummy {\n .post {\n font-family: var(--postFont);\n display: flex;\n\n .content {\n flex: 1;\n\n h4 {\n margin-bottom: .25em;\n }\n\n .icons {\n margin-top: .5em;\n display: flex;\n\n i {\n margin-right: 1em;\n }\n }\n }\n }\n\n .after-post {\n margin-top: 1em;\n display: flex;\n align-items: center;\n }\n\n .avatar, .avatar-alt{\n background: linear-gradient(135deg, #b8e1fc 0%,#a9d2f3 10%,#90bae4 25%,#90bcea 37%,#90bff0 50%,#6ba8e5 51%,#a2daf5 83%,#bdf3fd 100%);\n color: black;\n font-family: sans-serif;\n text-align: center;\n margin-right: 1em;\n }\n\n .avatar-alt {\n flex: 0 auto;\n margin-left: 28px;\n font-size: 12px;\n min-width: 20px;\n min-height: 20px;\n line-height: 20px;\n border-radius: $fallback--avatarAltRadius;\n border-radius: var(--avatarAltRadius, $fallback--avatarAltRadius);\n }\n\n .avatar {\n flex: 0 auto;\n width: 48px;\n height: 48px;\n font-size: 14px;\n line-height: 48px;\n }\n\n .actions {\n display: flex;\n align-items: baseline;\n\n .checkbox {\n display: inline-flex;\n align-items: baseline;\n margin-right: 1em;\n flex: 1;\n }\n }\n\n .separator {\n margin: 1em;\n border-bottom: 1px solid;\n border-color: $fallback--border;\n border-color: var(--border, $fallback--border);\n }\n\n .btn {\n min-width: 3em;\n }\n }\n }\n\n .radius-item,\n .color-item {\n min-width: 20em;\n margin: 5px 6px 0 0;\n display:flex;\n flex-direction: column;\n flex: 1 1 0;\n\n &.wide {\n min-width: 60%\n }\n\n &:not(.wide):nth-child(2n+1) {\n margin-right: 7px;\n\n }\n\n .color, .opacity {\n display:flex;\n align-items: baseline;\n }\n }\n\n .radius-item {\n flex-basis: auto;\n }\n\n .theme-radius-rn,\n .theme-color-cl {\n border: 0;\n box-shadow: none;\n background: transparent;\n color: var(--faint, $fallback--faint);\n align-self: stretch;\n }\n\n .theme-color-cl,\n .theme-radius-in,\n .theme-color-in {\n margin-left: 4px;\n }\n\n .theme-radius-in {\n min-width: 1em;\n }\n\n .theme-radius-in {\n max-width: 7em;\n flex: 1;\n }\n\n .theme-radius-lb{\n max-width: 50em;\n }\n\n .theme-preview-content {\n padding: 20px;\n }\n\n .btn {\n margin-left: .25em;\n margin-right: .25em;\n }\n}\n\n.extra-content {\n .apply-container {\n display: flex;\n flex-direction: row;\n justify-content: space-around;\n flex-grow: 1;\n\n .btn {\n flex-grow: 1;\n min-height: 2em;\n min-width: 0;\n max-width: 10em;\n padding: 0;\n }\n }\n}\n","@import 'src/_variables.scss';\n.settings_tab-switcher {\n height: 100%;\n\n .setting-item {\n border-bottom: 2px solid var(--fg, $fallback--fg);\n margin: 1em 1em 1.4em;\n padding-bottom: 1.4em;\n\n > div,\n > label {\n display: block;\n margin-bottom: .5em;\n &:last-child {\n margin-bottom: 0;\n }\n }\n\n .select-multiple {\n display: flex;\n\n .option-list {\n margin: 0;\n padding-left: .5em;\n }\n }\n\n &:last-child {\n border-bottom: none;\n padding-bottom: 0;\n margin-bottom: 1em;\n }\n\n select {\n min-width: 10em;\n }\n\n textarea {\n width: 100%;\n max-width: 100%;\n height: 100px;\n }\n\n .unavailable,\n .unavailable svg {\n color: var(--cRed, $fallback--cRed);\n color: $fallback--cRed;\n }\n\n .number-input {\n max-width: 6em;\n }\n }\n}\n"],"names":[],"sourceRoot":""}
\ No newline at end of file
diff --git a/priv/static/static/css/1325.715a7f40cdd53f460ef4.css b/priv/static/static/css/1325.715a7f40cdd53f460ef4.css
deleted file mode 100644
index 29e3e12d8d..0000000000
Binary files a/priv/static/static/css/1325.715a7f40cdd53f460ef4.css and /dev/null differ
diff --git a/priv/static/static/css/1325.715a7f40cdd53f460ef4.css.map b/priv/static/static/css/1325.715a7f40cdd53f460ef4.css.map
deleted file mode 100644
index 4e392f2f57..0000000000
--- a/priv/static/static/css/1325.715a7f40cdd53f460ef4.css.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"file":"static/css/1325.715a7f40cdd53f460ef4.css","mappings":"AACA,uBAGE,mBAFA,aACA,YAEA,uBACA,4BACE,YACA,iBCPJ,gBACE,gBAEA,2DAEE,qBACA,iBACA,iEACE,mBAEF,mFACE,gBAKF,2CASE,8CAEA,yBAXF,2CAeI,yCAKN,sCAOE,YADA,eALA,gBACA,qBAEA,wBADA,uCAEA,YAEA,CAEA,yBATF,sCAWI,YADA,eACA,EAGF,kDACE,YACA,kBAEA,uDACE,eACA,eACA,cAKN,iCACE,aACA,mCACE,kBAGF,gDACE,aACA","sources":["webpack://pleroma_fe/./src/components/async_component_error/async_component_error.vue","webpack://pleroma_fe/./src/components/settings_modal/settings_modal.scss"],"sourcesContent":["\n.async-component-error {\n display: flex;\n height: 100%;\n align-items: center;\n justify-content: center;\n .btn {\n margin: .5em;\n padding: .5em 2em;\n }\n}\n","@import 'src/_variables.scss';\n.settings-modal {\n overflow: hidden;\n\n .setting-list,\n .option-list {\n list-style-type: none;\n padding-left: 2em;\n li {\n margin-bottom: 0.5em;\n }\n .suboptions {\n margin-top: 0.3em\n }\n }\n\n &.peek {\n .settings-modal-panel {\n /* Explanation:\n * Modal is positioned vertically centered.\n * 100vh - 100% = Distance between modal's top+bottom boundaries and screen\n * (100vh - 100%) / 2 = Distance between bottom (or top) boundary and screen\n * + 100% - we move modal completely off-screen, it's top boundary touches\n * bottom of the screen\n * - 50px - leaving tiny amount of space so that titlebar + tiny amount of modal is visible\n */\n transform: translateY(calc(((100vh - 100%) / 2 + 100%) - 50px));\n\n @media all and (max-width: 800px) {\n /* For mobile, the modal takes 100% of the available screen.\n This ensures the minimized modal is always 50px above the browser bottom bar regardless of whether or not it is visible.\n */\n transform: translateY(calc(100% - 50px));\n }\n }\n }\n\n .settings-modal-panel {\n overflow: hidden;\n transition: transform;\n transition-timing-function: ease-in-out;\n transition-duration: 300ms;\n width: 1000px;\n max-width: 90vw;\n height: 90vh;\n\n @media all and (max-width: 800px) {\n max-width: 100vw;\n height: 100%;\n }\n\n >.panel-body {\n height: 100%;\n overflow-y: hidden;\n\n .btn {\n min-height: 2em;\n min-width: 10em;\n padding: 0 2em;\n }\n }\n }\n\n .settings-footer {\n display: flex;\n >* {\n margin-right: 0.5em;\n }\n\n .extra-content {\n display: flex;\n flex-grow: 1;\n }\n }\n}\n"],"names":[],"sourceRoot":""}
\ No newline at end of file
diff --git a/priv/static/static/css/8532.88b90ac86f3060a3144e.css b/priv/static/static/css/159.1d523a00378ebd68c5b3.css
similarity index 89%
rename from priv/static/static/css/8532.88b90ac86f3060a3144e.css
rename to priv/static/static/css/159.1d523a00378ebd68c5b3.css
index 7a36bfd7aa..146838cff0 100644
Binary files a/priv/static/static/css/8532.88b90ac86f3060a3144e.css and b/priv/static/static/css/159.1d523a00378ebd68c5b3.css differ
diff --git a/priv/static/static/css/159.1d523a00378ebd68c5b3.css.map b/priv/static/static/css/159.1d523a00378ebd68c5b3.css.map
new file mode 100644
index 0000000000..cb7151a691
--- /dev/null
+++ b/priv/static/static/css/159.1d523a00378ebd68c5b3.css.map
@@ -0,0 +1 @@
+{"version":3,"file":"static/css/159.1d523a00378ebd68c5b3.css","mappings":"AAGA,gBACE,WAEA,0BACE,iBAEA,kDACE,aACA,eACA,cAEA,2DACE,aACA,cAGA,YAFA,WACA,UACA,CAEA,+DACE,YAEA,qEACE","sources":["webpack://pleroma_fe/./src/components/sticker_picker/sticker_picker.vue"],"sourcesContent":["\n@import \"../../variables\";\n\n.sticker-picker {\n width: 100%;\n\n .contents {\n min-height: 250px;\n\n .sticker-picker-content {\n display: flex;\n flex-wrap: wrap;\n padding: 0 4px;\n\n .sticker {\n display: flex;\n flex: 1 1 auto;\n margin: 4px;\n width: 56px;\n height: 56px;\n\n img {\n height: 100%;\n\n &:hover {\n filter: drop-shadow(0 0 5px var(--accent, $fallback--link));\n }\n }\n }\n }\n }\n}\n\n"],"names":[],"sourceRoot":""}
\ No newline at end of file
diff --git a/priv/static/static/css/6464.2fa2e5f1fa93842c62b1.css b/priv/static/static/css/6464.169260b661120cc50815.css
similarity index 92%
rename from priv/static/static/css/6464.2fa2e5f1fa93842c62b1.css
rename to priv/static/static/css/6464.169260b661120cc50815.css
index ed8fef7ccd..240087a1d2 100644
Binary files a/priv/static/static/css/6464.2fa2e5f1fa93842c62b1.css and b/priv/static/static/css/6464.169260b661120cc50815.css differ
diff --git a/priv/static/static/css/6464.169260b661120cc50815.css.map b/priv/static/static/css/6464.169260b661120cc50815.css.map
new file mode 100644
index 0000000000..048efb2b91
--- /dev/null
+++ b/priv/static/static/css/6464.169260b661120cc50815.css.map
@@ -0,0 +1 @@
+{"version":3,"file":"static/css/6464.169260b661120cc50815.css","mappings":"AAEA,oBACE,gBAGF,yBACE,mBAAoB,CACpB,sBAAuB,CACvB,oBAAqB,CAErB,eACA,kBACA,qBAEA,wBADA,sCACA,CAEA,+BACE,eACA,iBAGF,yBAhBF,yBAqBI,aAGF,0BAxBF,yBAyBI,cAGF,kCAGE,8CACA,4CAFA,wCADA,eAGA,CAGE,iDACE,oCAKN,qCAGE,gCADA,mBADA,oBAEA,CAGF,uCAGE,eACA,2BAFA,kBADA,UAGA,CAGF,sCAWE,gDAJA,YANA,qCACA,2CAUA,oBAHA,kBACA,kBAPA,+DAEA,wBADA,uCAEA,WAEA,UAIA,CAGF,qCACE,+BAGF,wCACE,kCAGF,2CAKE,6GACE,CADF,sGADA,gBAHA,qCAEA,wBADA,kCAIE,CAIJ,qCACE,iBAGF,+BAKE,uCAEA,4CACE,YAEA,0BADA,UACA,CAGF,iDACE","sources":["webpack://pleroma_fe/./src/components/update_notification/update_notification.scss"],"sourcesContent":["@import \"src/variables\";\n\n.UpdateNotification {\n overflow: hidden;\n}\n\n.UpdateNotificationModal {\n --__top-fringe: 15em; // how much pleroma-tan should stick her head above\n --__bottom-fringe: 80em; // just reserving as much as we can, number is mostly irrelevant\n --__right-fringe: 8em;\n\n font-size: 15px;\n position: relative;\n transition: transform;\n transition-timing-function: ease-in-out;\n transition-duration: 500ms;\n\n .text {\n max-width: 40em;\n padding-left: 1em;\n }\n\n @media all and (max-width: 800px) {\n /* For mobile, the modal takes 100% of the available screen.\n This ensures the minimized modal is always 50px above the browser\n bottom bar regardless of whether or not it is visible.\n */\n width: 100vw;\n }\n\n @media all and (max-height: 600px) {\n display: none;\n }\n\n .content {\n overflow: hidden;\n margin-top: calc(-1 * var(--__top-fringe));\n margin-bottom: calc(-1 * var(--__bottom-fringe));\n margin-right: calc(-1 * var(--__right-fringe));\n\n &.-noImage {\n .text {\n padding-right: var(--__right-fringe);\n }\n }\n }\n\n .panel-body {\n border-width: 0 0 1px;\n border-style: solid;\n border-color: var(--border, $fallback--border);\n }\n\n .panel-footer {\n z-index: 22;\n position: relative;\n border-width: 0;\n grid-template-columns: auto;\n }\n\n .pleroma-tan {\n object-fit: cover;\n object-position: top;\n transition: position, left, right, top, bottom, max-width, max-height;\n transition-timing-function: ease-in-out;\n transition-duration: 500ms;\n width: 25em;\n float: right;\n z-index: 20;\n position: relative;\n shape-margin: 0.5em;\n filter: drop-shadow(5px 5px 10px rgb(0 0 0 / 50%));\n pointer-events: none;\n }\n\n .spacer-top {\n min-height: var(--__top-fringe);\n }\n\n .spacer-bottom {\n min-height: var(--__bottom-fringe);\n }\n\n .extra-info-group {\n transition: max-height, padding, height;\n transition-timing-function: ease-in;\n transition-duration: 700ms;\n max-height: 70vh;\n mask:\n linear-gradient(to top, white, transparent) bottom/100% 2px no-repeat,\n linear-gradient(to top, white, white);\n }\n\n .art-credit {\n text-align: right;\n }\n\n &.-peek {\n /* Explanation:\n * 100vh - 100% = Distance between modal's top+bottom boundaries and screen\n * (100vh - 100%) / 2 = Distance between bottom (or top) boundary and screen\n */\n transform: translateY(calc(((100vh - 100%) / 2)));\n\n .pleroma-tan {\n float: right;\n z-index: 10;\n shape-image-threshold: 70%;\n }\n\n .extra-info-group {\n max-height: 0;\n }\n }\n}\n"],"names":[],"sourceRoot":""}
\ No newline at end of file
diff --git a/priv/static/static/css/6464.2fa2e5f1fa93842c62b1.css.map b/priv/static/static/css/6464.2fa2e5f1fa93842c62b1.css.map
deleted file mode 100644
index 3812ecde41..0000000000
--- a/priv/static/static/css/6464.2fa2e5f1fa93842c62b1.css.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"file":"static/css/6464.2fa2e5f1fa93842c62b1.css","mappings":"AACA,oBACE,gBAGF,yBACE,mBAAoB,CACpB,sBAAuB,CACvB,oBAAqB,CAErB,eACA,kBACA,qBAEA,wBADA,sCACA,CAEA,+BACE,eACA,iBAGF,yBAhBF,yBAoBI,aAGF,0BAvBF,yBAwBI,cAGF,kCAGE,8CACA,4CAFA,wCADA,eAGA,CAGE,iDACE,oCAKN,qCAGE,gCADA,mBADA,oBAEA,CAGF,uCAGE,eACA,2BAFA,kBADA,UAGA,CAGF,sCAWE,gDAJA,YANA,qCACA,2CAUA,oBAHA,kBACA,kBAPA,+DAEA,wBADA,uCAEA,WAEA,UAIA,CAGF,qCACE,+BAGF,wCACE,kCAGF,2CAKE,6GACE,CADF,sGADA,gBAHA,qCAEA,wBADA,kCAIE,CAIJ,qCACE,iBAGF,+BAKE,uCAEA,4CACE,YAEA,yBADA,UACA,CAGF,iDACE","sources":["webpack://pleroma_fe/./src/components/update_notification/update_notification.scss"],"sourcesContent":["@import 'src/_variables.scss';\n.UpdateNotification {\n overflow: hidden;\n}\n\n.UpdateNotificationModal {\n --__top-fringe: 15em; // how much pleroma-tan should stick her head above\n --__bottom-fringe: 80em; // just reserving as much as we can, number is mostly irrelevant\n --__right-fringe: 8em;\n\n font-size: 15px;\n position: relative;\n transition: transform;\n transition-timing-function: ease-in-out;\n transition-duration: 500ms;\n\n .text {\n max-width: 40em;\n padding-left: 1em;\n }\n\n @media all and (max-width: 800px) {\n /* For mobile, the modal takes 100% of the available screen.\n This ensures the minimized modal is always 50px above the browser bottom bar regardless of whether or not it is visible.\n */\n width: 100vw;\n }\n\n @media all and (max-height: 600px) {\n display: none;\n }\n\n .content {\n overflow: hidden;\n margin-top: calc(-1 * var(--__top-fringe));\n margin-bottom: calc(-1 * var(--__bottom-fringe));\n margin-right: calc(-1 * var(--__right-fringe));\n\n &.-noImage {\n .text {\n padding-right: var(--__right-fringe);\n }\n }\n }\n\n .panel-body {\n border-width: 0 0 1px 0;\n border-style: solid;\n border-color: var(--border, $fallback--border);\n }\n\n .panel-footer {\n z-index: 22;\n position: relative;\n border-width: 0;\n grid-template-columns: auto;\n }\n\n .pleroma-tan {\n object-fit: cover;\n object-position: top;\n transition: position, left, right, top, bottom, max-width, max-height;\n transition-timing-function: ease-in-out;\n transition-duration: 500ms;\n width: 25em;\n float: right;\n z-index: 20;\n position: relative;\n shape-margin: 0.5em;\n filter: drop-shadow(5px 5px 10px rgba(0,0,0,0.5));\n pointer-events: none;\n }\n\n .spacer-top {\n min-height: var(--__top-fringe);\n }\n\n .spacer-bottom {\n min-height: var(--__bottom-fringe);\n }\n\n .extra-info-group {\n transition: max-height, padding, height;\n transition-timing-function: ease-in;\n transition-duration: 700ms;\n max-height: 70vh;\n mask:\n linear-gradient(to top, white, transparent) bottom/100% 2px no-repeat,\n linear-gradient(to top, white, white);\n }\n\n .art-credit {\n text-align: right;\n }\n\n &.-peek {\n /* Explanation:\n * 100vh - 100% = Distance between modal's top+bottom boundaries and screen\n * (100vh - 100%) / 2 = Distance between bottom (or top) boundary and screen\n */\n transform: translateY(calc(((100vh - 100%) / 2)));\n\n .pleroma-tan {\n float: right;\n z-index: 10;\n shape-image-threshold: 0.7;\n }\n\n .extra-info-group {\n max-height: 0;\n }\n }\n}\n"],"names":[],"sourceRoot":""}
\ No newline at end of file
diff --git a/priv/static/static/css/7586.0d43f70bc6240422f179.css b/priv/static/static/css/7586.0d43f70bc6240422f179.css
new file mode 100644
index 0000000000..7da2aa2ea5
Binary files /dev/null and b/priv/static/static/css/7586.0d43f70bc6240422f179.css differ
diff --git a/priv/static/static/css/7586.0d43f70bc6240422f179.css.map b/priv/static/static/css/7586.0d43f70bc6240422f179.css.map
new file mode 100644
index 0000000000..f8f61fe6ef
--- /dev/null
+++ b/priv/static/static/css/7586.0d43f70bc6240422f179.css.map
@@ -0,0 +1 @@
+{"version":3,"file":"static/css/7586.0d43f70bc6240422f179.css","mappings":"AACA,uBAGE,mBAFA,aACA,YAEA,uBAEA,4BACE,YACA,iBCPJ,gBACE,gBAEA,2DAEE,qBACA,iBAEA,iEACE,mBAGF,mFACE,gBAIJ,qCAGE,cADA,kBADA,eAEA,CAGF,sCAOE,YADA,eALA,gBACA,qBAEA,wBADA,uCAEA,YAEA,CAEA,yBATF,sCAWI,YADA,eACA,EAGF,kDACE,YACA,kBAEA,uDACE,eAGF,6EACE,cAKN,iCACE,aACA,eACA,cAEA,mCACE,kBAGF,gDACE,aACA,YAKF,2CASE,8CAEA,yBAXF,2CAgBI","sources":["webpack://pleroma_fe/./src/components/async_component_error/async_component_error.vue","webpack://pleroma_fe/./src/components/settings_modal/settings_modal.scss"],"sourcesContent":["\n.async-component-error {\n display: flex;\n height: 100%;\n align-items: center;\n justify-content: center;\n\n .btn {\n margin: 0.5em;\n padding: 0.5em 2em;\n }\n}\n","@import \"src/variables\";\n\n.settings-modal {\n overflow: hidden;\n\n .setting-list,\n .option-list {\n list-style-type: none;\n padding-left: 2em;\n\n li {\n margin-bottom: 0.5em;\n }\n\n .suboptions {\n margin-top: 0.3em;\n }\n }\n\n .setting-description {\n margin-top: 0.2em;\n margin-bottom: 2em;\n font-size: 70%;\n }\n\n .settings-modal-panel {\n overflow: hidden;\n transition: transform;\n transition-timing-function: ease-in-out;\n transition-duration: 300ms;\n width: 1000px;\n max-width: 90vw;\n height: 90vh;\n\n @media all and (max-width: 800px) {\n max-width: 100vw;\n height: 100%;\n }\n\n >.panel-body {\n height: 100%;\n overflow-y: hidden;\n\n .btn {\n min-height: 2em;\n }\n\n .btn:not(.dropdown-button) {\n padding: 0 2em;\n }\n }\n }\n\n .settings-footer {\n display: flex;\n flex-wrap: wrap;\n line-height: 2;\n\n >* {\n margin-right: 0.5em;\n }\n\n .extra-content {\n display: flex;\n flex-grow: 1;\n }\n }\n\n &.peek {\n .settings-modal-panel {\n /* Explanation:\n * Modal is positioned vertically centered.\n * 100vh - 100% = Distance between modal's top+bottom boundaries and screen\n * (100vh - 100%) / 2 = Distance between bottom (or top) boundary and screen\n * + 100% - we move modal completely off-screen, it's top boundary touches\n * bottom of the screen\n * - 50px - leaving tiny amount of space so that titlebar + tiny amount of modal is visible\n */\n transform: translateY(calc(((100vh - 100%) / 2 + 100%) - 50px));\n\n @media all and (max-width: 800px) {\n /* For mobile, the modal takes 100% of the available screen.\n This ensures the minimized modal is always 50px above the browser bottom\n bar regardless of whether or not it is visible.\n */\n transform: translateY(calc(100% - 50px));\n }\n }\n }\n}\n"],"names":[],"sourceRoot":""}
\ No newline at end of file
diff --git a/priv/static/static/css/7962.76663e78ad5ea0bb0b90.css b/priv/static/static/css/7962.76663e78ad5ea0bb0b90.css
new file mode 100644
index 0000000000..2326ed9323
Binary files /dev/null and b/priv/static/static/css/7962.76663e78ad5ea0bb0b90.css differ
diff --git a/priv/static/static/css/7962.76663e78ad5ea0bb0b90.css.map b/priv/static/static/css/7962.76663e78ad5ea0bb0b90.css.map
new file mode 100644
index 0000000000..9d501f27a0
--- /dev/null
+++ b/priv/static/static/css/7962.76663e78ad5ea0bb0b90.css.map
@@ -0,0 +1 @@
+{"version":3,"file":"static/css/7962.76663e78ad5ea0bb0b90.css","mappings":"AAEE,oBACE,gBACA,aCFF,qBACE,aCAJ,aACE,kBAEA,mBACE,cACA,WAGF,qBAME,wBCbW,CDcX,mCAGA,qBCTe,CDUf,gCACA,iBCCoB,sCDCpB,yBACA,0BACA,sCACA,8BAfA,OAGA,iBAaA,gBAjBA,kBAGA,QADA,SAgBA,UE7BJ,8BACE,gBACA,iBAEA,qCACE,WCLJ,6BACE,gBACA,iBAEA,oCACE,WCLJ,kBAIE,mBAFA,aADA,SAEA,8BAEA,wBAEA,yBACE,iBACA,gBACA,uBAGF,yBACE,WAGF,uCACE,iBCfF,4BAEE,mBADA,YACA,CAEA,8BACE,YAIJ,qCAKE,qDAAuD,CACvD,yDAA2D,CAC3D,6DAA+D,CAC/D,8CAA+C,CAP/C,wBJJgB,CIKhB,6CACA,qCAKgD,CAGlD,wBAEE,mBAIA,oEALA,aAEA,cAGA,CAEA,gCACE,OAIJ,kCAEE,UADA,cACA,CCtCF,2BACE,aACA,kBAEA,kCACE,eCNN,sBACE,YAEA,0CACE,YAGF,oCAGE,eADA,cADA,gBAEA,CAGF,0CACE,WAGF,wCAEE,aACA,sBAFA,WAEA,CAGF,0CACE,oBACA,eACA,WCzBJ,mBACE,qBACA,kBAGF,kBACE,gBACA,eACA,kBCRF,yBACE,qBACA,kBAGF,wBACE,gBACA,eACA,kBCRF,cACE,qBACA,kBAEA,8BACE,iBAIJ,eACE,gBACA,eACA,kBCTA,2BACE,YVWgB,CUVhB,4BAGF,gCACE,0CCNF,sD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mBADA,aADA,cAEA,CAGF,8FAEE,0HACE,CAWF,WACA,uBAEA,iBADA,iBACA,CAGF,iDAOE,kBvB1MoB,CuB2MpB,0CAPA,YAEA,eAGA,iBAJA,iBAGA,gBADA,cAIA,CAGF,6CACE,YAGA,eADA,YAEA,iBAHA,UAGA,CAGF,8CAEE,qBADA,YACA,CAEA,wDAEE,qBADA,oBAGA,MAAK,CADL,gBACA,CAIJ,gDAGE,uBvBpPW,CuBoPX,iBvBpPW,CuBqPX,gCAHA,UAGA,CAGF,0CACE,cAKN,wBACE,gBAGF,+CAIE,aAEA,WADA,sBAFA,mBADA,cAIA,CAEA,yDACE,cAGF,mGACE,iBAGF,8HAGE,qBADA,YACA,CAIJ,uDAME,mBAFA,uBAFA,SACA,gBAEA,sCACA,CAGF,kFAGE,gBAGF,4BAGE,MAAK,CADL,cADA,aAEA,CAGF,4BACE,eAGF,kCACE,aAGF,0BAEE,qBADA,aAEA,mBAGE,wCACE,mBAON,gCACE,aACA,mBAEA,WAAU,CADV,4BACA,CAGA,qCACE,YAGA,eAFA,eACA,YAEA,UC1VN,uBACE,YAEA,qCACE,0CACA,qBACA,qBAEA,oFAEE,cACA,mBAEA,0GACE,gBAIJ,sDACE,aAEA,mEACE,SACA,kBAIJ,gDACE,mBAEA,kBADA,gBACA,CAGF,4CACE,eAGF,8CAGE,aADA,eADA,UAEA,CAGF,wGAEE,sBACA,SxBnCW","sources":["webpack://pleroma_fe/./src/components/importer/importer.vue","webpack://pleroma_fe/./src/components/exporter/exporter.vue","webpack://pleroma_fe/./src/components/autosuggest/autosuggest.vue","webpack://pleroma_fe/./src/_variables.scss","webpack://pleroma_fe/./src/components/block_card/block_card.vue","webpack://pleroma_fe/./src/components/mute_card/mute_card.vue","webpack://pleroma_fe/./src/components/domain_mute_card/domain_mute_card.vue","webpack://pleroma_fe/./src/components/selectable_list/selectable_list.vue","webpack://pleroma_fe/./src/hocs/with_subscription/with_subscription.scss","webpack://pleroma_fe/./src/components/settings_modal/tabs/mutes_and_blocks_tab.scss","webpack://pleroma_fe/./src/components/settings_modal/helpers/modified_indicator.vue","webpack://pleroma_fe/./src/components/settings_modal/helpers/profile_setting_indicator.vue","webpack://pleroma_fe/./src/components/settings_modal/helpers/draft_buttons.vue","webpack://pleroma_fe/./src/components/settings_modal/tabs/security_tab/mfa_backup_codes.vue","webpack://pleroma_fe/./src/components/settings_modal/tabs/security_tab/mfa.vue","webpack://pleroma_fe/./node_modules/cropperjs/dist/cropper.css","webpack://pleroma_fe/./src/components/image_cropper/image_cropper.vue","webpack://pleroma_fe/./src/components/settings_modal/tabs/profile_tab.scss","webpack://pleroma_fe/./src/components/settings_modal/helpers/size_setting.vue","webpack://pleroma_fe/./src/components/settings_modal/tabs/general_tab.vue","webpack://pleroma_fe/./src/components/color_input/color_input.scss","webpack://pleroma_fe/./src/components/color_input/color_input.vue","webpack://pleroma_fe/./src/components/shadow_control/shadow_control.vue","webpack://pleroma_fe/./src/components/font_control/font_control.vue","webpack://pleroma_fe/./src/components/contrast_ratio/contrast_ratio.vue","webpack://pleroma_fe/./src/components/settings_modal/tabs/theme_tab/preview.vue","webpack://pleroma_fe/./src/components/settings_modal/tabs/theme_tab/theme_tab.scss","webpack://pleroma_fe/./src/components/settings_modal/settings_modal_user_content.scss"],"sourcesContent":["\n.importer {\n &-uploading {\n font-size: 1.5em;\n margin: 0.25em;\n }\n}\n","\n.exporter {\n &-processing {\n margin: 0.25em;\n }\n}\n","\n@import \"../../variables\";\n\n.autosuggest {\n position: relative;\n\n &-input {\n display: block;\n width: 100%;\n }\n\n &-results {\n position: absolute;\n left: 0;\n top: 100%;\n right: 0;\n max-height: 400px;\n background-color: $fallback--bg;\n background-color: var(--bg, $fallback--bg);\n border-style: solid;\n border-width: 1px;\n border-color: $fallback--border;\n border-color: var(--border, $fallback--border);\n border-radius: $fallback--inputRadius;\n border-radius: var(--inputRadius, $fallback--inputRadius);\n border-top-left-radius: 0;\n border-top-right-radius: 0;\n box-shadow: 1px 1px 4px rgb(0 0 0 / 60%);\n box-shadow: var(--panelShadow);\n overflow-y: auto;\n z-index: 1;\n }\n}\n","$main-color: #f58d2c;\n$main-background: white;\n$darkened-background: whitesmoke;\n\n$fallback--bg: #121a24;\n$fallback--fg: #182230;\n$fallback--faint: rgb(185 185 186 / 50%);\n$fallback--text: #b9b9ba;\n$fallback--link: #d8a070;\n$fallback--icon: #666;\n$fallback--lightBg: rgb(21 30 42);\n$fallback--lightText: #b9b9ba;\n$fallback--border: #222;\n$fallback--cRed: #f00;\n$fallback--cBlue: #0095ff;\n$fallback--cGreen: #0fa00f;\n$fallback--cOrange: orange;\n\n$fallback--alertError: rgb(211 16 20 / 50%);\n$fallback--alertWarning: rgb(111 111 20 / 50%);\n\n$fallback--panelRadius: 10px;\n$fallback--checkboxRadius: 2px;\n$fallback--btnRadius: 4px;\n$fallback--inputRadius: 4px;\n$fallback--tooltipRadius: 5px;\n$fallback--avatarRadius: 4px;\n$fallback--avatarAltRadius: 10px;\n$fallback--attachmentRadius: 10px;\n$fallback--chatMessageRadius: 10px;\n\n$fallback--buttonShadow: 0 0 2px 0 rgb(0 0 0 / 100%),\n 0 1px 0 0 rgb(255 255 255 / 20%) inset,\n 0 -1px 0 0 rgb(0 0 0 / 20%) inset;\n\n$status-margin: 0.75em;\n","\n.block-card-content-container {\n margin-top: 0.5em;\n text-align: right;\n\n button {\n width: 10em;\n }\n}\n","\n.mute-card-content-container {\n margin-top: 0.5em;\n text-align: right;\n\n button {\n width: 10em;\n }\n}\n","\n.domain-mute-card {\n flex: 1 0;\n display: flex;\n justify-content: space-between;\n align-items: center;\n padding: 0.6em 1em 0.6em 0;\n\n &-domain {\n margin-right: 1em;\n overflow: hidden;\n text-overflow: ellipsis;\n }\n\n button {\n width: 10em;\n }\n\n .autosuggest-results & {\n padding-left: 1em;\n }\n}\n","\n@import \"../../variables\";\n\n.selectable-list {\n &-item-inner {\n display: flex;\n align-items: center;\n\n > * {\n min-width: 0;\n }\n }\n\n &-item-selected-inner {\n background-color: $fallback--lightBg;\n background-color: var(--selectedMenu, $fallback--lightBg);\n color: var(--selectedMenuText, $fallback--text);\n\n --faint: var(--selectedMenuFaintText, $fallback--faint);\n --faintLink: var(--selectedMenuFaintLink, $fallback--faint);\n --lightText: var(--selectedMenuLightText, $fallback--lightText);\n --icon: var(--selectedMenuIcon, $fallback--icon);\n }\n\n &-header {\n display: flex;\n align-items: center;\n padding: 0.6em 0;\n border-bottom: 2px solid;\n border-bottom-color: $fallback--border;\n border-bottom-color: var(--border, $fallback--border);\n\n &-actions {\n flex: 1;\n }\n }\n\n &-checkbox-wrapper {\n padding: 0 10px;\n flex: none;\n }\n}\n",".with-subscription {\n &-loading {\n padding: 10px;\n text-align: center;\n\n .error {\n font-size: 1rem;\n }\n }\n}\n",".mutes-and-blocks-tab {\n height: 100%;\n\n .usersearch-wrapper {\n padding: 1em;\n }\n\n .bulk-actions {\n text-align: right;\n padding: 0 1em;\n min-height: 2em;\n }\n\n .bulk-action-button {\n width: 10em;\n }\n\n .domain-mute-form {\n padding: 1em;\n display: flex;\n flex-direction: column;\n }\n\n .domain-mute-button {\n align-self: flex-end;\n margin-top: 1em;\n width: 10em;\n }\n}\n","\n.ModifiedIndicator {\n display: inline-block;\n position: relative;\n}\n\n.modified-tooltip {\n margin: 0.5em 1em;\n min-width: 10em;\n text-align: center;\n}\n","\n.ProfileSettingIndicator {\n display: inline-block;\n position: relative;\n}\n\n.profilesetting-tooltip {\n margin: 0.5em 1em;\n min-width: 10em;\n text-align: center;\n}\n","\n.DraftButtons {\n display: inline-block;\n position: relative;\n\n .button-default {\n margin-left: 0.5em;\n }\n}\n\n.draft-tooltip {\n margin: 0.5em 1em;\n min-width: 10em;\n text-align: center;\n}\n","\n@import \"../../../../variables\";\n\n.mfa-backup-codes {\n .warning {\n color: $fallback--cOrange;\n color: var(--cOrange, $fallback--cOrange);\n }\n\n .backup-codes {\n font-family: var(--postCodeFont, monospace);\n }\n}\n","\n@import \"../../../../variables\";\n\n.mfa-settings {\n .mfa-heading,\n .method-item {\n display: flex;\n flex-wrap: wrap;\n justify-content: space-between;\n align-items: baseline;\n }\n\n .warning {\n color: $fallback--cOrange;\n color: var(--cOrange, $fallback--cOrange);\n }\n\n .setup-otp {\n display: flex;\n justify-content: center;\n flex-wrap: wrap;\n\n .qr-code {\n flex: 1;\n padding-right: 10px;\n }\n .verify { flex: 1; }\n .error { margin: 4px 0 0; }\n\n .confirm-otp-actions {\n button {\n width: 15em;\n margin-top: 5px;\n }\n }\n }\n}\n","/*!\n * Cropper.js v1.5.13\n * https://fengyuanchen.github.io/cropperjs\n *\n * Copyright 2015-present Chen Fengyuan\n * Released under the MIT license\n *\n * Date: 2022-11-20T05:30:43.444Z\n */\n\n.cropper-container {\n direction: ltr;\n font-size: 0;\n line-height: 0;\n position: relative;\n -ms-touch-action: none;\n touch-action: none;\n -webkit-user-select: none;\n -moz-user-select: none;\n -ms-user-select: none;\n user-select: none;\n}\n\n.cropper-container img {\n -webkit-backface-visibility: hidden;\n backface-visibility: hidden;\n display: block;\n height: 100%;\n image-orientation: 0deg;\n max-height: none !important;\n max-width: none !important;\n min-height: 0 !important;\n min-width: 0 !important;\n width: 100%;\n }\n\n.cropper-wrap-box,\n.cropper-canvas,\n.cropper-drag-box,\n.cropper-crop-box,\n.cropper-modal {\n bottom: 0;\n left: 0;\n position: absolute;\n right: 0;\n top: 0;\n}\n\n.cropper-wrap-box,\n.cropper-canvas {\n overflow: hidden;\n}\n\n.cropper-drag-box {\n background-color: #fff;\n opacity: 0;\n}\n\n.cropper-modal {\n background-color: #000;\n opacity: 0.5;\n}\n\n.cropper-view-box {\n display: block;\n height: 100%;\n outline: 1px solid #39f;\n outline-color: rgba(51, 153, 255, 75%);\n overflow: hidden;\n width: 100%;\n}\n\n.cropper-dashed {\n border: 0 dashed #eee;\n display: block;\n opacity: 0.5;\n position: absolute;\n}\n\n.cropper-dashed.dashed-h {\n border-bottom-width: 1px;\n border-top-width: 1px;\n height: calc(100% / 3);\n left: 0;\n top: calc(100% / 3);\n width: 100%;\n }\n\n.cropper-dashed.dashed-v {\n border-left-width: 1px;\n border-right-width: 1px;\n height: 100%;\n left: calc(100% / 3);\n top: 0;\n width: calc(100% / 3);\n }\n\n.cropper-center {\n display: block;\n height: 0;\n left: 50%;\n opacity: 0.75;\n position: absolute;\n top: 50%;\n width: 0;\n}\n\n.cropper-center::before,\n .cropper-center::after {\n background-color: #eee;\n content: \" \";\n display: block;\n position: absolute;\n }\n\n.cropper-center::before {\n height: 1px;\n left: -3px;\n top: 0;\n width: 7px;\n }\n\n.cropper-center::after {\n height: 7px;\n left: 0;\n top: -3px;\n width: 1px;\n }\n\n.cropper-face,\n.cropper-line,\n.cropper-point {\n display: block;\n height: 100%;\n opacity: 0.1;\n position: absolute;\n width: 100%;\n}\n\n.cropper-face {\n background-color: #fff;\n left: 0;\n top: 0;\n}\n\n.cropper-line {\n background-color: #39f;\n}\n\n.cropper-line.line-e {\n cursor: ew-resize;\n right: -3px;\n top: 0;\n width: 5px;\n }\n\n.cropper-line.line-n {\n cursor: ns-resize;\n height: 5px;\n left: 0;\n top: -3px;\n }\n\n.cropper-line.line-w {\n cursor: ew-resize;\n left: -3px;\n top: 0;\n width: 5px;\n }\n\n.cropper-line.line-s {\n bottom: -3px;\n cursor: ns-resize;\n height: 5px;\n left: 0;\n }\n\n.cropper-point {\n background-color: #39f;\n height: 5px;\n opacity: 0.75;\n width: 5px;\n}\n\n.cropper-point.point-e {\n cursor: ew-resize;\n margin-top: -3px;\n right: -3px;\n top: 50%;\n }\n\n.cropper-point.point-n {\n cursor: ns-resize;\n left: 50%;\n margin-left: -3px;\n top: -3px;\n }\n\n.cropper-point.point-w {\n cursor: ew-resize;\n left: -3px;\n margin-top: -3px;\n top: 50%;\n }\n\n.cropper-point.point-s {\n bottom: -3px;\n cursor: s-resize;\n left: 50%;\n margin-left: -3px;\n }\n\n.cropper-point.point-ne {\n cursor: nesw-resize;\n right: -3px;\n top: -3px;\n }\n\n.cropper-point.point-nw {\n cursor: nwse-resize;\n left: -3px;\n top: -3px;\n }\n\n.cropper-point.point-sw {\n bottom: -3px;\n cursor: nesw-resize;\n left: -3px;\n }\n\n.cropper-point.point-se {\n bottom: -3px;\n cursor: nwse-resize;\n height: 20px;\n opacity: 1;\n right: -3px;\n width: 20px;\n }\n\n@media (min-width: 768px) {\n\n.cropper-point.point-se {\n height: 15px;\n width: 15px;\n }\n }\n\n@media (min-width: 992px) {\n\n.cropper-point.point-se {\n height: 10px;\n width: 10px;\n }\n }\n\n@media (min-width: 1200px) {\n\n.cropper-point.point-se {\n height: 5px;\n opacity: 0.75;\n width: 5px;\n }\n }\n\n.cropper-point.point-se::before {\n background-color: #39f;\n bottom: -50%;\n content: \" \";\n display: block;\n height: 200%;\n opacity: 0;\n position: absolute;\n right: -50%;\n width: 200%;\n }\n\n.cropper-invisible {\n opacity: 0;\n}\n\n.cropper-bg {\n background-image: url(\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQAQMAAAAlPW0iAAAAA3NCSVQICAjb4U/gAAAABlBMVEXMzMz////TjRV2AAAACXBIWXMAAArrAAAK6wGCiw1aAAAAHHRFWHRTb2Z0d2FyZQBBZG9iZSBGaXJld29ya3MgQ1M26LyyjAAAABFJREFUCJlj+M/AgBVhF/0PAH6/D/HkDxOGAAAAAElFTkSuQmCC\");\n}\n\n.cropper-hide {\n display: block;\n height: 0;\n position: absolute;\n width: 0;\n}\n\n.cropper-hidden {\n display: none !important;\n}\n\n.cropper-move {\n cursor: move;\n}\n\n.cropper-crop {\n cursor: crosshair;\n}\n\n.cropper-disabled .cropper-drag-box,\n.cropper-disabled .cropper-face,\n.cropper-disabled .cropper-line,\n.cropper-disabled .cropper-point {\n cursor: not-allowed;\n}\n","\n.image-cropper {\n &-img-input {\n display: none;\n }\n\n &-image-container {\n position: relative;\n\n img {\n display: block;\n max-width: 100%;\n }\n }\n\n &-buttons-wrapper {\n margin-top: 10px;\n\n button {\n margin-top: 5px;\n }\n }\n}\n","@import \"../../../variables\";\n\n.profile-tab {\n .bio {\n margin: 0;\n }\n\n .visibility-tray {\n padding-top: 5px;\n }\n\n input[type=\"file\"] {\n padding: 5px;\n height: auto;\n }\n\n .banner-background-preview {\n max-width: 100%;\n width: 300px;\n position: relative;\n\n img {\n width: 100%;\n }\n }\n\n .uploading {\n font-size: 1.5em;\n margin: 0.25em;\n }\n\n .name-changer {\n width: 100%;\n }\n\n .current-avatar-container {\n position: relative;\n width: 150px;\n height: 150px;\n }\n\n .current-avatar {\n display: block;\n width: 100%;\n height: 100%;\n border-radius: $fallback--avatarRadius;\n border-radius: var(--avatarRadius, $fallback--avatarRadius);\n }\n\n .reset-button {\n position: absolute;\n top: 0.2em;\n right: 0.2em;\n border-radius: $fallback--tooltipRadius;\n border-radius: var(--tooltipRadius, $fallback--tooltipRadius);\n background-color: rgb(0 0 0 / 60%);\n opacity: 0.7;\n width: 1.5em;\n height: 1.5em;\n text-align: center;\n line-height: 1.5em;\n font-size: 1.5em;\n cursor: pointer;\n\n &:hover {\n opacity: 1;\n }\n\n svg {\n color: white;\n }\n }\n\n .oauth-tokens {\n width: 100%;\n\n th {\n text-align: left;\n }\n\n .actions {\n text-align: right;\n }\n }\n\n &-usersearch-wrapper {\n padding: 1em;\n }\n\n &-bulk-actions {\n text-align: right;\n padding: 0 1em;\n min-height: 2em;\n\n button {\n width: 10em;\n }\n }\n\n &-domain-mute-form {\n padding: 1em;\n display: flex;\n flex-direction: column;\n\n button {\n align-self: flex-end;\n margin-top: 1em;\n width: 10em;\n }\n }\n\n .setting-subitem {\n margin-left: 1.75em;\n }\n\n .profile-fields {\n display: flex;\n\n & > .emoji-input {\n flex: 1 1 auto;\n margin: 0 0.2em 0.5em;\n min-width: 0;\n }\n\n .delete-field {\n width: 20px;\n align-self: center;\n margin: 0 0.2em 0.5em;\n padding: 0 0.5em;\n }\n }\n\n .birthday-input {\n display: block;\n margin-bottom: 1em;\n }\n}\n","\n.SizeSetting {\n .number-input {\n max-width: 6.5em;\n }\n\n .css-unit-input,\n .css-unit-input select {\n margin-left: 0.5em;\n width: 4em;\n max-width: 4em;\n min-width: 4em;\n }\n}\n\n","\n.column-settings {\n display: flex;\n justify-content: space-evenly;\n flex-wrap: wrap;\n}\n\n.column-settings .size-label {\n display: block;\n margin-bottom: 0.5em;\n margin-top: 0.5em;\n}\n","@import \"../../variables\";\n\n.color-input {\n display: inline-flex;\n\n &-field.input {\n display: inline-flex;\n flex: 0 0 0;\n max-width: 9em;\n align-items: stretch;\n padding: 0.2em 8px;\n\n input {\n background: none;\n color: $fallback--lightText;\n color: var(--inputText, $fallback--lightText);\n border: none;\n padding: 0;\n margin: 0;\n\n &.textColor {\n flex: 1 0 3em;\n min-width: 3em;\n padding: 0;\n }\n\n &.nativeColor {\n flex: 0 0 2em;\n min-width: 2em;\n align-self: stretch;\n min-height: 100%;\n }\n }\n\n .computedIndicator,\n .transparentIndicator {\n flex: 0 0 2em;\n min-width: 2em;\n align-self: stretch;\n min-height: 100%;\n }\n\n .transparentIndicator {\n // forgot to install counter-strike source, ooops\n background-color: #f0f;\n position: relative;\n\n &::before,\n &::after {\n display: block;\n content: \"\";\n background-color: #000;\n position: absolute;\n height: 50%;\n width: 50%;\n }\n\n &::after {\n top: 0;\n left: 0;\n }\n\n &::before {\n bottom: 0;\n right: 0;\n }\n }\n }\n\n .label {\n flex: 1 1 auto;\n }\n}\n","\n.color-control {\n input.text-input {\n max-width: 7em;\n flex: 1;\n }\n}\n","\n@import \"../../variables\";\n\n.shadow-control {\n display: flex;\n flex-wrap: wrap;\n justify-content: center;\n margin-bottom: 1em;\n\n .shadow-preview-container,\n .shadow-tweak {\n margin: 5px 6px 0 0;\n }\n\n .shadow-preview-container {\n flex: 0;\n display: flex;\n flex-wrap: wrap;\n\n $side: 15em;\n\n input[type=\"number\"] {\n width: 5em;\n min-width: 2em;\n }\n\n .x-shift-control,\n .y-shift-control {\n display: flex;\n flex: 0;\n\n &[disabled=\"disabled\"] * {\n opacity: 0.5;\n }\n }\n\n .x-shift-control {\n align-items: flex-start;\n }\n\n .x-shift-control .wrap,\n input[type=\"range\"] {\n margin: 0;\n width: $side;\n height: 2em;\n }\n\n .y-shift-control {\n flex-direction: column;\n align-items: flex-end;\n\n .wrap {\n width: 2em;\n height: $side;\n }\n\n input[type=\"range\"] {\n transform-origin: 1em 1em;\n transform: rotate(90deg);\n }\n }\n\n .preview-window {\n flex: 1;\n background-color: #999;\n display: flex;\n align-items: center;\n justify-content: center;\n background-image:\n linear-gradient(45deg, #666 25%, transparent 25%),\n linear-gradient(-45deg, #666 25%, transparent 25%),\n linear-gradient(45deg, transparent 75%, #666 75%),\n linear-gradient(-45deg, transparent 75%, #666 75%);\n background-size: 20px 20px;\n background-position: 0 0, 0 10px, 10px -10px, -10px 0;\n border-radius: $fallback--inputRadius;\n border-radius: var(--inputRadius, $fallback--inputRadius);\n\n .preview-block {\n width: 33%;\n height: 33%;\n background-color: $fallback--bg;\n background-color: var(--bg, $fallback--bg);\n border-radius: $fallback--panelRadius;\n border-radius: var(--panelRadius, $fallback--panelRadius);\n }\n }\n }\n\n .shadow-tweak {\n flex: 1;\n min-width: 280px;\n\n .id-control {\n align-items: stretch;\n\n .shadow-switcher {\n flex: 1;\n }\n\n .shadow-switcher,\n .btn {\n min-width: 1px;\n margin-right: 5px;\n }\n\n .btn {\n padding: 0 0.4em;\n margin: 0 0.1em;\n }\n }\n }\n}\n","\n@import \"../../variables\";\n\n.font-control {\n input.custom-font {\n min-width: 10em;\n }\n\n &.custom {\n /* TODO Should make proper joiners... */\n .font-switcher {\n border-top-right-radius: 0;\n border-bottom-right-radius: 0;\n }\n\n .custom-font {\n border-top-left-radius: 0;\n border-bottom-left-radius: 0;\n }\n }\n}\n","\n.contrast-ratio {\n display: flex;\n justify-content: flex-end;\n margin-top: -4px;\n margin-bottom: 5px;\n\n .label {\n margin-right: 1em;\n }\n\n .rating {\n display: inline-block;\n text-align: center;\n margin-left: 0.5em;\n }\n}\n","\n.preview-container {\n position: relative;\n}\n\n.underlay-preview {\n position: absolute;\n top: 0;\n bottom: 0;\n left: 10px;\n right: 10px;\n}\n","@import \"src/variables\";\n\n.theme-tab {\n padding-bottom: 2em;\n\n .preset-switcher {\n margin-right: 1em;\n }\n\n .btn {\n margin-left: 0.25em;\n margin-right: 0.25em;\n }\n\n .style-control {\n display: flex;\n align-items: baseline;\n margin-bottom: 5px;\n\n .label {\n flex: 1;\n }\n\n .opt {\n margin: 0.5em;\n }\n\n .color-input {\n flex: 0 0 0;\n }\n\n input,\n select {\n min-width: 3em;\n margin: 0;\n flex: 0;\n\n &[type=\"number\"] {\n min-width: 5em;\n }\n\n &[type=\"range\"] {\n flex: 1;\n min-width: 3em;\n align-self: flex-start;\n }\n }\n\n &.disabled {\n input,\n select {\n opacity: 0.5;\n }\n }\n }\n\n .reset-container {\n flex-wrap: wrap;\n }\n\n .fonts-container,\n .reset-container,\n .apply-container,\n .radius-container,\n .color-container, {\n display: flex;\n }\n\n .fonts-container,\n .radius-container {\n flex-direction: column;\n }\n\n .color-container {\n > h4 {\n width: 99%;\n }\n\n flex-wrap: wrap;\n justify-content: space-between;\n }\n\n .fonts-container,\n .color-container,\n .shadow-container,\n .radius-container,\n .presets-container {\n margin: 1em 1em 0;\n }\n\n .tab-header {\n display: flex;\n justify-content: space-between;\n align-items: baseline;\n width: 100%;\n min-height: 30px;\n margin-bottom: 1em;\n\n p {\n flex: 1;\n margin: 0;\n margin-right: 0.5em;\n }\n }\n\n .tab-header-buttons {\n display: flex;\n flex-direction: column;\n\n .btn {\n min-width: 1px;\n flex: 0 auto;\n padding: 0 1em;\n margin-bottom: 0.5em;\n }\n }\n\n .shadow-selector {\n .override {\n flex: 1;\n margin-left: 0.5em;\n }\n\n .select-container {\n margin-top: -4px;\n margin-bottom: -3px;\n }\n }\n\n .save-load,\n .save-load-options {\n display: flex;\n justify-content: center;\n align-items: baseline;\n flex-wrap: wrap;\n\n .presets,\n .import-export {\n margin-bottom: 0.5em;\n }\n\n .import-export {\n display: flex;\n }\n\n .override {\n margin-left: 0.5em;\n }\n }\n\n .save-load-options {\n flex-wrap: wrap;\n margin-top: 0.5em;\n justify-content: center;\n\n .keep-option {\n margin: 0 0.5em 0.5em;\n min-width: 25%;\n }\n }\n\n .preview-container {\n border-top: 1px dashed;\n border-bottom: 1px dashed;\n border-color: $fallback--border;\n border-color: var(--border, $fallback--border);\n margin: 1em 0;\n padding: 1em;\n background-color: var(--wallpaper);\n background-image: var(--body-background-image);\n background-size: cover;\n background-position: 50% 50%;\n\n .dummy {\n .post {\n font-family: var(--postFont);\n display: flex;\n\n .content {\n flex: 1;\n\n h4 {\n margin-bottom: 0.25em;\n }\n\n .icons {\n margin-top: 0.5em;\n display: flex;\n\n i {\n margin-right: 1em;\n }\n }\n }\n }\n\n .after-post {\n margin-top: 1em;\n display: flex;\n align-items: center;\n }\n\n .avatar,\n .avatar-alt {\n background:\n linear-gradient(\n 135deg,\n #b8e1fc 0%,\n #a9d2f3 10%,\n #90bae4 25%,\n #90bcea 37%,\n #90bff0 50%,\n #6ba8e5 51%,\n #a2daf5 83%,\n #bdf3fd 100%\n );\n color: black;\n font-family: sans-serif;\n text-align: center;\n margin-right: 1em;\n }\n\n .avatar-alt {\n flex: 0 auto;\n margin-left: 28px;\n font-size: 12px;\n min-width: 20px;\n min-height: 20px;\n line-height: 20px;\n border-radius: $fallback--avatarAltRadius;\n border-radius: var(--avatarAltRadius, $fallback--avatarAltRadius);\n }\n\n .avatar {\n flex: 0 auto;\n width: 48px;\n height: 48px;\n font-size: 14px;\n line-height: 48px;\n }\n\n .actions {\n display: flex;\n align-items: baseline;\n\n .checkbox {\n display: inline-flex;\n align-items: baseline;\n margin-right: 1em;\n flex: 1;\n }\n }\n\n .separator {\n margin: 1em;\n border-bottom: 1px solid;\n border-color: $fallback--border;\n border-color: var(--border, $fallback--border);\n }\n\n .btn {\n min-width: 3em;\n }\n }\n }\n\n .radius-item {\n flex-basis: auto;\n }\n\n .radius-item,\n .color-item {\n min-width: 20em;\n margin: 5px 6px 0 0;\n display: flex;\n flex-direction: column;\n flex: 1 1 0;\n\n &.wide {\n min-width: 60%;\n }\n\n &:not(.wide):nth-child(2n+1) {\n margin-right: 7px;\n }\n\n .color,\n .opacity {\n display: flex;\n align-items: baseline;\n }\n }\n\n .theme-radius-rn,\n .theme-color-cl {\n border: 0;\n box-shadow: none;\n background: transparent;\n color: var(--faint, $fallback--faint);\n align-self: stretch;\n }\n\n .theme-color-cl,\n .theme-radius-in,\n .theme-color-in {\n margin-left: 4px;\n }\n\n .theme-radius-in {\n min-width: 1em;\n max-width: 7em;\n flex: 1;\n }\n\n .theme-radius-lb {\n max-width: 50em;\n }\n\n .theme-preview-content {\n padding: 20px;\n }\n\n .theme-warning {\n display: flex;\n align-items: baseline;\n margin-bottom: 0.5em;\n\n .buttons {\n .btn {\n margin-bottom: 0.5em;\n }\n }\n }\n}\n\n.extra-content {\n .apply-container {\n display: flex;\n flex-direction: row;\n justify-content: space-around;\n flex-grow: 1;\n\n /* stylelint-disable-next-line no-descending-specificity */\n .btn {\n flex-grow: 1;\n min-height: 2em;\n min-width: 0;\n max-width: 10em;\n padding: 0;\n }\n }\n}\n","@import \"src/variables\";\n\n.settings_tab-switcher {\n height: 100%;\n\n .setting-item {\n border-bottom: 2px solid var(--fg, $fallback--fg);\n margin: 1em 1em 1.4em;\n padding-bottom: 1.4em;\n\n > div,\n > label {\n display: block;\n margin-bottom: 0.5em;\n\n &:last-child {\n margin-bottom: 0;\n }\n }\n\n .select-multiple {\n display: flex;\n\n .option-list {\n margin: 0;\n padding-left: 0.5em;\n }\n }\n\n &:last-child {\n border-bottom: none;\n padding-bottom: 0;\n margin-bottom: 1em;\n }\n\n select {\n min-width: 10em;\n }\n\n textarea {\n width: 100%;\n max-width: 100%;\n height: 100px;\n }\n\n .unavailable,\n .unavailable svg {\n color: var(--cRed, $fallback--cRed);\n color: $fallback--cRed;\n }\n }\n}\n"],"names":[],"sourceRoot":""}
\ No newline at end of file
diff --git a/priv/static/static/css/8532.88b90ac86f3060a3144e.css.map b/priv/static/static/css/8532.88b90ac86f3060a3144e.css.map
deleted file mode 100644
index 271f4c7e9b..0000000000
--- a/priv/static/static/css/8532.88b90ac86f3060a3144e.css.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"file":"static/css/8532.88b90ac86f3060a3144e.css","mappings":"AAGA,gBACE,WACA,0BACE,iBACA,kDACE,aACA,eACA,cACA,2DACE,aACA,cAGA,YAFA,WACA,UACA,CACA,+DACE,YACA,qEACE","sources":["webpack://pleroma_fe/./src/components/sticker_picker/sticker_picker.vue"],"sourcesContent":["\n@import '../../_variables.scss';\n\n.sticker-picker {\n width: 100%;\n .contents {\n min-height: 250px;\n .sticker-picker-content {\n display: flex;\n flex-wrap: wrap;\n padding: 0 4px;\n .sticker {\n display: flex;\n flex: 1 1 auto;\n margin: 4px;\n width: 56px;\n height: 56px;\n img {\n height: 100%;\n &:hover {\n filter: drop-shadow(0 0 5px var(--accent, $fallback--link));\n }\n }\n }\n }\n }\n}\n\n"],"names":[],"sourceRoot":""}
\ No newline at end of file
diff --git a/priv/static/static/css/8859.d26a3b0841a7beb8fd4a.css b/priv/static/static/css/8859.d26a3b0841a7beb8fd4a.css
new file mode 100644
index 0000000000..b89695d29a
Binary files /dev/null and b/priv/static/static/css/8859.d26a3b0841a7beb8fd4a.css differ
diff --git a/priv/static/static/css/8859.d26a3b0841a7beb8fd4a.css.map b/priv/static/static/css/8859.d26a3b0841a7beb8fd4a.css.map
new file mode 100644
index 0000000000..c0ebb3d85b
--- /dev/null
+++ b/priv/static/static/css/8859.d26a3b0841a7beb8fd4a.css.map
@@ -0,0 +1 @@
+{"version":3,"file":"static/css/8859.d26a3b0841a7beb8fd4a.css","mappings":"AACA,mBACE,qBACA,kBAGF,kBACE,gBACA,eACA,kBCRF,yBACE,qBACA,kBAGF,wBACE,gBACA,eACA,kBCRF,cACE,qBACA,kBAEA,8BACE,iBAIJ,eACE,gBACA,eACA,kBCXA,+BACE,cAEA,YACA,mBAFA,UAEA,CAGF,qCAEE,aACA,sBAFA,gBAGA,WAIA,8CAEE,qBADA,kBACA,CAGF,wCAME,kBAHA,cAFA,OAIA,WAEA,eAAc,CAHd,cAFA,OAKA,CAGF,2CAGE,iBADA,eADA,OAEA,CAGF,4CAEE,eADA,QAEA,eAIJ,6BACE,mBAEA,uEAEE,WCjDJ,2BACE,UAGF,yBACE,kBAGF,wBAEE,qBAKA,SACA,OAHA,WAJA,kBAQA,OAAM,CAHN,MAFA,SAKA,CAGF,kBAEE,iBAGA,eADA,kBAHA,uBAEA,kBAEA,CCxBJ,uBACE,YAEA,qCACE,0CACA,qBACA,qBAEA,oFAEE,cACA,mBAEA,0GACE,gBAIJ,sDACE,aAEA,mEACE,SACA,kBAIJ,gDACE,mBAEA,kBADA,gBACA,CAGF,4CACE,eAGF,8CAGE,aADA,eADA,UAEA,CAGF,wGAEE,sBACA,SCnCW","sources":["webpack://pleroma_fe/./src/components/settings_modal/helpers/modified_indicator.vue","webpack://pleroma_fe/./src/components/settings_modal/helpers/profile_setting_indicator.vue","webpack://pleroma_fe/./src/components/settings_modal/helpers/draft_buttons.vue","webpack://pleroma_fe/./src/components/settings_modal/helpers/attachment_setting.vue","webpack://pleroma_fe/./src/components/settings_modal/admin_tabs/frontends_tab.scss","webpack://pleroma_fe/./src/components/settings_modal/settings_modal_admin_content.scss","webpack://pleroma_fe/./src/_variables.scss"],"sourcesContent":["\n.ModifiedIndicator {\n display: inline-block;\n position: relative;\n}\n\n.modified-tooltip {\n margin: 0.5em 1em;\n min-width: 10em;\n text-align: center;\n}\n","\n.ProfileSettingIndicator {\n display: inline-block;\n position: relative;\n}\n\n.profilesetting-tooltip {\n margin: 0.5em 1em;\n min-width: 10em;\n text-align: center;\n}\n","\n.DraftButtons {\n display: inline-block;\n position: relative;\n\n .button-default {\n margin-left: 0.5em;\n }\n}\n\n.draft-tooltip {\n margin: 0.5em 1em;\n min-width: 10em;\n text-align: center;\n}\n","\n.AttachmentSetting {\n .attachment {\n display: block;\n width: 100%;\n height: 15em;\n margin-bottom: 0.5em;\n }\n\n .attachment-input {\n margin-left: 1em;\n display: flex;\n flex-direction: column;\n width: 20em;\n }\n\n &.-compact {\n .attachment-input {\n flex-direction: row;\n align-items: flex-end;\n }\n\n .attachment {\n flex: 0;\n order: 0;\n display: block;\n min-width: 4em;\n height: 4em;\n align-self: center;\n margin-bottom: 0;\n }\n\n .control-field {\n order: 1;\n min-width: 12em;\n margin-left: 0.5em;\n }\n\n .control-upload {\n order: 2;\n min-width: 12em;\n padding: 0 0.5em;\n }\n }\n\n .controls {\n margin-bottom: 0.5em;\n\n input,\n button {\n width: 100%;\n }\n }\n}\n",".frontends-tab {\n .cards-list {\n padding: 0;\n }\n\n .relative {\n position: relative;\n }\n\n .overlay {\n position: absolute;\n background: var(--bg);\n // fix buttons showing through\n z-index: 2;\n opacity: 0.9;\n top: 0;\n bottom: 0;\n left: 0;\n right: 0;\n }\n\n dd {\n text-overflow: ellipsis;\n word-wrap: nowrap;\n white-space: nowrap;\n overflow-x: hidden;\n max-width: 10em;\n }\n}\n","@import \"src/variables\";\n\n.settings_tab-switcher {\n height: 100%;\n\n .setting-item {\n border-bottom: 2px solid var(--fg, $fallback--fg);\n margin: 1em 1em 1.4em;\n padding-bottom: 1.4em;\n\n > div,\n > label {\n display: block;\n margin-bottom: 0.5em;\n\n &:last-child {\n margin-bottom: 0;\n }\n }\n\n .select-multiple {\n display: flex;\n\n .option-list {\n margin: 0;\n padding-left: 0.5em;\n }\n }\n\n &:last-child {\n border-bottom: none;\n padding-bottom: 0;\n margin-bottom: 1em;\n }\n\n select {\n min-width: 10em;\n }\n\n textarea {\n width: 100%;\n max-width: 100%;\n height: 100px;\n }\n\n .unavailable,\n .unavailable svg {\n color: var(--cRed, $fallback--cRed);\n color: $fallback--cRed;\n }\n }\n}\n","$main-color: #f58d2c;\n$main-background: white;\n$darkened-background: whitesmoke;\n\n$fallback--bg: #121a24;\n$fallback--fg: #182230;\n$fallback--faint: rgb(185 185 186 / 50%);\n$fallback--text: #b9b9ba;\n$fallback--link: #d8a070;\n$fallback--icon: #666;\n$fallback--lightBg: rgb(21 30 42);\n$fallback--lightText: #b9b9ba;\n$fallback--border: #222;\n$fallback--cRed: #f00;\n$fallback--cBlue: #0095ff;\n$fallback--cGreen: #0fa00f;\n$fallback--cOrange: orange;\n\n$fallback--alertError: rgb(211 16 20 / 50%);\n$fallback--alertWarning: rgb(111 111 20 / 50%);\n\n$fallback--panelRadius: 10px;\n$fallback--checkboxRadius: 2px;\n$fallback--btnRadius: 4px;\n$fallback--inputRadius: 4px;\n$fallback--tooltipRadius: 5px;\n$fallback--avatarRadius: 4px;\n$fallback--avatarAltRadius: 10px;\n$fallback--attachmentRadius: 10px;\n$fallback--chatMessageRadius: 10px;\n\n$fallback--buttonShadow: 0 0 2px 0 rgb(0 0 0 / 100%),\n 0 1px 0 0 rgb(255 255 255 / 20%) inset,\n 0 -1px 0 0 rgb(0 0 0 / 20%) inset;\n\n$status-margin: 0.75em;\n"],"names":[],"sourceRoot":""}
\ No newline at end of file
diff --git a/priv/static/static/css/app.86977512e08af1f17d78.css b/priv/static/static/css/app.86977512e08af1f17d78.css
deleted file mode 100644
index 840bc45c10..0000000000
Binary files a/priv/static/static/css/app.86977512e08af1f17d78.css and /dev/null differ
diff --git a/priv/static/static/css/app.86977512e08af1f17d78.css.map b/priv/static/static/css/app.86977512e08af1f17d78.css.map
deleted file mode 100644
index ee55a6a63c..0000000000
--- a/priv/static/static/css/app.86977512e08af1f17d78.css.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"file":"static/css/app.86977512e08af1f17d78.css","mappings":"AACA,YASE,mBAGA,uBACA,uCAPA,SACA,aACA,uBAJA,OAUA,SAAQ,CAJR,cACA,oBATA,eAGA,QAFA,MAFA,wBAaA,CAEA,cACE,oBAGF,6BAEE,gCADA,mBACA,CAGF,iBACE,UAIJ,mCACE,GACE,6BAEF,GACE,iCCjCJ,YACE,aACA,sBAC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ADA,gBAGA,eACA,cAEA,yDACE,eCZN,aACE,WCAF,aACE,iBACA,gBAEA,8BACE,eCPJ,aACE,WAEA,mBAIE,mBAAkB,CADlB,iBAAiB,CADjB,gBADA,UAGmB,CAEnB,4CAEE,gBACA,gBACA,wBAHA,WAGA,CAGF,kDACE,WCdN,WACE,aAGF,6BAIE,anFHe,CmFIf,0BAHA,SACA,WAEA,CAEA,yCAKE,qDAAuD,CACvD,yDAA2D,CAC3D,6DAA8D,CAN9D,wBnFLgB,CmFMhB,6CACA,anFTa,CmFUb,qCAG+D,CAInE,WACE,YCxBA,wBACE,eCCF,6BACE,aACA,iBAEA,mCACE,WAIJ,8BACE,kBCXJ,eAGE,mBAGA,atFFe,CsFGf,0BANA,aAIA,cAHA,YAEA,sBAGA,CACA,iCAGE,atFPa,CsFQb,0BAHA,cACA,qBAEA,CCZJ,UACE,0BAA2B,CAI3B,aACA,sBAHA,0CACA,eAEA,CAEA,6BACE,2CAGF,sBACE,aACA,OACA,sBACA,gBAGF,kCACE,cAGF,uBACE,kBAGF,sBAEE,gBADA,oBACA,CAGF,+CAGE,sBACA,YAAW,CAFX,eAEA,CAGF,0BAIE,iBADA,YADA,cADA,kBAIA,0CAGF,eACE,cAGF,wBACE,sCAEA,uCACE,cCzDN,qBAEE,oBADA,aAEA,sBAEA,4CACE,gBAGF,oCAIE,uBAFA,YACA,cAFA,eAGA,CCXJ,cAGE,2CACA,gBACA,mCAEA,2CACE,yCAMA,mDACE,aACA,sBAIJ,+BACE,aACA,mBACA,6BAEA,oCACE,OACA,WACA,eC3BJ,+BACE,mCAEA,6EACE,yCAGF,4CACE","sources":["webpack://pleroma_fe/./src/components/modal/modal.vue","webpack://pleroma_fe/./src/components/login_form/login_form.vue","webpack://pleroma_fe/./src/components/media_upload/media_upload.vue","webpack://pleroma_fe/./src/components/scope_selector/scope_selector.vue","webpack://pleroma_fe/./src/_variables.scss","webpack://pleroma_fe/./src/components/checkbox/checkbox.vue","webpack://pleroma_fe/./src/components/popover/popover.vue","webpack://pleroma_fe/./src/components/still-image/still-image.vue","webpack://pleroma_fe/./src/components/emoji_picker/emoji_picker.scss","webpack://pleroma_fe/./src/components/emoji_input/emoji_input.vue","webpack://pleroma_fe/./src/components/select/select.vue","webpack://pleroma_fe/./src/components/poll/poll_form.vue","webpack://pleroma_fe/./src/components/flash/flash.vue","webpack://pleroma_fe/./src/components/attachment/attachment.scss","webpack://pleroma_fe/./src/components/gallery/gallery.vue","webpack://pleroma_fe/./src/components/user_avatar/user_avatar.vue","webpack://pleroma_fe/./src/components/mention_link/mention_link.scss","webpack://pleroma_fe/./src/components/mentions_line/mentions_line.scss","webpack://pleroma_fe/./src/components/hashtag_link/hashtag_link.scss","webpack://pleroma_fe/./src/components/rich_content/rich_content.scss","webpack://pleroma_fe/./src/components/poll/poll.vue","webpack://pleroma_fe/./src/components/status_body/status_body.scss","webpack://pleroma_fe/./src/components/link-preview/link-preview.vue","webpack://pleroma_fe/./src/components/status_content/status_content.vue","webpack://pleroma_fe/./src/components/post_status_form/post_status_form.vue","webpack://pleroma_fe/./src/components/remote_follow/remote_follow.vue","webpack://pleroma_fe/./src/components/dialog_modal/dialog_modal.vue","webpack://pleroma_fe/./src/components/moderation_tools/moderation_tools.vue","webpack://pleroma_fe/./src/components/account_actions/account_actions.vue","webpack://pleroma_fe/./src/components/user_note/user_note.vue","webpack://pleroma_fe/./src/components/user_card/user_card.scss","webpack://pleroma_fe/./src/components/user_panel/user_panel.vue","webpack://pleroma_fe/./src/components/navigation/navigation_entry.vue","webpack://pleroma_fe/./src/components/navigation/navigation_pins.vue","webpack://pleroma_fe/./src/components/nav_panel/nav_panel.vue","webpack://pleroma_fe/./src/components/features_panel/features_panel.vue","webpack://pleroma_fe/./src/components/who_to_follow_panel/who_to_follow_panel.vue","webpack://pleroma_fe/./src/components/shout_panel/shout_panel.vue","webpack://pleroma_fe/./src/components/media_modal/media_modal.vue","webpack://pleroma_fe/./src/components/side_drawer/side_drawer.vue","webpack://pleroma_fe/./src/components/mobile_post_status_button/mobile_post_status_button.vue","webpack://pleroma_fe/./src/components/reply_button/reply_button.vue","webpack://pleroma_fe/./src/components/favorite_button/favorite_button.vue","webpack://pleroma_fe/./src/components/react_button/react_button.vue","webpack://pleroma_fe/./src/components/retweet_button/retweet_button.vue","webpack://pleroma_fe/./src/components/extra_buttons/extra_buttons.vue","webpack://pleroma_fe/./src/components/avatar_list/avatar_list.vue","webpack://pleroma_fe/./src/components/status_popover/status_popover.vue","webpack://pleroma_fe/./src/components/user_list_popover/user_list_popover.vue","webpack://pleroma_fe/./src/components/emoji_reactions/emoji_reactions.vue","webpack://pleroma_fe/./src/components/status/status.scss","webpack://pleroma_fe/./src/components/report/report.scss","webpack://pleroma_fe/./src/components/notification/notification.scss","webpack://pleroma_fe/./src/components/notifications/notifications.scss","webpack://pleroma_fe/./src/components/mobile_nav/mobile_nav.vue","webpack://pleroma_fe/./src/components/search_bar/search_bar.vue","webpack://pleroma_fe/./src/components/desktop_nav/desktop_nav.scss","webpack://pleroma_fe/./src/components/list/list.vue","webpack://pleroma_fe/./src/components/user_reporting_modal/user_reporting_modal.vue","webpack://pleroma_fe/./src/components/edit_status_modal/edit_status_modal.vue","webpack://pleroma_fe/./src/components/post_status_modal/post_status_modal.vue","webpack://pleroma_fe/./src/components/status_history_modal/status_history_modal.vue","webpack://pleroma_fe/./src/components/global_notice_list/global_notice_list.vue","webpack://pleroma_fe/./src/App.scss","webpack://pleroma_fe/./src/panel.scss","webpack://pleroma_fe/./src/components/thread_tree/thread_tree.vue","webpack://pleroma_fe/./src/components/conversation/conversation.vue","webpack://pleroma_fe/./src/components/timeline_menu/timeline_menu.vue","webpack://pleroma_fe/./src/components/timeline/timeline.scss","webpack://pleroma_fe/./src/components/tab_switcher/tab_switcher.scss","webpack://pleroma_fe/./src/components/chat_title/chat_title.vue","webpack://pleroma_fe/./src/components/chat_list_item/chat_list_item.scss","webpack://pleroma_fe/./src/components/basic_user_card/basic_user_card.vue","webpack://pleroma_fe/./src/components/chat_new/chat_new.scss","webpack://pleroma_fe/./src/components/chat_list/chat_list.vue","webpack://pleroma_fe/./src/components/chat_message/chat_message.scss","webpack://pleroma_fe/./src/components/chat/chat.scss","webpack://pleroma_fe/./src/components/follow_card/follow_card.vue","webpack://pleroma_fe/./src/hocs/with_load_more/with_load_more.scss","webpack://pleroma_fe/./src/components/user_profile/user_profile.vue","webpack://pleroma_fe/./src/components/search/search.vue","webpack://pleroma_fe/./src/components/registration/registration.vue","webpack://pleroma_fe/./src/components/password_reset/password_reset.vue","webpack://pleroma_fe/./src/components/follow_request_card/follow_request_card.vue","webpack://pleroma_fe/./src/components/terms_of_service_panel/terms_of_service_panel.vue","webpack://pleroma_fe/./src/components/staff_panel/staff_panel.vue","webpack://pleroma_fe/./src/components/mrf_transparency_panel/mrf_transparency_panel.scss","webpack://pleroma_fe/./src/components/lists_card/lists_card.vue","webpack://pleroma_fe/./src/components/lists/lists.vue","webpack://pleroma_fe/./src/components/lists_user_search/lists_user_search.vue","webpack://pleroma_fe/./src/components/panel_loading/panel_loading.vue","webpack://pleroma_fe/./src/components/lists_edit/lists_edit.vue","webpack://pleroma_fe/./src/components/announcement_editor/announcement_editor.vue","webpack://pleroma_fe/./src/components/announcement/announcement.vue","webpack://pleroma_fe/./src/components/announcements_page/announcements_page.vue"],"sourcesContent":["\n.modal-view {\n z-index: var(--ZI_modals);\n position: fixed;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n display: flex;\n justify-content: center;\n align-items: center;\n overflow: auto;\n pointer-events: none;\n animation-duration: 0.2s;\n animation-name: modal-background-fadein;\n opacity: 0;\n\n > * {\n pointer-events: initial;\n }\n\n &.modal-background {\n pointer-events: initial;\n background-color: rgba(0, 0, 0, 0.5);\n }\n\n &.open {\n opacity: 1;\n }\n}\n\n@keyframes modal-background-fadein {\n from {\n background-color: rgba(0, 0, 0, 0);\n }\n to {\n background-color: rgba(0, 0, 0, 0.5);\n }\n}\n","\n@import '../../_variables.scss';\n\n.login-form {\n display: flex;\n flex-direction: column;\n padding: 0.6em;\n\n .btn {\n min-height: 2em;\n width: 10em;\n }\n\n .register {\n flex: 1 1;\n }\n\n .login-bottom {\n margin-top: 1.0em;\n display: flex;\n flex-direction: row;\n align-items: center;\n justify-content: space-between;\n }\n\n .form-group {\n display: flex;\n flex-direction: column;\n padding: 0.3em 0.5em 0.6em;\n line-height:24px;\n }\n\n .form-bottom {\n display: flex;\n padding: 0.5em;\n height: 32px;\n\n button {\n width: 10em;\n }\n\n p {\n margin: 0.35em;\n padding: 0.35em;\n display: flex;\n }\n }\n\n .error {\n text-align: center;\n\n animation-name: shakeError;\n animation-duration: 0.4s;\n animation-timing-function: ease-in-out;\n }\n}\n","\n@import '../../_variables.scss';\n\n.media-upload {\n cursor: pointer; // We use
for interactivity... i wonder if it's fine\n\n .hidden-input-file {\n display: none;\n }\n}\n ","\n@import '../../_variables.scss';\n\n.ScopeSelector {\n\n .scope {\n display: inline-block;\n cursor: pointer;\n min-width: 1.3em;\n min-height: 1.3em;\n text-align: center;\n\n &.selected svg {\n color: $fallback--lightText;\n color: var(--lightText, $fallback--lightText);\n }\n }\n}\n","$main-color: #f58d2c;\n$main-background: white;\n$darkened-background: whitesmoke;\n\n$fallback--bg: #121a24;\n$fallback--fg: #182230;\n$fallback--faint: rgba(185, 185, 186, .5);\n$fallback--text: #b9b9ba;\n$fallback--link: #d8a070;\n$fallback--icon: #666;\n$fallback--lightBg: rgb(21, 30, 42);\n$fallback--lightText: #b9b9ba;\n$fallback--border: #222;\n$fallback--cRed: #ff0000;\n$fallback--cBlue: #0095ff;\n$fallback--cGreen: #0fa00f;\n$fallback--cOrange: orange;\n\n$fallback--alertError: rgba(211,16,20,.5);\n$fallback--alertWarning: rgba(111,111,20,.5);\n\n$fallback--panelRadius: 10px;\n$fallback--checkboxRadius: 2px;\n$fallback--btnRadius: 4px;\n$fallback--inputRadius: 4px;\n$fallback--tooltipRadius: 5px;\n$fallback--avatarRadius: 4px;\n$fallback--avatarAltRadius: 10px;\n$fallback--attachmentRadius: 10px;\n$fallback--chatMessageRadius: 10px;\n\n$fallback--buttonShadow: 0px 0px 2px 0px rgba(0, 0, 0, 1), 0px 1px 0px 0px rgba(255, 255, 255, 0.2) inset, 0px -1px 0px 0px rgba(0, 0, 0, 0.2) inset;\n\n$status-margin: 0.75em;\n","\n@import '../../_variables.scss';\n\n.checkbox {\n position: relative;\n display: inline-block;\n min-height: 1.2em;\n\n &-indicator {\n position: relative;\n padding-left: 1.2em;\n }\n\n &-indicator::before {\n position: absolute;\n right: 0;\n top: 0;\n display: block;\n content: '✓';\n transition: color 200ms;\n width: 1.1em;\n height: 1.1em;\n border-radius: $fallback--checkboxRadius;\n border-radius: var(--checkboxRadius, $fallback--checkboxRadius);\n box-shadow: 0px 0px 2px black inset;\n box-shadow: var(--inputShadow);\n background-color: $fallback--fg;\n background-color: var(--input, $fallback--fg);\n vertical-align: top;\n text-align: center;\n line-height: 1.1em;\n font-size: 1.1em;\n color: transparent;\n overflow: hidden;\n box-sizing: border-box;\n }\n\n &.disabled {\n .checkbox-indicator::before,\n .label {\n opacity: .5;\n }\n .label {\n color: $fallback--faint;\n color: var(--faint, $fallback--faint);\n }\n }\n\n input[type=checkbox] {\n display: none;\n\n &:checked + .checkbox-indicator::before {\n color: $fallback--text;\n color: var(--inputText, $fallback--text);\n }\n\n &:indeterminate + .checkbox-indicator::before {\n content: '–';\n color: $fallback--text;\n color: var(--inputText, $fallback--text);\n }\n\n }\n\n & > span {\n margin-left: .5em;\n }\n}\n","\n@import '../../_variables.scss';\n\n.popover-trigger-button {\n display: inline-block;\n}\n\n.popover {\n z-index: var(--ZI_popover_override, var(--ZI_popovers));\n position: fixed;\n min-width: 0;\n max-width: calc(100vw - 20px);\n box-shadow: 2px 2px 3px rgba(0, 0, 0, 0.5);\n box-shadow: var(--popupShadow);\n}\n\n.popover-default {\n &:after {\n content: '';\n position: absolute;\n top: 0;\n bottom: 0;\n left: 0;\n right: 0;\n z-index: 3;\n box-shadow: 1px 1px 4px rgba(0, 0, 0, 0.6);\n box-shadow: var(--panelShadow);\n pointer-events: none;\n }\n\n border-radius: $fallback--btnRadius;\n border-radius: var(--btnRadius, $fallback--btnRadius);\n\n background-color: $fallback--bg;\n background-color: var(--popover, $fallback--bg);\n color: $fallback--text;\n color: var(--popoverText, $fallback--text);\n --faint: var(--popoverFaintText, $fallback--faint);\n --faintLink: var(--popoverFaintLink, $fallback--faint);\n --lightText: var(--popoverLightText, $fallback--lightText);\n --postLink: var(--popoverPostLink, $fallback--link);\n --postFaintLink: var(--popoverPostFaintLink, $fallback--link);\n --icon: var(--popoverIcon, $fallback--icon);\n}\n\n.dropdown-menu {\n display: block;\n padding: .5rem 0;\n font-size: 1em;\n text-align: left;\n list-style: none;\n max-width: 100vw;\n z-index: var(--ZI_popover_override, var(--ZI_popovers));\n white-space: nowrap;\n\n .dropdown-divider {\n height: 0;\n margin: .5rem 0;\n overflow: hidden;\n border-top: 1px solid $fallback--border;\n border-top: 1px solid var(--border, $fallback--border);\n }\n\n .dropdown-item {\n line-height: 21px;\n overflow: hidden;\n display: block;\n padding: 0.5em 0.75em;\n clear: both;\n font-weight: 400;\n text-align: inherit;\n white-space: nowrap;\n border: none;\n border-radius: 0px;\n background-color: transparent;\n box-shadow: none;\n width: 100%;\n height: 100%;\n box-sizing: border-box;\n\n --btnText: var(--popoverText, $fallback--text);\n\n &-icon {\n svg {\n width: 22px;\n margin-right: 0.75rem;\n color: var(--menuPopoverIcon, $fallback--icon)\n }\n }\n\n &.-has-submenu {\n .chevron-icon {\n margin-right: 0.25rem;\n margin-left: 2rem;\n }\n }\n\n &:active, &:hover {\n background-color: $fallback--lightBg;\n background-color: var(--selectedMenuPopover, $fallback--lightBg);\n box-shadow: none;\n --btnText: var(--selectedMenuPopoverText, $fallback--link);\n --faint: var(--selectedMenuPopoverFaintText, $fallback--faint);\n --faintLink: var(--selectedMenuPopoverFaintLink, $fallback--faint);\n --lightText: var(--selectedMenuPopoverLightText, $fallback--lightText);\n --icon: var(--selectedMenuPopoverIcon, $fallback--icon);\n svg {\n color: var(--selectedMenuPopoverIcon, $fallback--icon);\n --icon: var(--selectedMenuPopoverIcon, $fallback--icon);\n }\n }\n\n .menu-checkbox {\n display: inline-block;\n vertical-align: middle;\n min-width: 22px;\n max-width: 22px;\n min-height: 22px;\n max-height: 22px;\n line-height: 22px;\n text-align: center;\n border-radius: 0px;\n background-color: $fallback--fg;\n background-color: var(--input, $fallback--fg);\n box-shadow: 0px 0px 2px black inset;\n box-shadow: var(--inputShadow);\n margin-right: 0.75em;\n\n &.menu-checkbox-checked::after {\n font-size: 1.25em;\n content: '✓';\n }\n\n &.-radio {\n border-radius: 9999px;\n\n &.menu-checkbox-checked::after {\n font-size: 2em;\n content: '•';\n }\n }\n }\n\n }\n\n .button-default.dropdown-item {\n &,\n i[class*=icon-] {\n color: $fallback--text;\n color: var(--btnText, $fallback--text);\n }\n\n &:active {\n background-color: $fallback--lightBg;\n background-color: var(--selectedMenuPopover, $fallback--lightBg);\n color: $fallback--link;\n color: var(--selectedMenuPopoverText, $fallback--link);\n }\n\n &:disabled {\n color: $fallback--text;\n color: var(--btnDisabledText, $fallback--text);\n }\n\n &.toggled {\n color: $fallback--text;\n color: var(--btnToggledText, $fallback--text);\n }\n }\n}\n","\n@import '../../_variables.scss';\n\n.still-image {\n position: relative;\n line-height: 0;\n overflow: hidden;\n display: inline-flex;\n align-items: center;\n\n canvas {\n position: absolute;\n top: 0;\n bottom: 0;\n left: 0;\n right: 0;\n width: 100%;\n height: 100%;\n object-fit: contain;\n visibility: var(--_still-image-canvas-visibility, visible);\n }\n\n img {\n width: 100%;\n height: 100%;\n object-fit: contain;\n }\n\n &.animated {\n &::before {\n zoom: var(--_still_image-label-scale, 1);\n content: 'gif';\n position: absolute;\n line-height: 1;\n font-size: 0.7em;\n top: 0.5em;\n left: 0.5em;\n background: rgba(127, 127, 127, 0.5);\n color: #fff;\n display: block;\n padding: 2px 4px;\n border-radius: $fallback--tooltipRadius;\n border-radius: var(--tooltipRadius, $fallback--tooltipRadius);\n z-index: 2;\n visibility: var(--_still-image-label-visibility, visible);\n }\n\n &:hover canvas {\n display: none;\n }\n\n &:hover::before {\n visibility: var(--_still-image-label-visibility, hidden);\n }\n\n img {\n visibility: var(--_still-image-img-visibility, hidden);\n }\n\n &:hover img {\n visibility: visible;\n }\n }\n}\n","@import '../../_variables.scss';\n\n$emoji-picker-header-height: 36px;\n$emoji-picker-header-picture-width: 32px;\n$emoji-picker-header-picture-height: 32px;\n$emoji-picker-emoji-size: 32px;\n\n.emoji-picker {\n width: 25em;\n max-width: 100vw;\n display: flex;\n flex-direction: column;\n background-color: $fallback--bg;\n background-color: var(--popover, $fallback--bg);\n color: $fallback--link;\n color: var(--popoverText, $fallback--link);\n --lightText: var(--popoverLightText, $fallback--faint);\n --faint: var(--popoverFaintText, $fallback--faint);\n --faintLink: var(--popoverFaintLink, $fallback--faint);\n --lightText: var(--popoverLightText, $fallback--lightText);\n --icon: var(--popoverIcon, $fallback--icon);\n\n &-header-image {\n display: inline-flex;\n justify-content: center;\n align-items: center;\n width: $emoji-picker-header-picture-width;\n max-width: $emoji-picker-header-picture-width;\n height: $emoji-picker-header-picture-height;\n max-height: $emoji-picker-header-picture-height;\n .still-image {\n max-width: 100%;\n max-height: 100%;\n height: 100%;\n width: 100%;\n object-fit: contain;\n }\n }\n\n .keep-open,\n .too-many-emoji {\n padding: 7px;\n line-height: normal;\n }\n\n .too-many-emoji {\n display: flex;\n flex-direction: column;\n }\n\n .keep-open-label {\n padding: 0 7px;\n display: flex;\n }\n\n .heading {\n display: flex;\n padding: 10px 7px 5px;\n }\n\n .content {\n display: flex;\n flex-direction: column;\n flex: 1 1 auto;\n min-height: 0px;\n }\n\n .emoji-tabs {\n flex-grow: 1;\n display: flex;\n flex-direction: row;\n flex-wrap: nowrap;\n overflow-x: auto;\n }\n\n .emoji-groups {\n min-height: 200px;\n }\n\n .additional-tabs {\n display: flex;\n flex: 1;\n border-left: 1px solid;\n border-left-color: $fallback--icon;\n border-left-color: var(--icon, $fallback--icon);\n padding-left: 7px;\n flex: 0 0 auto;\n }\n\n .additional-tabs,\n .emoji-tabs {\n flex-basis: auto;\n display: flex;\n align-content: center;\n\n &-item {\n padding: 0 7px;\n cursor: pointer;\n font-size: 1.85em;\n width: $emoji-picker-header-picture-width;\n max-width: $emoji-picker-header-picture-width;\n height: $emoji-picker-header-picture-height;\n max-height: $emoji-picker-header-picture-height;\n display: flex;\n align-items: center;\n\n &.disabled {\n opacity: 0.5;\n pointer-events: none;\n }\n\n &.active {\n border-bottom: 4px solid;\n\n svg {\n color: $fallback--lightText;\n color: var(--lightText, $fallback--lightText);\n }\n }\n }\n }\n\n .sticker-picker {\n flex: 1 1 auto\n }\n\n .stickers,\n .emoji {\n &-content {\n display: flex;\n flex-direction: column;\n flex: 1 1 auto;\n min-height: 0;\n\n &.hidden {\n opacity: 0;\n pointer-events: none;\n position: absolute;\n }\n }\n }\n\n .emoji {\n &-search {\n padding: 5px;\n flex: 0 0 auto;\n\n input {\n width: 100%;\n }\n }\n\n &-groups {\n flex: 1 1 1px;\n position: relative;\n overflow: auto;\n user-select: none;\n mask: linear-gradient(to top, white 0, transparent 100%) bottom no-repeat,\n linear-gradient(to bottom, white 0, transparent 100%) top no-repeat,\n linear-gradient(to top, white, white);\n transition: mask-size 150ms;\n mask-size: 100% 20px, 100% 20px, auto;\n // Autoprefixed seem to ignore this one, and also syntax is different\n -webkit-mask-composite: xor;\n mask-composite: exclude;\n &.scrolled {\n &-top {\n mask-size: 100% 20px, 100% 0, auto;\n }\n &-bottom {\n mask-size: 100% 0, 100% 20px, auto;\n }\n }\n }\n\n &-group {\n display: flex;\n align-items: center;\n flex-wrap: wrap;\n padding-left: 5px;\n justify-content: left;\n\n &-title {\n font-size: 0.85em;\n width: 100%;\n margin: 0;\n\n &.disabled {\n display: none;\n }\n }\n }\n\n &-item {\n width: $emoji-picker-emoji-size;\n height: $emoji-picker-emoji-size;\n box-sizing: border-box;\n display: flex;\n line-height: $emoji-picker-emoji-size;\n align-items: center;\n justify-content: center;\n margin: 4px;\n\n cursor: pointer;\n\n .emoji-picker-emoji.-custom {\n object-fit: contain;\n max-width: 100%;\n max-height: 100%;\n }\n .emoji-picker-emoji.-unicode {\n font-size: 24px;\n overflow: hidden;\n }\n }\n\n }\n\n}\n","\n@import '../../_variables.scss';\n\n.emoji-input {\n display: flex;\n flex-direction: column;\n position: relative;\n\n &.with-picker input {\n padding-right: 30px;\n }\n\n .emoji-picker-icon {\n position: absolute;\n top: 0;\n right: 0;\n margin: .2em .25em;\n font-size: 1.3em;\n cursor: pointer;\n line-height: 24px;\n\n &:hover i {\n color: $fallback--text;\n color: var(--text, $fallback--text);\n }\n }\n\n .emoji-picker-panel {\n position: absolute;\n z-index: 20;\n margin-top: 2px;\n\n &.hide {\n display: none\n }\n }\n\n input, textarea {\n flex: 1 0 auto;\n }\n\n .hidden-overlay {\n opacity: 0;\n pointer-events: none;\n position: absolute;\n top: 0;\n bottom: 0;\n right: 0;\n left: 0;\n overflow: hidden;\n /* DEBUG STUFF */\n color: red;\n /* set opacity to non-zero to see the overlay */\n\n .caret {\n width: 0;\n margin-right: calc(-1ch - 1px);\n border: 1px solid red;\n }\n }\n}\n.autocomplete {\n &-panel {\n position: absolute;\n }\n\n &-item {\n display: flex;\n cursor: pointer;\n padding: 0.2em 0.4em;\n border-bottom: 1px solid rgba(0, 0, 0, 0.4);\n height: 32px;\n\n .image {\n width: 32px;\n height: 32px;\n line-height: 32px;\n text-align: center;\n font-size: 32px;\n\n margin-right: 4px;\n\n img {\n width: 32px;\n height: 32px;\n object-fit: contain;\n }\n }\n\n .label {\n display: flex;\n flex-direction: column;\n justify-content: center;\n margin: 0 0.1em 0 0.2em;\n\n .displayText {\n line-height: 1.5;\n }\n\n .detailText {\n font-size: 9px;\n line-height: 9px;\n }\n }\n\n &.highlighted {\n background-color: $fallback--fg;\n background-color: var(--selectedMenuPopover, $fallback--fg);\n color: var(--selectedMenuPopoverText, $fallback--text);\n --faint: var(--selectedMenuPopoverFaintText, $fallback--faint);\n --faintLink: var(--selectedMenuPopoverFaintLink, $fallback--faint);\n --lightText: var(--selectedMenuPopoverLightText, $fallback--lightText);\n --icon: var(--selectedMenuPopoverIcon, $fallback--icon);\n }\n }\n}\n","\n@import '../../_variables.scss';\n\n/* TODO fix order of styles */\nlabel.Select {\n padding: 0;\n\n select {\n -webkit-appearance: none;\n -moz-appearance: none;\n appearance: none;\n background: transparent;\n border: none;\n color: $fallback--text;\n color: var(--inputText, --text, $fallback--text);\n margin: 0;\n padding: 0 2em 0 .2em;\n font-family: sans-serif;\n font-family: var(--inputFont, sans-serif);\n font-size: 1em;\n width: 100%;\n z-index: 1;\n height: 2em;\n line-height: 16px;\n }\n\n .select-down-icon {\n position: absolute;\n top: 0;\n bottom: 0;\n right: 5px;\n height: 100%;\n width: 0.875em;\n color: $fallback--text;\n color: var(--inputText, $fallback--text);\n line-height: 2;\n z-index: 0;\n pointer-events: none;\n }\n\n}\n","\n@import '../../_variables.scss';\n\n.poll-form {\n display: flex;\n flex-direction: column;\n padding: 0 0.5em 0.5em;\n\n .add-option {\n align-self: flex-start;\n padding-top: 0.25em;\n padding-left: 0.1em;\n }\n\n .poll-option {\n display: flex;\n align-items: baseline;\n justify-content: space-between;\n margin-bottom: 0.25em;\n }\n\n .input-container {\n width: 100%;\n input {\n // Hack: dodge the floating X icon\n padding-right: 2.5em;\n width: 100%;\n }\n }\n\n .delete-option {\n // Hack: Move the icon over the input box\n width: 1.5em;\n margin-left: -1.5em;\n z-index: 1;\n }\n\n .poll-type-expiry {\n margin-top: 0.5em;\n display: flex;\n width: 100%;\n }\n\n .poll-type {\n margin-right: 0.75em;\n flex: 1 1 60%;\n\n .poll-type-select {\n padding-right: 0.75em;\n }\n }\n\n .poll-expiry {\n display: flex;\n\n .expiry-amount {\n width: 3em;\n text-align: right;\n }\n }\n}\n","\n@import '../../_variables.scss';\n.Flash {\n display: inline-block;\n width: 100%;\n height: 100%;\n position: relative;\n\n .player {\n height: 100%;\n width: 100%;\n }\n\n .placeholder {\n height: 100%;\n width: 100%;\n display: flex;\n align-items: center;\n justify-content: center;\n background: var(--bg);\n color: var(--link);\n }\n\n .hider {\n top: 0;\n }\n\n .label {\n text-align: center;\n flex: 1 1 0;\n line-height: 1.2;\n white-space: normal;\n word-wrap: normal;\n }\n\n .hidden {\n display: none;\n visibility: 'hidden';\n }\n}\n","@import '../../_variables.scss';\n\n.Attachment {\n display: inline-flex;\n flex-direction: column;\n position: relative;\n align-self: flex-start;\n line-height: 0;\n height: 100%;\n border-style: solid;\n border-width: 1px;\n border-radius: $fallback--attachmentRadius;\n border-radius: var(--attachmentRadius, $fallback--attachmentRadius);\n border-color: $fallback--border;\n border-color: var(--border, $fallback--border);\n\n .attachment-wrapper {\n flex: 1 1 auto;\n height: 100%;\n position: relative;\n overflow: hidden;\n }\n\n .description-container {\n flex: 0 1 0;\n display: flex;\n padding-top: 0.5em;\n z-index: 1;\n\n p {\n flex: 1;\n text-align: center;\n line-height: 1.5;\n padding: 0.5em;\n margin: 0;\n white-space: nowrap;\n text-overflow: ellipsis;\n overflow: hidden;\n }\n\n &.-static {\n position: absolute;\n left: 0;\n right: 0;\n bottom: 0;\n padding-top: 0;\n background: var(--popover);\n box-shadow: var(--popupShadow);\n }\n }\n\n .description-field {\n flex: 1;\n min-width: 0;\n }\n\n & .placeholder-container,\n & .image-container,\n & .audio-container,\n & .video-container,\n & .flash-container,\n & .oembed-container {\n display: flex;\n justify-content: center;\n width: 100%;\n height: 100%;\n }\n\n .image-container {\n .image {\n width: 100%;\n height: 100%;\n }\n }\n\n & .flash-container,\n & .video-container {\n & .flash,\n & video {\n width: 100%;\n height: 100%;\n object-fit: contain;\n align-self: center;\n }\n }\n\n .audio-container {\n display: flex;\n align-items: flex-end;\n\n audio {\n width: 100%;\n height: 100%;\n }\n }\n\n .placeholder-container {\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n padding-top: 0.5em;\n }\n\n\n .play-icon {\n position: absolute;\n font-size: 64px;\n top: calc(50% - 32px);\n left: calc(50% - 32px);\n color: rgba(255, 255, 255, 0.75);\n text-shadow: 0 0 2px rgba(0, 0, 0, 0.4);\n\n &::before {\n margin: 0;\n }\n }\n\n .attachment-buttons {\n display: flex;\n position: absolute;\n right: 0;\n top: 0;\n margin-top: 0.5em;\n margin-right: 0.5em;\n z-index: 1;\n\n .attachment-button {\n padding: 0;\n border-radius: $fallback--tooltipRadius;\n border-radius: var(--tooltipRadius, $fallback--tooltipRadius);\n text-align: center;\n width: 2em;\n height: 2em;\n margin-left: 0.5em;\n font-size: 1.25em;\n // TODO: theming? hard to theme with unknown background image color\n background: rgba(230, 230, 230, 0.7);\n\n .svg-inline--fa {\n color: rgba(0, 0, 0, 0.6);\n }\n\n &:hover .svg-inline--fa {\n color: rgba(0, 0, 0, 0.9);\n }\n }\n }\n\n .oembed-container {\n line-height: 1.2em;\n flex: 1 0 100%;\n width: 100%;\n margin-right: 15px;\n display: flex;\n\n img {\n width: 100%;\n }\n\n .image {\n flex: 1;\n img {\n border: 0px;\n border-radius: 5px;\n height: 100%;\n object-fit: cover;\n }\n }\n\n .text {\n flex: 2;\n margin: 8px;\n word-break: break-all;\n h1 {\n font-size: 1rem;\n margin: 0px;\n }\n }\n }\n\n &.-size-small {\n .play-icon {\n zoom: 0.5;\n opacity: 0.7;\n }\n\n .attachment-buttons {\n zoom: 0.7;\n opacity: 0.5;\n }\n }\n\n &.-editable {\n padding: 0.5em;\n\n & .description-container,\n & .attachment-buttons {\n margin: 0;\n }\n }\n\n &.-placeholder {\n display: inline-block;\n color: $fallback--link;\n color: var(--postLink, $fallback--link);\n overflow: hidden;\n white-space: nowrap;\n height: auto;\n line-height: 1.5;\n\n &:not(.-editable) {\n border: none;\n }\n\n &.-editable {\n display: flex;\n flex-direction: row;\n align-items: baseline;\n\n & .description-container,\n & .attachment-buttons {\n margin: 0;\n padding: 0;\n position: relative;\n }\n\n .description-container {\n flex: 1;\n padding-left: 0.5em;\n }\n\n .attachment-buttons {\n order: 99;\n align-self: center;\n }\n }\n\n a {\n display: inline-block;\n max-width: 100%;\n overflow: hidden;\n text-overflow: ellipsis;\n }\n\n svg {\n color: inherit;\n }\n }\n\n &.-loading {\n cursor: progress;\n }\n\n &.-contain-fit {\n img,\n canvas {\n object-fit: contain;\n }\n }\n\n &.-cover-fit {\n img,\n canvas {\n object-fit: cover;\n }\n }\n}\n","\n@import '../../_variables.scss';\n\n.Gallery {\n .gallery-rows {\n display: flex;\n flex-direction: column;\n }\n\n .gallery-row {\n position: relative;\n height: 0;\n width: 100%;\n flex-grow: 1;\n\n &:not(:first-child) {\n margin-top: 0.5em;\n }\n }\n\n &.-long {\n .gallery-rows {\n max-height: 25em;\n overflow: hidden;\n mask:\n linear-gradient(to top, white, transparent) bottom/100% 70px no-repeat,\n linear-gradient(to top, white, white);\n\n /* Autoprefixed seem to ignore this one, and also syntax is different */\n -webkit-mask-composite: xor;\n mask-composite: exclude;\n }\n }\n\n .many-attachments-text {\n text-align: center;\n line-height: 2;\n }\n\n .many-attachments-buttons {\n display: flex;\n }\n\n .many-attachments-button {\n display: flex;\n flex: 1;\n justify-content: center;\n line-height: 2;\n\n button {\n padding: 0 2em;\n }\n }\n\n .gallery-row {\n &.-grid,\n &.-minimal {\n height: auto;\n .gallery-row-inner {\n position: relative;\n }\n }\n }\n\n .gallery-row-inner {\n position: absolute;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n display: flex;\n flex-direction: row;\n flex-wrap: nowrap;\n align-content: stretch;\n\n &.-grid {\n width: 100%;\n height: auto;\n position: relative;\n display: grid;\n grid-column-gap: 0.5em;\n grid-row-gap: 0.5em;\n grid-template-columns: repeat(auto-fill, minmax(15em, 1fr));\n\n .gallery-item {\n margin: 0;\n height: 200px;\n }\n }\n }\n\n .gallery-item {\n margin: 0 0.5em 0 0;\n flex-grow: 1;\n height: 100%;\n box-sizing: border-box;\n // to make failed images a bit more noticeable on chromium\n min-width: 2em;\n &:last-child {\n margin: 0;\n }\n }\n}\n","\n@import '../../_variables.scss';\n\n.Avatar {\n --_avatarShadowBox: var(--avatarStatusShadow);\n --_avatarShadowFilter: var(--avatarStatusShadowFilter);\n --_avatarShadowInset: var(--avatarStatusShadowInset);\n --_still-image-label-visibility: hidden;\n\n display: inline-block;\n position: relative;\n width: 48px;\n height: 48px;\n\n &.-compact {\n width: 32px;\n height: 32px;\n border-radius: $fallback--avatarAltRadius;\n border-radius: var(--avatarAltRadius, $fallback--avatarAltRadius);\n }\n\n .avatar {\n width: 100%;\n height: 100%;\n box-shadow: var(--_avatarShadowBox);\n border-radius: $fallback--avatarRadius;\n border-radius: var(--avatarRadius, $fallback--avatarRadius);\n\n &.-better-shadow {\n box-shadow: var(--_avatarShadowInset);\n filter: var(--_avatarShadowFilter);\n }\n\n &.-animated::before {\n display: none;\n }\n\n &.-compact {\n border-radius: $fallback--avatarAltRadius;\n border-radius: var(--avatarAltRadius, $fallback--avatarAltRadius);\n }\n\n &.-placeholder {\n background-color: $fallback--fg;\n background-color: var(--fg, $fallback--fg);\n }\n }\n\n img {\n width: 100%;\n height: 100%;\n }\n\n .bot-indicator {\n position: absolute;\n bottom: 0;\n right: 0;\n margin: -0.2em;\n padding: 0.2em;\n background: rgba(127, 127, 127, 0.5);\n color: #fff;\n border-radius: var(--tooltipRadius);\n }\n\n}\n","@import '../../_variables.scss';\n\n.MentionLink {\n position: relative;\n white-space: normal;\n display: inline;\n color: var(--link);\n word-break: normal;\n\n & .new,\n & .original {\n display: inline;\n border-radius: 2px;\n }\n\n .mention-avatar {\n border-radius: var(--avatarAltRadius, $fallback--avatarAltRadius);\n width: 1.5em;\n height: 1.5em;\n vertical-align: middle;\n user-select: none;\n margin-right: 0.2em;\n }\n\n .full {\n position: absolute;\n display: inline-block;\n pointer-events: none;\n opacity: 0;\n top: 100%;\n left: 0;\n height: 100%;\n word-wrap: normal;\n white-space: nowrap;\n transition: opacity 0.2s ease;\n z-index: 1;\n margin-top: 0.25em;\n padding: 0.5em;\n user-select: all;\n }\n\n & .short.-with-tooltip,\n & .you {\n user-select: none;\n }\n\n & .short,\n & .full {\n white-space: nowrap;\n }\n\n .shortName {\n white-space: normal;\n }\n\n .new {\n &.-you {\n .shortName {\n font-weight: 600;\n }\n }\n &.-has-selection {\n color: var(--alertNeutralText, $fallback--text);\n background-color: var(--alertNeutral, $fallback--fg);\n }\n\n .at {\n color: var(--link);\n opacity: 0.8;\n display: inline-block;\n line-height: 1;\n padding: 0 0.1em;\n vertical-align: -25%;\n margin: 0;\n }\n\n &.-striped {\n & .shortName {\n background-image:\n repeating-linear-gradient(\n 135deg,\n var(--____highlight-tintColor),\n var(--____highlight-tintColor) 5px,\n var(--____highlight-tintColor2) 5px,\n var(--____highlight-tintColor2) 10px\n );\n }\n }\n\n &.-solid {\n .shortName {\n background-image: linear-gradient(var(--____highlight-tintColor2), var(--____highlight-tintColor2));\n }\n }\n\n &.-side {\n .shortName {\n box-shadow: 0 -5px 3px -4px inset var(--____highlight-solidColor);\n }\n }\n }\n\n .full {\n pointer-events: none;\n }\n\n .serverName.-faded {\n color: var(--faintLink, $fallback--link);\n }\n}\n\n.mention-link-popover {\n max-width: 70ch;\n max-height: 20rem;\n overflow: hidden;\n}\n",".MentionsLine {\n word-break: break-all;\n\n .mention-link:not(:first-child)::before {\n content: ' ';\n }\n\n .showMoreLess {\n margin-left: 0.5em;\n white-space: normal;\n color: var(--link);\n }\n}\n",".HashtagLink {\n position: relative;\n white-space: normal;\n display: inline-block;\n color: var(--link);\n}\n",".RichContent {\n blockquote {\n margin: 0.2em 0 0.2em 2em;\n font-style: italic;\n }\n\n pre {\n overflow: auto;\n }\n\n code,\n samp,\n kbd,\n var,\n pre {\n font-family: var(--postCodeFont, monospace);\n }\n\n p {\n margin: 0 0 1em 0;\n }\n\n p:last-child {\n margin: 0 0 0 0;\n }\n\n h1 {\n font-size: 1.1em;\n line-height: 1.2em;\n margin: 1.4em 0;\n }\n\n h2 {\n font-size: 1.1em;\n margin: 1em 0;\n }\n\n h3 {\n font-size: 1em;\n margin: 1.2em 0;\n }\n\n h4 {\n margin: 1.1em 0;\n }\n\n .img {\n display: inline-block;\n }\n\n .emoji {\n display: inline-block;\n width: var(--emoji-size, 32px);\n height: var(--emoji-size, 32px);\n }\n\n .img,\n video {\n max-width: 100%;\n max-height: 400px;\n vertical-align: middle;\n object-fit: contain;\n }\n}\n","\n@import '../../_variables.scss';\n\n.poll {\n .votes {\n display: flex;\n flex-direction: column;\n margin: 0 0 0.5em;\n }\n .poll-option {\n margin: 0.75em 0.5em;\n }\n .option-result {\n height: 100%;\n display: flex;\n flex-direction: row;\n position: relative;\n color: $fallback--lightText;\n color: var(--lightText, $fallback--lightText);\n }\n .option-result-label {\n display: flex;\n align-items: center;\n padding: 0.1em 0.25em;\n z-index: 1;\n word-break: break-word;\n }\n .result-percentage {\n width: 3.5em;\n flex-shrink: 0;\n }\n .result-fill {\n height: 100%;\n position: absolute;\n color: $fallback--text;\n color: var(--pollText, $fallback--text);\n background-color: $fallback--lightBg;\n background-color: var(--poll, $fallback--lightBg);\n border-radius: $fallback--panelRadius;\n border-radius: var(--panelRadius, $fallback--panelRadius);\n top: 0;\n left: 0;\n transition: width 0.5s;\n }\n .option-vote {\n display: flex;\n align-items: center;\n }\n input {\n width: 3.5em;\n }\n .footer {\n display: flex;\n align-items: center;\n }\n &.loading * {\n cursor: progress;\n }\n .poll-vote-button {\n padding: 0 0.5em;\n margin-right: 0.5em;\n }\n}\n","@import '../../_variables.scss';\n\n.StatusBody {\n display: flex;\n flex-direction: column;\n\n .emoji {\n --_still_image-label-scale: 0.5;\n }\n\n .attachments {\n margin-top: 0.5em;\n }\n\n & .text,\n & .summary {\n font-family: var(--postFont, sans-serif);\n white-space: pre-wrap;\n overflow-wrap: break-word;\n word-wrap: break-word;\n word-break: break-word;\n line-height: var(--post-line-height);\n }\n\n .summary {\n display: block;\n font-style: italic;\n padding-bottom: 0.5em;\n }\n\n .text {\n &.-single-line {\n white-space: nowrap;\n text-overflow: ellipsis;\n overflow: hidden;\n height: 1.4em;\n }\n }\n\n .summary-wrapper {\n margin-bottom: 0.5em;\n border-style: solid;\n border-width: 0 0 1px 0;\n border-color: var(--border, $fallback--border);\n flex-grow: 0;\n\n &.-tall {\n position: relative;\n\n .summary {\n max-height: 2em;\n overflow: hidden;\n white-space: nowrap;\n text-overflow: ellipsis;\n }\n }\n }\n\n .text-wrapper {\n display: flex;\n flex-direction: column;\n flex-wrap: nowrap;\n\n &.-tall-status {\n position: relative;\n height: 220px;\n overflow-x: hidden;\n overflow-y: hidden;\n z-index: 1;\n\n .media-body {\n min-height: 0;\n mask:\n linear-gradient(to top, white, transparent) bottom/100% 70px no-repeat,\n linear-gradient(to top, white, white);\n\n /* Autoprefixed seem to ignore this one, and also syntax is different */\n -webkit-mask-composite: xor;\n mask-composite: exclude;\n }\n }\n }\n\n & .tall-status-hider,\n & .tall-subject-hider,\n & .status-unhider,\n & .cw-status-hider {\n display: inline-block;\n word-break: break-all;\n width: 100%;\n text-align: center;\n }\n\n .tall-status-hider {\n position: absolute;\n height: 70px;\n margin-top: 150px;\n line-height: 110px;\n z-index: 2;\n }\n\n .tall-subject-hider {\n // position: absolute;\n padding-bottom: 0.5em;\n }\n\n & .status-unhider,\n & .cw-status-hider {\n word-break: break-all;\n\n svg {\n color: inherit;\n }\n }\n\n .greentext {\n color: $fallback--cGreen;\n color: var(--postGreentext, $fallback--cGreen);\n }\n\n .cyantext {\n color: var(--postCyantext, $fallback--cBlue);\n }\n\n &.-compact {\n align-items: top;\n flex-direction: row;\n\n --emoji-size: 16px;\n\n & .body,\n & .attachments {\n max-height: 3.25em;\n }\n\n .body {\n overflow: hidden;\n white-space: normal;\n min-width: 5em;\n flex: 5 1 auto;\n mask-size: auto 3.5em, auto auto;\n mask-position: 0 0, 0 0;\n mask-repeat: repeat-x, repeat;\n mask-image: linear-gradient(to bottom, white 2em, transparent 3em);\n\n /* Autoprefixed seem to ignore this one, and also syntax is different */\n -webkit-mask-composite: xor;\n mask-composite: exclude;\n }\n\n .attachments {\n margin-top: 0;\n flex: 1 1 0;\n min-width: 5em;\n height: 100%;\n margin-left: 0.5em;\n }\n\n .summary-wrapper {\n .summary::after {\n content: ': ';\n }\n\n line-height: inherit;\n margin: 0;\n border: none;\n display: inline-block;\n }\n\n .text-wrapper {\n display: inline-block;\n }\n }\n}\n","\n@import '../../_variables.scss';\n\n.link-preview-card {\n display: flex;\n flex-direction: row;\n cursor: pointer;\n overflow: hidden;\n margin-top: 0.5em;\n\n .card-image {\n flex-shrink: 0;\n width: 120px;\n max-width: 25%;\n img {\n width: 100%;\n height: 100%;\n object-fit: cover;\n border-radius: $fallback--attachmentRadius;\n border-radius: var(--attachmentRadius, $fallback--attachmentRadius);\n }\n }\n\n .card-content {\n max-height: 100%;\n margin: 0.5em;\n display: flex;\n flex-direction: column;\n }\n\n .card-host {\n font-size: 0.85em;\n }\n\n .card-description {\n margin: 0.5em 0 0 0;\n overflow: hidden;\n text-overflow: ellipsis;\n word-break: break-word;\n line-height: 1.2em;\n // cap description at 3 lines, the 1px is to clean up some stray pixels\n // TODO: fancier fade-out at the bottom to show off that it's too long?\n max-height: calc(1.2em * 3 - 1px);\n }\n\n .nsfw-alert {\n margin: 2em 0;\n }\n\n color: $fallback--text;\n color: var(--text, $fallback--text);\n border-style: solid;\n border-width: 1px;\n border-radius: $fallback--attachmentRadius;\n border-radius: var(--attachmentRadius, $fallback--attachmentRadius);\n border-color: $fallback--border;\n border-color: var(--border, $fallback--border);\n}\n","\n.StatusContent {\n flex: 1;\n min-width: 0;\n}\n","\n@import '../../_variables.scss';\n\n.post-status-form {\n position: relative;\n\n .attachments {\n margin-bottom: 0.5em;\n }\n\n .form-bottom {\n display: flex;\n justify-content: space-between;\n padding: 0.5em;\n height: 2.5em;\n\n button {\n width: 10em;\n }\n\n p {\n margin: 0.35em;\n padding: 0.35em;\n display: flex;\n }\n }\n\n .form-bottom-left {\n display: flex;\n flex: 1;\n padding-right: 7px;\n margin-right: 7px;\n max-width: 10em;\n }\n\n .preview-heading {\n display: flex;\n padding-left: 0.5em;\n }\n\n .preview-toggle {\n flex: 1;\n cursor: pointer;\n user-select: none;\n\n &:hover {\n text-decoration: underline;\n }\n svg, i {\n margin-left: 0.2em;\n font-size: 0.8em;\n transform: rotate(90deg);\n }\n }\n\n .preview-container {\n margin-bottom: 1em;\n }\n\n .preview-error {\n font-style: italic;\n color: $fallback--faint;\n color: var(--faint, $fallback--faint);\n }\n\n .preview-status {\n border: 1px solid $fallback--border;\n border: 1px solid var(--border, $fallback--border);\n border-radius: $fallback--tooltipRadius;\n border-radius: var(--tooltipRadius, $fallback--tooltipRadius);\n padding: 0.5em;\n margin: 0;\n }\n\n .text-format {\n .only-format {\n color: $fallback--faint;\n color: var(--faint, $fallback--faint);\n }\n }\n\n .visibility-tray {\n display: flex;\n justify-content: space-between;\n padding-top: 5px;\n align-items: baseline;\n }\n\n .visibility-notice.edit-warning {\n > :first-child {\n margin-top: 0;\n }\n\n > :last-child {\n margin-bottom: 0;\n }\n }\n\n .media-upload-icon, .poll-icon, .emoji-icon {\n font-size: 1.85em;\n line-height: 1.1;\n flex: 1;\n padding: 0 0.1em;\n display: flex;\n align-items: center;\n\n &.selected, &:hover {\n // needs to be specific to override icon default color\n svg, i, label {\n color: $fallback--lightText;\n color: var(--lightText, $fallback--lightText);\n }\n }\n\n &.disabled {\n svg, i {\n cursor: not-allowed;\n color: $fallback--icon;\n color: var(--btnDisabledText, $fallback--icon);\n\n &:hover {\n color: $fallback--icon;\n color: var(--btnDisabledText, $fallback--icon);\n }\n }\n }\n }\n\n // Order is not necessary but a good indicator\n .media-upload-icon {\n order: 1;\n justify-content: left;\n }\n\n .emoji-icon {\n order: 2;\n justify-content: center;\n }\n\n .poll-icon {\n order: 3;\n justify-content: right;\n }\n\n .error {\n text-align: center;\n }\n\n .media-upload-wrapper {\n margin-right: .2em;\n margin-bottom: .5em;\n width: 18em;\n\n img, video {\n object-fit: contain;\n max-height: 10em;\n }\n\n .video {\n max-height: 10em;\n }\n\n input {\n flex: 1;\n width: 100%;\n }\n }\n\n .status-input-wrapper {\n display: flex;\n position: relative;\n width: 100%;\n flex-direction: column;\n }\n\n .btn[disabled] {\n cursor: not-allowed;\n }\n\n form {\n display: flex;\n flex-direction: column;\n margin: 0.6em;\n position: relative;\n }\n\n .form-group {\n display: flex;\n flex-direction: column;\n padding: 0.25em 0.5em 0.5em;\n line-height: 1.85;\n }\n\n .form-post-body {\n // TODO: make a resizable textarea component?\n box-sizing: content-box; // needed for easier computation of dynamic size\n overflow: hidden;\n transition: min-height 200ms 100ms;\n // stock padding + 1 line of text (for counter)\n padding-bottom: calc(var(--_padding) + var(--post-line-height) * 1em);\n // two lines of text\n height: calc(var(--post-line-height) * 1em);\n min-height: calc(var(--post-line-height) * 1em);\n resize: none;\n\n &.scrollable-form {\n overflow-y: auto;\n }\n }\n\n .main-input {\n position: relative;\n }\n\n .character-counter {\n position: absolute;\n bottom: 0;\n right: 0;\n padding: 0;\n margin: 0 0.5em;\n\n &.error {\n color: $fallback--cRed;\n color: var(--cRed, $fallback--cRed);\n }\n }\n\n .btn[disabled] {\n cursor: not-allowed;\n }\n\n @keyframes fade-in {\n from { opacity: 0; }\n to { opacity: 0.6; }\n }\n\n @keyframes fade-out {\n from { opacity: 0.6; }\n to { opacity: 0; }\n }\n\n .drop-indicator {\n position: absolute;\n width: 100%;\n height: 100%;\n font-size: 5em;\n display: flex;\n align-items: center;\n justify-content: center;\n opacity: 0.6;\n color: $fallback--text;\n color: var(--text, $fallback--text);\n background-color: $fallback--bg;\n background-color: var(--bg, $fallback--bg);\n border-radius: $fallback--tooltipRadius;\n border-radius: var(--tooltipRadius, $fallback--tooltipRadius);\n border: 2px dashed $fallback--text;\n border: 2px dashed var(--text, $fallback--text);\n }\n}\n","\n.remote-follow {\n max-width: 220px;\n\n .remote-button {\n width: 100%;\n min-height: 2em;\n }\n}\n","\n@import '../../_variables.scss';\n\n// TODO: unify with other modals.\n.dark-overlay {\n &::before {\n bottom: 0;\n content: \" \";\n display: block;\n cursor: default;\n left: 0;\n position: fixed;\n right: 0;\n top: 0;\n background: rgba(27,31,35,.5);\n z-index: 99;\n }\n}\n\n.dialog-modal.panel {\n top: 0;\n left: 50%;\n max-height: 80vh;\n max-width: 90vw;\n margin: 15vh auto;\n position: fixed;\n transform: translateX(-50%);\n z-index: 999;\n cursor: default;\n display: block;\n background-color: $fallback--bg;\n background-color: var(--bg, $fallback--bg);\n\n .dialog-modal-heading {\n .title {\n text-align: center;\n }\n }\n\n .dialog-modal-content {\n margin: 0;\n padding: 1rem 1rem;\n background-color: $fallback--bg;\n background-color: var(--bg, $fallback--bg);\n white-space: normal;\n }\n\n .dialog-modal-footer {\n margin: 0;\n padding: .5em .5em;\n background-color: $fallback--bg;\n background-color: var(--bg, $fallback--bg);\n border-top: 1px solid $fallback--border;\n border-top: 1px solid var(--border, $fallback--border);\n display: flex;\n justify-content: flex-end;\n\n button {\n width: auto;\n margin-left: .5rem;\n }\n }\n}\n\n","\n@import '../../_variables.scss';\n\n.moderation-tools-popover {\n height: 100%;\n .trigger {\n display: flex !important;\n height: 100%;\n }\n}\n\n.moderation-tools-button {\n svg,i {\n font-size: 0.8em;\n }\n}\n","\n@import '../../_variables.scss';\n.AccountActions {\n .ellipsis-button {\n width: 2.5em;\n margin: -0.5em 0;\n padding: 0.5em 0;\n text-align: center;\n\n &:not(:hover) .icon {\n color: $fallback--lightText;\n color: var(--lightText, $fallback--lightText);\n }\n }\n}\n","\n@import '../../variables';\n\n.user-note {\n display: flex;\n flex-direction: column;\n\n .heading {\n display: flex;\n flex-direction: row;\n justify-content: space-between;\n align-items: center;\n margin-bottom: 0.75em;\n\n .btn {\n min-width: 95px;\n }\n\n .buttons {\n display: flex;\n flex-direction: row;\n justify-content: right;\n\n .btn {\n margin-left: 0.5em;\n }\n }\n }\n\n .note-text {\n align-self: stretch;\n }\n\n .note-text.-blank {\n font-style: italic;\n color: var(--faint, $fallback--faint);\n }\n}\n","@import '../../_variables.scss';\n\n.user-card {\n position: relative;\n z-index: 1;\n\n &:hover {\n --_still-image-img-visibility: visible;\n --_still-image-canvas-visibility: hidden;\n --_still-image-label-visibility: hidden;\n }\n\n .panel-heading {\n padding: .5em 0;\n text-align: center;\n box-shadow: none;\n background: transparent;\n flex-direction: column;\n align-items: stretch;\n // create new stacking context\n position: relative;\n }\n\n .panel-body {\n word-wrap: break-word;\n border-bottom-right-radius: inherit;\n border-bottom-left-radius: inherit;\n // create new stacking context\n position: relative;\n }\n\n .background-image {\n position: absolute;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n mask: linear-gradient(to top, white, transparent) bottom no-repeat,\n linear-gradient(to top, white, white);\n // Autoprefixer seem to ignore this one, and also syntax is different\n -webkit-mask-composite: xor;\n mask-composite: exclude;\n background-size: cover;\n mask-size: 100% 60%;\n border-top-left-radius: calc(var(--__roundnessTop, --panelRadius) - 1px);\n border-top-right-radius: calc(var(--__roundnessTop, --panelRadius) - 1px);\n border-bottom-left-radius: calc(var(--__roundnessBottom, --panelRadius) - 1px);\n border-bottom-right-radius: calc(var(--__roundnessBottom, --panelRadius) - 1px);\n background-color: var(--profileBg);\n z-index: -2;\n\n &.hide-bio {\n mask-size: 100% 40px;\n }\n }\n\n &-bio {\n text-align: center;\n display: block;\n line-height: 1.3;\n padding: 1em;\n margin: 0;\n\n a {\n color: $fallback--link;\n color: var(--postLink, $fallback--link);\n }\n\n img {\n object-fit: contain;\n vertical-align: middle;\n max-width: 100%;\n max-height: 400px;\n }\n }\n\n &.-rounded-t {\n border-top-left-radius: $fallback--panelRadius;\n border-top-left-radius: var(--panelRadius, $fallback--panelRadius);\n border-top-right-radius: $fallback--panelRadius;\n border-top-right-radius: var(--panelRadius, $fallback--panelRadius);\n\n --__roundnessTop: var(--panelRadius);\n --__roundnessBottom: 0;\n }\n\n &.-rounded {\n border-radius: $fallback--panelRadius;\n border-radius: var(--panelRadius, $fallback--panelRadius);\n\n --__roundnessTop: var(--panelRadius);\n --__roundnessBottom: var(--panelRadius);\n }\n\n &.-popover {\n border-radius: $fallback--tooltipRadius;\n border-radius: var(--tooltipRadius, $fallback--tooltipRadius);\n\n --__roundnessTop: var(--tooltipRadius);\n --__roundnessBottom: var(--tooltipRadius);\n }\n\n &.-bordered {\n border-width: 1px;\n border-style: solid;\n border-color: $fallback--border;\n border-color: var(--border, $fallback--border);\n }\n}\n\n.user-info {\n color: $fallback--lightText;\n color: var(--lightText, $fallback--lightText);\n padding: 0 26px;\n\n a {\n color: $fallback--lightText;\n color: var(--lightText, $fallback--lightText);\n\n &:hover {\n color: var(--icon);\n }\n }\n\n .container {\n min-width: 0;\n padding: 16px 0 6px;\n display: flex;\n align-items: flex-start;\n max-height: 56px;\n\n > * {\n min-width: 0;\n }\n\n > a {\n vertical-align: middle;\n display: flex;\n }\n\n .Avatar {\n --_avatarShadowBox: var(--avatarShadow);\n --_avatarShadowFilter: var(--avatarShadowFilter);\n --_avatarShadowInset: var(--avatarShadowInset);\n\n width: 56px;\n height: 56px;\n object-fit: cover;\n }\n }\n\n &-avatar {\n position: relative;\n cursor: pointer;\n\n &.-overlay {\n position: absolute;\n left: 0;\n top: 0;\n right: 0;\n bottom: 0;\n background-color: rgba(0, 0, 0, 0.3);\n display: flex;\n justify-content: center;\n align-items: center;\n border-radius: $fallback--avatarRadius;\n border-radius: var(--avatarRadius, $fallback--avatarRadius);\n opacity: 0;\n transition: opacity .2s ease;\n\n svg {\n color: #FFF;\n }\n }\n\n &:hover &.-overlay {\n opacity: 1;\n }\n }\n\n .external-link-button, .edit-profile-button {\n cursor: pointer;\n width: 2.5em;\n text-align: center;\n margin: -0.5em 0;\n padding: 0.5em 0;\n\n &:not(:hover) .icon {\n color: $fallback--lightText;\n color: var(--lightText, $fallback--lightText);\n }\n }\n\n .user-summary {\n display: block;\n margin-left: 0.6em;\n text-align: left;\n text-overflow: ellipsis;\n white-space: nowrap;\n flex: 1 1 0;\n // This is so that text doesn't get overlapped by avatar's shadow if it has\n // big one\n z-index: 1;\n line-height: 2em;\n\n --emoji-size: 1.7em;\n\n .top-line,\n .bottom-line {\n display: flex;\n }\n }\n\n .user-name {\n text-overflow: ellipsis;\n overflow: hidden;\n flex: 1 1 auto;\n margin-right: 1em;\n font-size: 1.1em;\n }\n\n .bottom-line {\n font-weight: light;\n font-size: 1.1em;\n align-items: baseline;\n\n .lock-icon {\n margin-left: 0.5em;\n }\n\n .user-screen-name {\n min-width: 1px;\n flex: 0 1 auto;\n text-overflow: ellipsis;\n overflow: hidden;\n }\n\n .dailyAvg {\n min-width: 1px;\n flex: 0 0 auto;\n margin-left: 1em;\n font-size: 0.7em;\n color: $fallback--text;\n color: var(--text, $fallback--text);\n }\n\n .user-role {\n flex: none;\n color: $fallback--text;\n color: var(--alertNeutralText, $fallback--text);\n background-color: $fallback--fg;\n background-color: var(--alertNeutral, $fallback--fg);\n }\n }\n\n .user-meta {\n margin-bottom: .15em;\n display: flex;\n align-items: baseline;\n line-height: 22px;\n flex-wrap: wrap;\n\n .following {\n flex: 1 0 auto;\n margin: 0;\n margin-bottom: .25em;\n text-align: left;\n }\n\n .highlighter {\n flex: 0 1 auto;\n display: flex;\n flex-wrap: wrap;\n margin-right: -.5em;\n align-self: start;\n\n .userHighlightCl {\n padding: 2px 10px;\n flex: 1 0 auto;\n }\n\n .userHighlightSel {\n padding-top: 0;\n padding-bottom: 0;\n flex: 1 0 auto;\n }\n\n .userHighlightText {\n width: 70px;\n flex: 1 0 auto;\n }\n\n .userHighlightCl,\n .userHighlightText,\n .userHighlightSel {\n vertical-align: top;\n margin-right: .5em;\n margin-bottom: .25em;\n }\n }\n }\n .user-interactions {\n position: relative;\n display: flex;\n flex-flow: row wrap;\n margin-right: -.75em;\n\n > * {\n margin: 0 .75em .6em 0;\n white-space: nowrap;\n min-width: 95px;\n }\n\n button {\n margin: 0;\n }\n }\n\n .user-note {\n margin: 0 .75em .6em 0;\n }\n}\n\n.sidebar .edit-profile-button {\n display: none;\n}\n\n.user-counts {\n display: flex;\n line-height:16px;\n padding: .5em 1.5em 0em 1.5em;\n text-align: center;\n justify-content: space-between;\n color: $fallback--lightText;\n color: var(--lightText, $fallback--lightText);\n flex-wrap: wrap;\n}\n\n.user-count {\n flex: 1 0 auto;\n padding: .5em 0 .5em 0;\n margin: 0 .5em;\n\n h5 {\n font-size:1em;\n font-weight: bolder;\n margin: 0 0 0.25em;\n }\n a {\n text-decoration: none;\n }\n}\n","\n.user-panel .signed-in {\n overflow: visible;\n z-index: 10;\n}\n","\n@import '../../_variables.scss';\n\n.NavigationEntry {\n display: flex;\n box-sizing: border-box;\n align-items: baseline;\n height: 3.5em;\n line-height: 3.5em;\n padding: 0 1em;\n width: 100%;\n color: $fallback--link;\n color: var(--link, $fallback--link);\n\n .timelines-chevron {\n margin-right: 0;\n }\n\n .main-link {\n flex: 1;\n }\n\n .menu-icon {\n margin-right: 0.8em;\n }\n\n .extra-button {\n width: 3em;\n text-align: center;\n\n &:last-child {\n margin-right: -0.8em;\n }\n }\n\n &:hover {\n background-color: $fallback--lightBg;\n background-color: var(--selectedMenu, $fallback--lightBg);\n color: $fallback--link;\n color: var(--selectedMenuText, $fallback--link);\n --faint: var(--selectedMenuFaintText, $fallback--faint);\n --faintLink: var(--selectedMenuFaintLink, $fallback--faint);\n --lightText: var(--selectedMenuLightText, $fallback--lightText);\n\n .menu-icon {\n --icon: var(--text, $fallback--icon);\n }\n }\n\n &.-active {\n font-weight: bolder;\n background-color: $fallback--lightBg;\n background-color: var(--selectedMenu, $fallback--lightBg);\n color: $fallback--text;\n color: var(--selectedMenuText, $fallback--text);\n --faint: var(--selectedMenuFaintText, $fallback--faint);\n --faintLink: var(--selectedMenuFaintLink, $fallback--faint);\n --lightText: var(--selectedMenuLightText, $fallback--lightText);\n\n .menu-icon {\n --icon: var(--text, $fallback--icon);\n }\n\n &:hover {\n text-decoration: underline;\n }\n }\n}\n","\n@import '../../_variables.scss';\n.NavigationPins {\n display: flex;\n flex-wrap: wrap;\n overflow: hidden;\n height: 100%;\n\n .alert-dot {\n border-radius: 100%;\n height: 0.5em;\n width: 0.5em;\n position: absolute;\n right: calc(50% - 0.75em);\n top: calc(50% - 0.5em);\n background-color: $fallback--cRed;\n background-color: var(--badgeNotification, $fallback--cRed);\n }\n\n .pinned-item {\n position: relative;\n flex: 1 0 3em;\n min-width: 2em;\n text-align: center;\n overflow: visible;\n box-sizing: border-box;\n height: 100%;\n\n & .svg-inline--fa,\n & .iconLetter {\n margin: 0;\n }\n\n &.router-link-active {\n color: $fallback--text;\n color: var(--panelText, $fallback--text);\n border-bottom: 4px solid;\n\n & .svg-inline--fa,\n & .iconLetter {\n color: inherit;\n }\n }\n }\n}\n","\n@import '../../_variables.scss';\n\n.NavPanel {\n .panel {\n overflow: hidden;\n box-shadow: var(--panelShadow);\n }\n\n ul {\n list-style: none;\n margin: 0;\n padding: 0;\n }\n\n li {\n position: relative;\n border-bottom: 1px solid;\n border-color: $fallback--border;\n border-color: var(--border, $fallback--border);\n }\n\n > li {\n &:first-child .menu-item {\n border-top-right-radius: $fallback--panelRadius;\n border-top-right-radius: var(--panelRadius, $fallback--panelRadius);\n border-top-left-radius: $fallback--panelRadius;\n border-top-left-radius: var(--panelRadius, $fallback--panelRadius);\n }\n\n &:last-child .menu-item {\n border-bottom-right-radius: $fallback--panelRadius;\n border-bottom-right-radius: var(--panelRadius, $fallback--panelRadius);\n border-bottom-left-radius: $fallback--panelRadius;\n border-bottom-left-radius: var(--panelRadius, $fallback--panelRadius);\n }\n }\n\n li:last-child {\n border: none;\n }\n\n .navigation-chevron {\n margin-left: 0.8em;\n margin-right: 0.8em;\n font-size: 1.1em;\n }\n\n .timelines-chevron {\n margin-left: 0.8em;\n font-size: 1.1em;\n }\n\n .timelines-background {\n padding: 0 0 0 0.6em;\n background-color: $fallback--lightBg;\n background-color: var(--selectedMenu, $fallback--lightBg);\n border-bottom: 1px solid;\n border-color: $fallback--border;\n border-color: var(--border, $fallback--border);\n }\n\n .timelines {\n background-color: $fallback--bg;\n background-color: var(--bg, $fallback--bg);\n }\n\n .nav-panel-heading {\n // breaks without a unit\n --panel-heading-height-padding: 0em;\n }\n}\n","\n .features-panel li {\n line-height: 24px;\n }\n","\n .who-to-follow * {\n vertical-align: middle;\n }\n .who-to-follow img {\n width: 32px;\n height: 32px;\n }\n .who-to-follow {\n padding: 0em 1em;\n margin: 0px;\n }\n .who-to-follow-items {\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n padding: 0px;\n margin: 1em 0em;\n }\n .who-to-follow-more {\n padding: 0px;\n margin: 1em 0em;\n text-align: center;\n }\n","\n@import '../../_variables.scss';\n\n.floating-shout {\n position: fixed;\n bottom: 0.5em;\n z-index: var(--ZI_popovers);\n max-width: 25em;\n\n &.-left {\n left: 0.5em;\n }\n\n &:not(.-left) {\n right: 0.5em;\n }\n}\n\n.shout-panel {\n .shout-heading {\n cursor: pointer;\n\n .icon {\n color: $fallback--text;\n color: var(--panelText, $fallback--text);\n margin-right: 0.5em;\n }\n\n .title {\n display: flex;\n justify-content: space-between;\n align-items: center;\n }\n }\n\n .shout-window {\n overflow-y: auto;\n overflow-x: hidden;\n max-height: 20em;\n }\n\n .shout-window-container {\n height: 100%;\n }\n\n .shout-message {\n display: flex;\n padding: 0.2em 0.5em;\n }\n\n .shout-avatar {\n img {\n height: 24px;\n width: 24px;\n border-radius: $fallback--avatarRadius;\n border-radius: var(--avatarRadius, $fallback--avatarRadius);\n margin-right: 0.5em;\n margin-top: 0.25em;\n }\n }\n\n .shout-input {\n display: flex;\n\n textarea {\n flex: 1;\n margin: 0.6em;\n min-height: 3.5em;\n resize: none;\n }\n }\n\n .shout-panel {\n .title {\n display: flex;\n justify-content: space-between;\n }\n }\n}\n","\n$modal-view-button-icon-height: 3em;\n$modal-view-button-icon-half-height: calc(#{$modal-view-button-icon-height} / 2);\n$modal-view-button-icon-width: 3em;\n$modal-view-button-icon-margin: 0.5em;\n\n.modal-view.media-modal-view {\n z-index: var(--ZI_media_modal);\n flex-direction: column;\n\n .modal-view-button-arrow,\n .modal-view-button-hide {\n opacity: 0.75;\n\n &:focus,\n &:hover {\n outline: none;\n box-shadow: none;\n }\n\n &:hover {\n opacity: 1;\n }\n }\n overflow: hidden;\n}\n\n.media-modal-view {\n @keyframes media-fadein {\n from {\n opacity: 0;\n }\n to {\n opacity: 1;\n }\n }\n\n .modal-image-container {\n display: flex;\n overflow: hidden;\n align-items: center;\n flex-direction: column;\n max-width: 100%;\n max-height: 100%;\n width: 100%;\n height: 100%;\n flex-grow: 1;\n justify-content: center;\n\n &-inner {\n width: 100%;\n height: 100%;\n flex-grow: 1;\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n }\n }\n\n .description,\n .counter {\n /* Hardcoded since background is also hardcoded */\n color: white;\n margin-top: 1em;\n text-shadow: 0 0 10px black, 0 0 10px black;\n padding: 0.2em 2em;\n }\n\n .description {\n flex: 0 0 auto;\n overflow-y: auto;\n min-height: 1em;\n max-width: 500px;\n max-height: 9.5em;\n word-break: break-all;\n }\n\n .modal-image {\n max-width: 100%;\n max-height: 100%;\n image-orientation: from-image; // NOTE: only FF supports this\n animation: 0.1s cubic-bezier(0.7, 0, 1, 0.6) media-fadein;\n\n &.loading {\n opacity: 0.5;\n }\n }\n\n .loading-spinner {\n width: 100%;\n height: 100%;\n position: absolute;\n pointer-events: none;\n display: flex;\n justify-content: center;\n align-items: center;\n\n svg {\n color: white;\n }\n }\n\n .modal-view-button {\n border: 0;\n padding: 0;\n opacity: 0;\n box-shadow: none;\n background: none;\n appearance: none;\n overflow: visible;\n cursor: pointer;\n transition: opacity 333ms cubic-bezier(.4,0,.22,1);\n height: $modal-view-button-icon-height;\n width: $modal-view-button-icon-width;\n\n .button-icon {\n position: absolute;\n height: $modal-view-button-icon-height;\n width: $modal-view-button-icon-width;\n font-size: 1rem;\n line-height: $modal-view-button-icon-height;\n color: #FFF;\n text-align: center;\n background-color: rgba(0,0,0,.3);\n }\n }\n\n .modal-view-button-arrow {\n position: absolute;\n display: block;\n top: 50%;\n margin-top: $modal-view-button-icon-half-height;\n width: $modal-view-button-icon-width;\n height: $modal-view-button-icon-height;\n\n .arrow-icon {\n position: absolute;\n top: 0;\n line-height: $modal-view-button-icon-height;\n color: #FFF;\n text-align: center;\n background-color: rgba(0,0,0,.3);\n }\n\n &--prev {\n left: 0;\n .arrow-icon {\n left: $modal-view-button-icon-margin;\n }\n }\n\n &--next {\n right: 0;\n .arrow-icon {\n right: $modal-view-button-icon-margin;\n }\n }\n }\n\n .modal-view-button-hide {\n position: absolute;\n top: 0;\n right: 0;\n .button-icon {\n top: $modal-view-button-icon-margin;\n right: $modal-view-button-icon-margin;\n }\n }\n}\n","\n@import '../../_variables.scss';\n\n.side-drawer-container {\n position: fixed;\n z-index: var(--ZI_navbar);\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n display: flex;\n align-items: stretch;\n transition-duration: 0s;\n transition-property: transform;\n}\n\n.side-drawer-container-open {\n transform: translate(0%);\n}\n\n.side-drawer-container-closed {\n transition-delay: 0.35s;\n transform: translate(-100%);\n}\n\n.side-drawer-darken {\n top: 0;\n left: 0;\n width: 100vw;\n height: 100vh;\n position: fixed;\n z-index: -1;\n transition: 0.35s;\n transition-property: background-color;\n background-color: rgba(0, 0, 0, 0.5);\n}\n\n.side-drawer-darken-closed {\n background-color: rgba(0, 0, 0, 0);\n}\n\n.side-drawer-click-outside {\n flex: 1 1 100%;\n}\n\n.side-drawer {\n overflow-x: hidden;\n transition-timing-function: cubic-bezier(0, 1, 0.5, 1);\n transition: 0.35s;\n transition-property: transform;\n margin: 0 0 0 -100px;\n padding: 0 0 1em 100px;\n width: 80%;\n max-width: 20em;\n flex: 0 0 80%;\n box-shadow: 1px 1px 4px rgba(0, 0, 0, 0.6);\n box-shadow: var(--panelShadow);\n background-color: $fallback--bg;\n background-color: var(--popover, $fallback--bg);\n color: $fallback--link;\n color: var(--popoverText, $fallback--link);\n --faint: var(--popoverFaintText, $fallback--faint);\n --faintLink: var(--popoverFaintLink, $fallback--faint);\n --lightText: var(--popoverLightText, $fallback--lightText);\n --icon: var(--popoverIcon, $fallback--icon);\n\n .badge {\n margin-left: 10px;\n }\n}\n\n.side-drawer-logo-wrapper {\n display: flex;\n align-items: center;\n padding: 0.85em;\n\n img {\n flex: none;\n height: 50px;\n margin-right: 0.85em;\n }\n\n span {\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n }\n}\n\n.side-drawer-click-outside-closed {\n flex: 0 0 0;\n}\n\n.side-drawer-closed {\n transform: translate(-100%);\n}\n\n.side-drawer-heading {\n background: transparent;\n flex-direction: column;\n align-items: stretch;\n display: flex;\n padding: 0;\n margin: 0;\n}\n\n.side-drawer ul {\n list-style: none;\n margin: 0;\n padding: 0;\n\n border-bottom: 1px solid;\n border-color: $fallback--border;\n border-color: var(--border, $fallback--border);\n}\n\n.side-drawer ul:last-child {\n border: 0;\n}\n\n.side-drawer li {\n padding: 0;\n\n a, button {\n box-sizing: border-box;\n display: block;\n height: 3em;\n line-height: 3em;\n padding: 0 0.7em;\n\n &:hover {\n background-color: $fallback--lightBg;\n background-color: var(--selectedMenuPopover, $fallback--lightBg);\n color: $fallback--text;\n color: var(--selectedMenuPopoverText, $fallback--text);\n --faint: var(--selectedMenuPopoverFaintText, $fallback--faint);\n --faintLink: var(--selectedMenuPopoverFaintLink, $fallback--faint);\n --lightText: var(--selectedMenuPopoverLightText, $fallback--lightText);\n --icon: var(--selectedMenuPopoverIcon, $fallback--icon);\n }\n }\n}\n","\n@import '../../_variables.scss';\n\n.MobilePostButton {\n &.button-default {\n width: 5em;\n height: 5em;\n border-radius: 100%;\n position: fixed;\n bottom: 1.5em;\n right: 1.5em;\n // TODO: this needs its own color, it has to stand out enough and link color\n // is not very optimal for this particular use.\n background-color: $fallback--fg;\n background-color: var(--btn, $fallback--fg);\n display: flex;\n justify-content: center;\n align-items: center;\n box-shadow: 0px 2px 2px rgba(0, 0, 0, 0.3), 0px 4px 6px rgba(0, 0, 0, 0.3);\n z-index: 10;\n\n transition: 0.35s transform;\n transition-timing-function: cubic-bezier(0, 1, 0.5, 1);\n }\n\n &.hidden {\n transform: translateY(150%);\n }\n\n svg {\n font-size: 1.5em;\n color: $fallback--text;\n color: var(--text, $fallback--text);\n }\n}\n\n@media all and (min-width: 801px) {\n .new-status-button:not(.always-show) {\n display: none;\n }\n}\n\n","\n@import '../../_variables.scss';\n@import '../../_mixins.scss';\n\n.ReplyButton {\n display: flex;\n\n > :first-child {\n padding: 10px;\n margin: -10px -8px -10px -10px;\n }\n\n .action-counter {\n pointer-events: none;\n user-select: none;\n }\n\n .interactive {\n &:hover .svg-inline--fa,\n &.-active .svg-inline--fa {\n color: $fallback--cBlue;\n color: var(--cBlue, $fallback--cBlue);\n }\n\n @include unfocused-style {\n .focus-marker {\n visibility: hidden;\n }\n }\n\n @include focused-style {\n .focus-marker {\n visibility: visible;\n }\n }\n }\n\n}\n","\n@import '../../_variables.scss';\n@import '../../_mixins.scss';\n\n.FavoriteButton {\n display: flex;\n\n > :first-child {\n padding: 10px;\n margin: -10px -8px -10px -10px;\n }\n\n .action-counter {\n pointer-events: none;\n user-select: none;\n }\n\n .interactive {\n .svg-inline--fa {\n animation-duration: 0.6s;\n }\n\n &:hover .svg-inline--fa,\n &.-favorited .svg-inline--fa {\n color: $fallback--cOrange;\n color: var(--cOrange, $fallback--cOrange);\n }\n\n @include unfocused-style {\n .focus-marker {\n visibility: hidden;\n }\n\n .active-marker {\n visibility: visible;\n }\n }\n\n @include focused-style {\n .focus-marker {\n visibility: visible;\n }\n\n .active-marker {\n visibility: hidden;\n }\n }\n }\n}\n","\n@import '../../_variables.scss';\n@import '../../_mixins.scss';\n\n.ReactButton {\n .reaction-picker-filter {\n padding: 0.5em;\n display: flex;\n\n input {\n flex: 1;\n }\n }\n\n .reaction-picker-divider {\n height: 1px;\n width: 100%;\n margin: 0.5em;\n background-color: var(--border, $fallback--border);\n }\n\n .reaction-picker {\n width: 10em;\n height: 9em;\n font-size: 1.5em;\n overflow-y: scroll;\n display: flex;\n flex-wrap: wrap;\n padding: 0.5em;\n text-align: center;\n align-content: flex-start;\n user-select: none;\n\n mask: linear-gradient(to top, white 0, transparent 100%) bottom no-repeat,\n linear-gradient(to bottom, white 0, transparent 100%) top no-repeat,\n linear-gradient(to top, white, white);\n transition: mask-size 150ms;\n mask-size: 100% 20px, 100% 20px, auto;\n\n /* Autoprefixed seem to ignore this one, and also syntax is different */\n -webkit-mask-composite: xor;\n mask-composite: exclude;\n\n .emoji-button {\n cursor: pointer;\n\n flex-basis: 20%;\n line-height: 1.5;\n align-content: center;\n\n &:hover {\n transform: scale(1.25);\n }\n }\n }\n\n /* override of popover internal stuff */\n .popover-trigger-button {\n width: auto;\n }\n\n .popover-trigger {\n padding: 10px;\n margin: -10px;\n\n &:hover .svg-inline--fa {\n color: $fallback--text;\n color: var(--text, $fallback--text);\n }\n\n }\n\n .popover-trigger-button {\n @include unfocused-style {\n .focus-marker {\n visibility: hidden;\n }\n }\n\n @include focused-style {\n .focus-marker {\n visibility: visible;\n }\n }\n }\n}\n\n","\n@import '../../_variables.scss';\n@import '../../_mixins.scss';\n\n.RetweetButton {\n display: flex;\n\n > :first-child {\n padding: 10px;\n margin: -10px -8px -10px -10px;\n }\n\n .action-counter {\n pointer-events: none;\n user-select: none;\n }\n\n .interactive {\n .svg-inline--fa {\n animation-duration: 0.6s;\n }\n\n &:hover .svg-inline--fa,\n &.-repeated .svg-inline--fa {\n color: $fallback--cGreen;\n color: var(--cGreen, $fallback--cGreen);\n }\n\n @include unfocused-style {\n .focus-marker {\n visibility: hidden;\n }\n\n .active-marker {\n visibility: visible;\n }\n }\n\n @include focused-style {\n .focus-marker {\n visibility: visible;\n }\n\n .active-marker {\n visibility: hidden;\n }\n }\n }\n}\n","\n@import '../../_variables.scss';\n@import '../../_mixins.scss';\n\n.ExtraButtons {\n /* override of popover internal stuff */\n .popover-trigger-button {\n width: auto;\n }\n\n .popover-trigger {\n position: static;\n padding: 10px;\n margin: -10px;\n\n &:hover .svg-inline--fa {\n color: $fallback--text;\n color: var(--text, $fallback--text);\n }\n\n }\n\n .popover-trigger-button {\n @include unfocused-style {\n .focus-marker {\n visibility: hidden;\n }\n }\n\n @include focused-style {\n .focus-marker {\n visibility: visible;\n }\n }\n }\n}\n","\n@import '../../_variables.scss';\n\n.avatars {\n display: flex;\n margin: 0;\n padding: 0;\n\n // For hiding overflowing elements\n flex-wrap: wrap;\n height: 24px;\n\n .avatars-item {\n margin: 0 0 5px 5px;\n\n &:first-child {\n padding-left: 5px;\n }\n\n .avatar-small {\n border-radius: $fallback--avatarAltRadius;\n border-radius: var(--avatarAltRadius, $fallback--avatarAltRadius);\n height: 24px;\n width: 24px;\n }\n }\n}\n","\n@import '../../_variables.scss';\n\n/* popover styles load on-demand, so we need to override */\n.status-popover.popover {\n font-size: 1rem;\n min-width: 15em;\n max-width: 95%;\n\n border-color: $fallback--border;\n border-color: var(--border, $fallback--border);\n border-style: solid;\n border-width: 1px;\n border-radius: $fallback--tooltipRadius;\n border-radius: var(--tooltipRadius, $fallback--tooltipRadius);\n\n /* TODO cleanup this */\n .Status.Status {\n border: none;\n }\n\n .status-preview-no-content {\n padding: 1em;\n text-align: center;\n\n i {\n font-size: 2em;\n }\n }\n}\n\n","\n@import '../../_variables.scss';\n\n.user-list-popover {\n padding: 0.5em;\n\n --emoji-size: 16px;\n\n .user-list-row {\n padding: 0.25em;\n display: flex;\n flex-direction: row;\n\n .user-list-names {\n display: flex;\n flex-direction: column;\n margin-left: 0.5em;\n min-width: 5em;\n\n img {\n width: 1em;\n height: 1em;\n }\n }\n\n .user-list-screen-name {\n font-size: 0.65em;\n }\n }\n}\n\n","\n@import '../../_variables.scss';\n\n.EmojiReactions {\n display: flex;\n margin-top: 0.25em;\n flex-wrap: wrap;\n\n .emoji-reaction {\n padding: 0 0.5em;\n margin-right: 0.5em;\n margin-top: 0.5em;\n display: flex;\n align-items: center;\n justify-content: center;\n box-sizing: border-box;\n\n .reaction-emoji {\n width: 1.25em;\n margin-right: 0.25em;\n }\n\n &:focus {\n outline: none;\n }\n\n &.not-clickable {\n cursor: default;\n &:hover {\n box-shadow: $fallback--buttonShadow;\n box-shadow: var(--buttonShadow);\n }\n }\n\n &.-picked-reaction {\n border: 1px solid var(--accent, $fallback--link);\n margin-left: -1px; // offset the border, can't use inset shadows either\n margin-right: calc(0.5em - 1px);\n }\n }\n\n .emoji-reaction-expand {\n padding: 0 0.5em;\n margin-right: 0.5em;\n margin-top: 0.5em;\n display: flex;\n align-items: center;\n justify-content: center;\n &:hover {\n text-decoration: underline;\n }\n }\n\n}\n","@import '../../_variables.scss';\n\n.Status {\n min-width: 0;\n white-space: normal;\n word-wrap: break-word;\n word-break: break-word;\n\n &:hover {\n --_still-image-img-visibility: visible;\n --_still-image-canvas-visibility: hidden;\n --_still-image-label-visibility: hidden;\n }\n\n &.-focused {\n background-color: $fallback--lightBg;\n background-color: var(--selectedPost, $fallback--lightBg);\n color: $fallback--text;\n color: var(--selectedPostText, $fallback--text);\n\n --lightText: var(--selectedPostLightText, $fallback--light);\n --faint: var(--selectedPostFaintText, $fallback--faint);\n --faintLink: var(--selectedPostFaintLink, $fallback--faint);\n --postLink: var(--selectedPostPostLink, $fallback--faint);\n --postFaintLink: var(--selectedPostFaintPostLink, $fallback--faint);\n --icon: var(--selectedPostIcon, $fallback--icon);\n }\n\n .gravestone {\n padding: var(--status-margin, $status-margin);\n color: $fallback--faint;\n color: var(--faint, $fallback--faint);\n display: flex;\n\n .deleted-text {\n margin: 0.5em 0;\n align-items: center;\n }\n }\n\n .status-container {\n display: flex;\n padding: var(--status-margin, $status-margin);\n\n > * {\n min-width: 0;\n }\n\n &.-repeat {\n padding-top: 0;\n }\n }\n\n .pin {\n padding: var(--status-margin, $status-margin) var(--status-margin, $status-margin) 0;\n display: flex;\n align-items: center;\n justify-content: flex-end;\n }\n\n ._misclick-prevention & {\n pointer-events: none;\n\n .attachments {\n pointer-events: initial;\n cursor: initial;\n }\n }\n\n .left-side {\n margin-right: var(--status-margin, $status-margin);\n }\n\n .right-side {\n flex: 1;\n min-width: 0;\n }\n\n .usercard {\n margin-bottom: var(--status-margin, $status-margin);\n }\n\n .status-username {\n white-space: nowrap;\n overflow: hidden;\n max-width: 85%;\n font-weight: bold;\n flex-shrink: 1;\n margin-right: 0.4em;\n text-overflow: ellipsis;\n\n --_still_image-label-scale: 0.25;\n --emoji-size: 14px;\n }\n\n .status-favicon {\n height: 18px;\n width: 18px;\n margin-right: 0.4em;\n }\n\n .status-heading {\n margin-bottom: 0.5em;\n }\n\n .heading-name-row {\n display: flex;\n justify-content: space-between;\n line-height: 1.3;\n\n a {\n display: inline-block;\n word-break: break-all;\n }\n }\n\n .account-name {\n min-width: 1.6em;\n margin-right: 0.4em;\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n flex: 1 1 0;\n }\n\n .heading-left {\n display: flex;\n min-width: 0;\n }\n\n .heading-right {\n display: flex;\n flex-shrink: 0;\n\n .button-unstyled {\n padding: 5px;\n margin: -5px;\n\n &:hover svg {\n color: $fallback--lightText;\n color: var(--lightText, $fallback--lightText);\n }\n }\n\n .svg-inline--fa {\n margin-left: 0.25em;\n }\n }\n\n .glued-label {\n display: inline-flex;\n white-space: nowrap;\n }\n\n .timeago {\n margin-right: 0.2em;\n }\n\n & .heading-reply-row,\n & .heading-edited-row {\n position: relative;\n align-content: baseline;\n font-size: 0.85em;\n margin-top: 0.2em;\n line-height: 130%;\n max-width: 100%;\n align-items: stretch;\n }\n\n & .reply-to-popover,\n & .reply-to-no-popover,\n & .mentions {\n min-width: 0;\n margin-right: 0.4em;\n flex-shrink: 0;\n }\n\n .reply-glued-label {\n margin-right: 0.5em;\n }\n\n .reply-to-popover {\n .reply-to:hover::before {\n content: '';\n display: block;\n position: absolute;\n bottom: 0;\n width: 100%;\n border-bottom: 1px solid var(--faint);\n pointer-events: none;\n }\n\n .faint-link:hover {\n // override default\n text-decoration: none;\n }\n\n &.-strikethrough {\n .reply-to::after {\n content: '';\n display: block;\n position: absolute;\n top: 50%;\n width: 100%;\n border-bottom: 1px solid var(--faint);\n pointer-events: none;\n }\n }\n }\n\n & .mentions,\n & .reply-to {\n white-space: nowrap;\n position: relative;\n }\n\n & .mentions-text,\n & .reply-to-text {\n color: var(--faint);\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n }\n\n .mentions-line {\n display: inline;\n }\n\n .replies {\n margin-top: 0.25em;\n line-height: 1.3;\n font-size: 0.85em;\n display: flex;\n flex-wrap: wrap;\n\n & > * {\n margin-right: 0.4em;\n }\n }\n\n .reply-link {\n height: 17px;\n }\n\n .repeat-info {\n padding: 0.4em var(--status-margin, $status-margin);\n\n .repeat-icon {\n color: $fallback--cGreen;\n color: var(--cGreen, $fallback--cGreen);\n }\n }\n\n .repeater-avatar {\n border-radius: var(--avatarAltRadius, $fallback--avatarAltRadius);\n margin-left: 28px;\n width: 20px;\n height: 20px;\n }\n\n .repeater-name {\n text-overflow: ellipsis;\n margin-right: 0;\n\n .emoji {\n width: 14px;\n height: 14px;\n vertical-align: middle;\n object-fit: contain;\n }\n }\n\n .status-fadein {\n animation-duration: 0.4s;\n animation-name: fadein;\n }\n\n @keyframes fadein {\n from {\n opacity: 0;\n }\n\n to {\n opacity: 1;\n }\n }\n\n .status-actions {\n position: relative;\n width: 100%;\n display: flex;\n margin-top: var(--status-margin, $status-margin);\n\n > * {\n max-width: 4em;\n flex: 1;\n }\n }\n\n .muted {\n padding: 0.25em 0.6em;\n height: 1.2em;\n line-height: 1.2em;\n text-overflow: ellipsis;\n overflow: hidden;\n display: flex;\n flex-wrap: nowrap;\n\n & .status-username,\n & .mute-thread,\n & .mute-words {\n word-wrap: normal;\n word-break: normal;\n white-space: nowrap;\n }\n\n & .status-username,\n & .mute-words {\n text-overflow: ellipsis;\n overflow: hidden;\n }\n\n .status-username {\n font-weight: normal;\n flex: 0 1 auto;\n margin-right: 0.2em;\n font-size: smaller;\n }\n\n .mute-thread {\n flex: 0 0 auto;\n }\n\n .mute-words {\n flex: 1 0 5em;\n margin-left: 0.2em;\n\n &::before {\n content: ' ';\n }\n }\n\n .unmute {\n flex: 0 0 auto;\n margin-left: auto;\n display: block;\n }\n }\n\n .reply-form {\n padding-top: 0;\n padding-bottom: 0;\n }\n\n .reply-body {\n flex: 1;\n }\n\n .favs-repeated-users {\n margin-top: var(--status-margin, $status-margin);\n }\n\n .stats {\n width: 100%;\n display: flex;\n line-height: 1em;\n }\n\n .avatar-row {\n flex: 1;\n overflow: hidden;\n position: relative;\n display: flex;\n align-items: center;\n\n &::before {\n content: '';\n position: absolute;\n height: 100%;\n width: 1px;\n left: 0;\n background-color: var(--faint, $fallback--faint);\n }\n }\n\n .stat-count {\n margin-right: var(--status-margin, $status-margin);\n user-select: none;\n\n .stat-title {\n color: var(--faint, $fallback--faint);\n font-size: 0.85em;\n text-transform: uppercase;\n position: relative;\n }\n\n .stat-number {\n font-weight: bolder;\n font-size: 1.1em;\n line-height: 1em;\n }\n\n &:hover .stat-title {\n text-decoration: underline;\n }\n }\n\n @media all and (max-width: 800px) {\n .repeater-avatar {\n margin-left: 20px;\n }\n\n .post-avatar {\n width: 40px;\n height: 40px;\n\n // TODO define those other way somehow?\n // stylelint-disable rscss/class-format\n &.-compact {\n width: 32px;\n height: 32px;\n }\n }\n }\n}\n","@import '../../_variables.scss';\n\n.Report {\n .report-content {\n margin: 0.5em 0 1em;\n }\n\n .report-state {\n margin: 0.5em 0 1em;\n }\n\n .reported-status {\n border: 1px solid $fallback--faint;\n border-color: var(--faint, $fallback--faint);\n border-radius: $fallback--inputRadius;\n border-radius: var(--inputRadius, $fallback--inputRadius);\n color: $fallback--text;\n color: var(--text, $fallback--text);\n display: block;\n padding: 0.5em;\n margin: 0.5em 0;\n\n .status-content {\n pointer-events: none;\n }\n\n .reported-status-heading {\n display: flex;\n width: 100%;\n justify-content: space-between;\n margin-bottom: 0.2em;\n }\n\n .reported-status-name {\n font-weight: bold;\n }\n }\n\n .note {\n width: 100%;\n margin-bottom: 0.5em;\n }\n}\n","@import '../../_variables.scss';\n\n// TODO Copypaste from Status, should unify it somehow\n.Notification {\n border-bottom: 1px solid;\n border-color: $fallback--border;\n border-color: var(--border, $fallback--border);\n word-wrap: break-word;\n word-break: break-word;\n --emoji-size: 14px;\n\n &:hover {\n --_still-image-img-visibility: visible;\n --_still-image-canvas-visibility: hidden;\n --_still-image-label-visibility: hidden;\n }\n\n &.-muted {\n padding: 0.25em 0.6em;\n height: 1.2em;\n line-height: 1.2em;\n text-overflow: ellipsis;\n overflow: hidden;\n display: flex;\n flex-wrap: nowrap;\n\n & .status-username,\n & .mute-thread,\n & .mute-words {\n word-wrap: normal;\n word-break: normal;\n white-space: nowrap;\n }\n\n & .status-username,\n & .mute-words {\n text-overflow: ellipsis;\n overflow: hidden;\n }\n\n .status-username {\n font-weight: normal;\n flex: 0 1 auto;\n margin-right: 0.2em;\n font-size: smaller;\n }\n\n .mute-thread {\n flex: 0 0 auto;\n }\n\n .mute-words {\n flex: 1 0 5em;\n margin-left: 0.2em;\n\n &::before {\n content: ' ';\n }\n }\n\n .unmute {\n flex: 0 0 auto;\n margin-left: auto;\n display: block;\n }\n }\n\n .type-icon {\n margin: 0 0.1em;\n }\n\n &.-type--repeat .type-icon {\n color: $fallback--cGreen;\n color: var(--cGreen, $fallback--cGreen);\n }\n\n &.-type--follow .type-icon {\n color: $fallback--cBlue;\n color: var(--cBlue, $fallback--cBlue);\n }\n\n &.-type--follow-request .type-icon {\n color: $fallback--cBlue;\n color: var(--cBlue, $fallback--cBlue);\n }\n\n &.-type--like .type-icon {\n color: orange;\n color: $fallback--cOrange;\n color: var(--cOrange, $fallback--cOrange);\n }\n\n &.-type--move .type-icon {\n color: $fallback--cBlue;\n color: var(--cBlue, $fallback--cBlue);\n }\n}\n","@import '../../_variables.scss';\n\n.Notifications {\n &:not(.minimal) {\n // a bit of a hack to allow scrolling below notifications\n padding-bottom: 15em;\n }\n\n .loadmore-error {\n color: $fallback--text;\n color: var(--text, $fallback--text);\n }\n\n .notification {\n position: relative;\n\n .notification-overlay {\n position: absolute;\n top: 0;\n right: 0;\n left: 0;\n bottom: 0;\n pointer-events: none;\n }\n\n &.unseen {\n .notification-overlay {\n background-image: linear-gradient(135deg, var(--badgeNotification, $fallback--cRed) 4px, transparent 10px)\n }\n }\n }\n}\n\n.notification {\n box-sizing: border-box;\n\n &:hover .animated.Avatar {\n canvas {\n display: none;\n }\n img {\n visibility: visible;\n }\n }\n\n &:last-child .Notification {\n border-bottom: none;\n }\n\n .non-mention {\n display: flex;\n flex: 1;\n flex-wrap: nowrap;\n padding: 0.6em;\n min-width: 0;\n\n .avatar-container {\n width: 32px;\n height: 32px;\n }\n\n .faint {\n --link: var(--faintLink);\n --text: var(--faint);\n }\n }\n\n .follow-request-accept {\n &:hover {\n color: $fallback--text;\n color: var(--text, $fallback--text);\n }\n }\n\n .follow-request-reject {\n &:hover {\n color: $fallback--cRed;\n color: var(--cRed, $fallback--cRed);\n }\n }\n\n .follow-text, .move-text {\n padding: 0.5em 0;\n overflow-wrap: break-word;\n display: flex;\n justify-content: space-between;\n\n .follow-name {\n display: block;\n max-width: 100%;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n }\n }\n\n /* TODO cleanup this */\n .Status {\n flex: 1;\n }\n\n time {\n white-space: nowrap;\n }\n\n .notification-right {\n flex: 1;\n padding-left: 0.8em;\n min-width: 0;\n\n .timeago {\n min-width: 3em;\n text-align: right;\n }\n\n .timeago-link {\n margin-right: 0.2em;\n }\n\n .expand-icon {\n .svg-inline--fa {\n margin-left: 0.25em;\n }\n }\n }\n\n .emoji-reaction-emoji {\n font-size: 1.3em;\n }\n\n .notification-details {\n min-width: 0;\n word-wrap: break-word;\n line-height: var(--post-line-height);\n position: relative;\n overflow: hidden;\n width: 100%;\n flex: 1 1 0;\n display: flex;\n flex-wrap: nowrap;\n justify-content: space-between;\n\n .name-and-action {\n flex: 1;\n overflow: hidden;\n text-overflow: ellipsis;\n }\n\n .username {\n font-weight: bolder;\n max-width: 100%;\n text-overflow: ellipsis;\n white-space: nowrap;\n }\n\n .timeago {\n margin-right: 0.2em;\n }\n\n .status-content {\n margin: 0;\n max-height: 300px;\n }\n\n h1 {\n word-break: break-all;\n margin: 0 0 0.3em;\n padding: 0;\n font-size: 1em;\n line-height: 1.5;\n\n small {\n font-weight: lighter;\n }\n }\n\n p {\n margin: 0;\n margin-top: 0;\n margin-bottom: 0.3em;\n }\n }\n}\n","\n@import '../../_variables.scss';\n\n.MobileNav {\n z-index: var(--ZI_navbar);\n\n .mobile-nav {\n display: grid;\n line-height: var(--navbar-height);\n grid-template-rows: 50px;\n grid-template-columns: 2fr auto;\n width: 100%;\n box-sizing: border-box;\n\n a {\n color: var(--topBarLink, $fallback--link);\n }\n }\n\n .mobile-inner-nav {\n width: 100%;\n display: flex;\n align-items: center;\n }\n\n .mobile-nav-button {\n display: inline-block;\n text-align: center;\n padding: 0 1em;\n position: relative;\n cursor: pointer;\n }\n\n .site-name {\n padding: 0 .3em;\n display: inline-block;\n }\n\n .item {\n /* moslty just to get rid of extra whitespaces */\n display: flex;\n }\n\n .alert-dot {\n border-radius: 100%;\n height: 8px;\n width: 8px;\n position: absolute;\n left: calc(50% - 4px);\n top: calc(50% - 4px);\n margin-left: 6px;\n margin-top: -6px;\n background-color: $fallback--cRed;\n background-color: var(--badgeNotification, $fallback--cRed);\n }\n\n .mobile-notifications-drawer {\n width: 100%;\n height: 100vh;\n overflow-x: hidden;\n position: fixed;\n top: 0;\n left: 0;\n box-shadow: 1px 1px 4px rgba(0,0,0,.6);\n box-shadow: var(--panelShadow);\n transition-property: transform;\n transition-duration: 0.25s;\n transform: translateX(0);\n z-index: var(--ZI_navbar);\n -webkit-overflow-scrolling: touch;\n\n &.-closed {\n transform: translateX(100%);\n box-shadow: none;\n }\n }\n\n .mobile-notifications-header {\n display: flex;\n align-items: center;\n justify-content: space-between;\n z-index: calc(var(--ZI_navbar) + 100);\n width: 100%;\n height: 50px;\n line-height: 50px;\n position: absolute;\n color: var(--topBarText);\n background-color: $fallback--fg;\n background-color: var(--topBar, $fallback--fg);\n box-shadow: 0px 0px 4px rgba(0,0,0,.6);\n box-shadow: var(--topBarShadow);\n\n .spacer {\n flex: 1;\n }\n\n .title {\n font-size: 1.3em;\n margin-left: 0.6em;\n }\n }\n\n .pins {\n flex: 1;\n\n .pinned-item {\n flex-grow: 1;\n }\n }\n\n .mobile-notifications {\n margin-top: 50px;\n width: 100vw;\n height: calc(100vh - var(--navbar-height));\n overflow-x: hidden;\n overflow-y: scroll;\n color: $fallback--text;\n color: var(--text, $fallback--text);\n background-color: $fallback--bg;\n background-color: var(--bg, $fallback--bg);\n\n .notifications {\n padding: 0;\n border-radius: 0;\n box-shadow: none;\n\n .panel {\n border-radius: 0;\n margin: 0;\n box-shadow: none;\n }\n\n .panel::after {\n border-radius: 0;\n }\n\n .panel .panel-heading {\n border-radius: 0;\n box-shadow: none;\n }\n }\n }\n}\n\n","\n@import '../../_variables.scss';\n\n.SearchBar {\n display: inline-flex;\n align-items: baseline;\n vertical-align: baseline;\n justify-content: flex-end;\n\n &.-expanded {\n width: 100%;\n }\n\n .search-bar-input,\n .search-button {\n height: 29px;\n }\n\n .search-bar-input {\n flex: 1 0 auto;\n }\n\n .cancel-search {\n height: 50px;\n }\n\n .cancel-icon {\n color: $fallback--text;\n color: var(--btnTopBarText, $fallback--text);\n }\n}\n\n","@import '../../_variables.scss';\n\n.DesktopNav {\n width: 100%;\n z-index: var(--ZI_navbar);\n\n input {\n color: var(--inputTopbarText, var(--inputText));\n }\n\n a {\n color: var(--topBarLink, $fallback--link);\n }\n\n .inner-nav {\n display: grid;\n grid-template-rows: var(--navbar-height);\n grid-template-columns: 2fr auto 2fr;\n grid-template-areas: \"sitename logo actions\";\n box-sizing: border-box;\n padding: 0 1.2em;\n margin: auto;\n max-width: 980px;\n }\n\n &.-column-stretch .inner-nav {\n --miniColumn: 25rem;\n --maxiColumn: 45rem;\n --columnGap: 1em;\n max-width: calc(\n var(--sidebarColumnWidth, var(--miniColumn)) +\n var(--contentColumnWidth, var(--maxiColumn)) +\n var(--columnGap)\n );\n }\n\n &.-column-stretch.-wide .inner-nav {\n max-width: calc(\n var(--sidebarColumnWidth, var(--miniColumn)) +\n var(--contentColumnWidth, var(--maxiColumn)) +\n var(--notifsColumnWidth, var(--miniColumn)) +\n var(--columnGap)\n );\n }\n\n &.-logoLeft .inner-nav {\n grid-template-columns: auto 2fr 2fr;\n grid-template-areas: \"logo sitename actions\";\n }\n\n .button-default {\n &, svg {\n color: $fallback--text;\n color: var(--btnTopBarText, $fallback--text);\n }\n\n &:active {\n background-color: $fallback--fg;\n background-color: var(--btnPressedTopBar, $fallback--fg);\n color: $fallback--text;\n color: var(--btnPressedTopBarText, $fallback--text);\n }\n\n &:disabled {\n color: $fallback--text;\n color: var(--btnDisabledTopBarText, $fallback--text);\n }\n\n &.toggled {\n color: $fallback--text;\n color: var(--btnToggledTopBarText, $fallback--text);\n background-color: $fallback--fg;\n background-color: var(--btnToggledTopBar, $fallback--fg)\n }\n }\n\n .logo {\n grid-area: logo;\n position: relative;\n transition: opacity;\n transition-timing-function: ease-out;\n transition-duration: 100ms;\n\n @media all and (min-width: 800px) {\n opacity: 1 !important;\n }\n\n .mask {\n mask-repeat: no-repeat;\n mask-position: center;\n mask-size: contain;\n background-color: $fallback--fg;\n background-color: var(--topBarText, $fallback--fg);\n position: absolute;\n top: 0;\n bottom: 0;\n left: 0;\n right: 0;\n }\n\n img {\n display: inline-block;\n height: var(--navbar-height);\n }\n }\n\n .nav-icon {\n margin-left: 0.2em;\n width: 2em;\n height: 100%;\n text-align: center;\n\n .svg-inline--fa {\n color: $fallback--link;\n color: var(--topBarLink, $fallback--link);\n }\n }\n\n .sitename {\n grid-area: sitename;\n }\n\n .actions {\n grid-area: actions;\n }\n\n .item {\n flex: 1;\n line-height: var(--navbar-height);\n height: var(--navbar-height);\n overflow: hidden;\n display: flex;\n flex-wrap: wrap;\n\n &.right {\n justify-content: flex-end;\n text-align: right;\n }\n }\n\n .spacer {\n width: 1em;\n }\n}\n","\n@import '../../_variables.scss';\n\n.list {\n &-item:not(:last-child) {\n border-bottom: 1px solid;\n border-bottom-color: $fallback--border;\n border-bottom-color: var(--border, $fallback--border);\n }\n\n &-empty-content {\n text-align: center;\n padding: 10px;\n }\n}\n","\n@import '../../_variables.scss';\n\n.user-reporting-panel {\n width: 90vw;\n max-width: 700px;\n min-height: 20vh;\n max-height: 80vh;\n\n .panel-body {\n display: flex;\n flex-direction: column-reverse;\n border-top: 1px solid;\n border-color: $fallback--border;\n border-color: var(--border, $fallback--border);\n overflow: hidden;\n }\n\n &-left {\n padding: 1.1em 0.7em 0.7em;\n line-height: var(--post-line-height);\n box-sizing: border-box;\n\n > div {\n margin-bottom: 1em;\n\n &:last-child {\n margin-bottom: 0;\n }\n }\n\n p {\n margin-top: 0;\n }\n\n textarea.form-control {\n line-height: 16px;\n resize: none;\n overflow: hidden;\n transition: min-height 200ms 100ms;\n min-height: 44px;\n width: 100%;\n }\n\n .btn {\n min-width: 10em;\n padding: 0 2em;\n }\n\n .alert {\n margin: 1em 0 0 0;\n line-height: 1.3em;\n }\n }\n\n &-right {\n display: flex;\n flex-direction: column;\n overflow-y: auto;\n }\n\n &-sitem {\n display: flex;\n justify-content: space-between;\n\n /* TODO cleanup this */\n > .Status {\n flex: 1;\n }\n\n > .checkbox {\n margin: 0.75em;\n }\n }\n\n @media all and (min-width: 801px) {\n .panel-body {\n flex-direction: row;\n }\n\n &-left {\n width: 50%;\n max-width: 320px;\n border-right: 1px solid;\n border-color: $fallback--border;\n border-color: var(--border, $fallback--border);\n padding: 1.1em;\n\n > div {\n margin-bottom: 2em;\n }\n }\n\n &-right {\n width: 50%;\n flex: 1 1 auto;\n margin-bottom: 12px;\n }\n }\n}\n","\n.modal-view.edit-form-modal-view {\n align-items: flex-start;\n}\n.edit-form-modal-panel {\n flex-shrink: 0;\n margin-top: 25%;\n margin-bottom: 2em;\n width: 100%;\n max-width: 700px;\n\n @media (orientation: landscape) {\n margin-top: 8%;\n }\n\n .form-bottom-left {\n max-width: 6.5em;\n\n .emoji-icon {\n justify-content: right;\n }\n }\n}\n","\n.modal-view.post-form-modal-view {\n align-items: flex-start;\n}\n\n.post-form-modal-panel {\n flex-shrink: 0;\n margin-top: 25%;\n margin-bottom: 2em;\n width: 100%;\n max-width: 700px;\n\n @media (orientation: landscape) {\n margin-top: 8%;\n }\n}\n","\n.modal-view.status-history-modal-view {\n align-items: flex-start;\n}\n.status-history-modal-panel {\n flex-shrink: 0;\n margin-top: 25%;\n margin-bottom: 2em;\n width: 100%;\n max-width: 700px;\n\n @media (orientation: landscape) {\n margin-top: 8%;\n }\n}\n","\n@import '../../_variables.scss';\n\n.global-notice-list {\n position: fixed;\n top: calc(var(--navbar-height) + 0.5em);\n width: 100%;\n pointer-events: none;\n z-index: var(--ZI_navbar_popovers);\n display: flex;\n flex-direction: column;\n align-items: center;\n\n .global-notice {\n pointer-events: auto;\n text-align: center;\n width: 40em;\n max-width: calc(100% - 3em);\n display: flex;\n padding-left: 1.5em;\n line-height: 2;\n margin-bottom: 0.5em;\n\n .notice-message {\n flex: 1 1 100%;\n }\n }\n\n .global-error {\n background-color: var(--alertPopupError, $fallback--cRed);\n color: var(--alertPopupErrorText, $fallback--text);\n\n .svg-inline--fa {\n color: var(--alertPopupErrorText, $fallback--text);\n }\n }\n\n .global-warning {\n background-color: var(--alertPopupWarning, $fallback--cOrange);\n color: var(--alertPopupWarningText, $fallback--text);\n\n .svg-inline--fa {\n color: var(--alertPopupWarningText, $fallback--text);\n }\n }\n\n .global-success {\n background-color: var(--alertPopupSuccess, $fallback--cGreen);\n color: var(--alertPopupSuccessText, $fallback--text);\n .svg-inline--fa {\n color: var(--alertPopupSuccessText, $fallback--text);\n }\n }\n\n .global-info {\n background-color: var(--alertPopupNeutral, $fallback--fg);\n color: var(--alertPopupNeutralText, $fallback--text);\n .svg-inline--fa {\n color: var(--alertPopupNeutralText, $fallback--text);\n }\n }\n\n .close-notice {\n padding-right: 0.2em;\n .svg-inline--fa:hover {\n opacity: 0.6;\n }\n }\n}\n","// stylelint-disable rscss/class-format\n@import './_variables.scss';\n\n:root {\n --navbar-height: 3.5rem;\n --post-line-height: 1.4;\n // Z-Index stuff\n --ZI_media_modal: 9000;\n --ZI_modals_popovers: 8500;\n --ZI_modals: 8000;\n --ZI_navbar_popovers: 7500;\n --ZI_navbar: 7000;\n --ZI_popovers: 6000;\n}\n\nhtml {\n font-size: 14px;\n // overflow-x: clip causes my browser's tab to crash with SIGILL lul\n}\n\nbody {\n font-family: sans-serif;\n font-family: var(--interfaceFont, sans-serif);\n margin: 0;\n color: $fallback--text;\n color: var(--text, $fallback--text);\n -webkit-font-smoothing: antialiased;\n -moz-osx-font-smoothing: grayscale;\n overscroll-behavior-y: none;\n overflow-x: clip;\n overflow-y: scroll;\n\n &.hidden {\n display: none;\n }\n}\n\n// ## Custom scrollbars\n// Only show custom scrollbars on devices which\n// have a cursor/pointer to operate them\n@media (any-pointer: fine) {\n * {\n scrollbar-color: var(--btn) transparent;\n\n &::-webkit-scrollbar {\n background: transparent;\n }\n\n &::-webkit-scrollbar-button,\n &::-webkit-scrollbar-thumb {\n background-color: var(--btn);\n box-shadow: var(--buttonShadow);\n border-radius: var(--btnRadius);\n }\n\n // horizontal/vertical/increment/decrement are webkit-specific stuff\n // that indicates whether we're affecting vertical scrollbar, increase button etc\n // stylelint-disable selector-pseudo-class-no-unknown\n &::-webkit-scrollbar-button {\n --___bgPadding: 2px;\n\n color: var(--btnText);\n background-repeat: no-repeat, no-repeat;\n\n &:horizontal {\n background-size: 50% calc(50% - var(--___bgPadding)), 50% calc(50% - var(--___bgPadding));\n\n &:increment {\n background-image:\n linear-gradient(45deg, var(--btnText) 50%, transparent 51%),\n linear-gradient(-45deg, transparent 50%, var(--btnText) 51%);\n background-position: top var(--___bgPadding) left 50%, right 50% bottom var(--___bgPadding);\n }\n\n &:decrement {\n background-image:\n linear-gradient(45deg, transparent 50%, var(--btnText) 51%),\n linear-gradient(-45deg, var(--btnText) 50%, transparent 51%);\n background-position: bottom var(--___bgPadding) right 50%, left 50% top var(--___bgPadding);\n }\n }\n\n &:vertical {\n background-size: calc(50% - var(--___bgPadding)) 50%, calc(50% - var(--___bgPadding)) 50%;\n\n &:increment {\n background-image:\n linear-gradient(-45deg, transparent 50%, var(--btnText) 51%),\n linear-gradient(45deg, transparent 50%, var(--btnText) 51%);\n background-position: right var(--___bgPadding) top 50%, left var(--___bgPadding) top 50%;\n }\n\n &:decrement {\n background-image:\n linear-gradient(-45deg, var(--btnText) 50%, transparent 51%),\n linear-gradient(45deg, var(--btnText) 50%, transparent 51%);\n background-position: left var(--___bgPadding) top 50%, right var(--___bgPadding) top 50%;\n }\n }\n }\n // stylelint-enable selector-pseudo-class-no-unknown\n }\n // Body should have background to scrollbar otherwise it will use white (body color?)\n html {\n scrollbar-color: var(--selectedMenu) var(--wallpaper);\n background: var(--wallpaper);\n }\n}\n\na {\n text-decoration: none;\n color: $fallback--link;\n color: var(--link, $fallback--link);\n}\n\nh4 {\n margin: 0;\n}\n\n.iconLetter {\n display: inline-block;\n text-align: center;\n font-weight: 1000;\n}\n\ni[class*=icon-],\n.svg-inline--fa,\n.iconLetter {\n color: $fallback--icon;\n color: var(--icon, $fallback--icon);\n}\n\n.button-unstyled:hover,\na:hover {\n > i[class*=icon-],\n > .svg-inline--fa,\n > .iconLetter {\n color: var(--text);\n }\n}\n\nnav {\n z-index: var(--ZI_navbar);\n color: var(--topBarText);\n background-color: $fallback--fg;\n background-color: var(--topBar, $fallback--fg);\n color: $fallback--faint;\n color: var(--faint, $fallback--faint);\n box-shadow: 0 0 4px rgba(0, 0, 0, 0.6);\n box-shadow: var(--topBarShadow);\n box-sizing: border-box;\n height: var(--navbar-height);\n position: fixed;\n}\n\n#sidebar {\n grid-area: sidebar;\n}\n\n#modal {\n position: absolute;\n z-index: var(--ZI_modals);\n}\n\n.column.-scrollable {\n top: var(--navbar-height);\n position: sticky;\n}\n\n#main-scroller {\n grid-area: content;\n position: relative;\n}\n\n#notifs-column {\n grid-area: notifs;\n}\n\n.app-bg-wrapper {\n position: fixed;\n height: 100%;\n top: var(--navbar-height);\n z-index: -1000;\n left: 0;\n right: -20px;\n background-size: cover;\n background-repeat: no-repeat;\n background-color: var(--wallpaper);\n background-image: var(--body-background-image);\n background-position: 50%;\n}\n\n.underlay {\n grid-column-start: 1;\n grid-column-end: span 3;\n grid-row-start: 1;\n grid-row-end: 1;\n pointer-events: none;\n background-color: rgba(0, 0, 0, 0.15);\n background-color: var(--underlay, rgba(0, 0, 0, 0.15));\n z-index: -1000;\n}\n\n.app-layout {\n --miniColumn: 25rem;\n --maxiColumn: 45rem;\n --columnGap: 1em;\n --status-margin: 0.75em;\n --effectiveSidebarColumnWidth: minmax(var(--miniColumn), var(--sidebarColumnWidth, var(--miniColumn)));\n --effectiveNotifsColumnWidth: minmax(var(--miniColumn), var(--notifsColumnWidth, var(--miniColumn)));\n --effectiveContentColumnWidth: minmax(var(--miniColumn), var(--contentColumnWidth, var(--maxiColumn)));\n\n position: relative;\n display: grid;\n grid-template-columns:\n var(--effectiveSidebarColumnWidth)\n var(--effectiveContentColumnWidth);\n grid-template-areas: \"sidebar content\";\n grid-template-rows: 1fr;\n box-sizing: border-box;\n margin: 0 auto;\n align-content: flex-start;\n flex-wrap: wrap;\n justify-content: center;\n min-height: 100vh;\n overflow-x: clip;\n\n .column {\n --___columnMargin: var(--columnGap);\n\n display: grid;\n grid-template-columns: 100%;\n box-sizing: border-box;\n grid-row-start: 1;\n grid-row-end: 1;\n margin: 0 calc(var(--___columnMargin) / 2);\n padding: calc(var(--___columnMargin)) 0;\n row-gap: var(--___columnMargin);\n align-content: start;\n\n &:not(.-scrollable) {\n margin-top: var(--navbar-height);\n }\n\n &:hover {\n z-index: 2;\n }\n\n &.-full-height {\n margin-bottom: 0;\n padding-top: 0;\n padding-bottom: 0;\n }\n\n &.-scrollable {\n --___paddingIncrease: calc(var(--columnGap) / 2);\n\n position: sticky;\n top: var(--navbar-height);\n max-height: calc(100vh - var(--navbar-height));\n overflow-y: auto;\n overflow-x: hidden;\n margin-left: calc(var(--___paddingIncrease) * -1);\n padding-left: calc(var(--___paddingIncrease) + var(--___columnMargin) / 2);\n\n // On browsers that don't support hiding scrollbars we enforce \"show scrolbars\" mode\n // might implement old style of hiding scrollbars later if there's demand\n @supports (scrollbar-width: none) or (-webkit-text-fill-color: initial) {\n &:not(.-show-scrollbar) {\n scrollbar-width: none;\n margin-right: calc(var(--___paddingIncrease) * -1);\n padding-right: calc(var(--___paddingIncrease) + var(--___columnMargin) / 2);\n\n &::-webkit-scrollbar {\n display: block;\n width: 0;\n }\n }\n }\n\n .panel-heading.-sticky {\n top: calc(var(--columnGap) / -1);\n }\n }\n }\n\n &.-has-new-post-button {\n .column {\n padding-bottom: 10rem;\n }\n }\n\n &.-no-sticky-headers {\n .column {\n .panel-heading.-sticky {\n position: relative;\n top: 0;\n }\n }\n }\n\n .column-inner {\n display: grid;\n grid-template-columns: 100%;\n box-sizing: border-box;\n row-gap: 1em;\n align-content: start;\n }\n\n &.-reverse:not(.-wide):not(.-mobile) {\n grid-template-columns:\n var(--effectiveContentColumnWidth)\n var(--effectiveSidebarColumnWidth);\n grid-template-areas: \"content sidebar\";\n }\n\n &.-wide {\n grid-template-columns:\n var(--effectiveSidebarColumnWidth)\n var(--effectiveContentColumnWidth)\n var(--effectiveNotifsColumnWidth);\n grid-template-areas: \"sidebar content notifs\";\n\n &.-reverse {\n grid-template-columns:\n var(--effectiveNotifsColumnWidth)\n var(--effectiveContentColumnWidth)\n var(--effectiveSidebarColumnWidth);\n grid-template-areas: \"notifs content sidebar\";\n }\n }\n\n &.-mobile {\n grid-template-columns: 100vw;\n grid-template-areas: \"content\";\n padding: 0;\n\n .column {\n margin-left: 0;\n margin-right: 0;\n padding-top: 0;\n margin-top: var(--navbar-height);\n margin-bottom: 0;\n }\n\n .panel-heading,\n .panel-heading::after,\n .panel-heading::before,\n .panel,\n .panel::after {\n border-top-left-radius: 0;\n border-top-right-radius: 0;\n }\n\n #sidebar,\n #notifs-column {\n display: none;\n }\n }\n\n &.-normal {\n #notifs-column {\n display: none;\n }\n }\n}\n\n.text-center {\n text-align: center;\n}\n\n.button-default {\n user-select: none;\n color: $fallback--text;\n color: var(--btnText, $fallback--text);\n background-color: $fallback--fg;\n background-color: var(--btn, $fallback--fg);\n border: none;\n border-radius: $fallback--btnRadius;\n border-radius: var(--btnRadius, $fallback--btnRadius);\n cursor: pointer;\n box-shadow: $fallback--buttonShadow;\n box-shadow: var(--buttonShadow);\n font-size: 1em;\n font-family: sans-serif;\n font-family: var(--interfaceFont, sans-serif);\n\n &.-sublime {\n background: transparent;\n }\n\n i[class*=icon-],\n .svg-inline--fa {\n color: $fallback--text;\n color: var(--btnText, $fallback--text);\n }\n\n &::-moz-focus-inner {\n border: none;\n }\n\n &:hover {\n box-shadow: 0 0 4px rgba(255, 255, 255, 0.3);\n box-shadow: var(--buttonHoverShadow);\n }\n\n &:active {\n box-shadow: 0 0 4px 0 rgba(255, 255, 255, 0.3), 0 1px 0 0 rgba(0, 0, 0, 0.2) inset, 0 -1px 0 0 rgba(255, 255, 255, 0.2) inset;\n box-shadow: var(--buttonPressedShadow);\n color: $fallback--text;\n color: var(--btnPressedText, $fallback--text);\n background-color: $fallback--fg;\n background-color: var(--btnPressed, $fallback--fg);\n\n svg,\n i {\n color: $fallback--text;\n color: var(--btnPressedText, $fallback--text);\n }\n }\n\n &:disabled {\n cursor: not-allowed;\n color: $fallback--text;\n color: var(--btnDisabledText, $fallback--text);\n background-color: $fallback--fg;\n background-color: var(--btnDisabled, $fallback--fg);\n\n svg,\n i {\n color: $fallback--text;\n color: var(--btnDisabledText, $fallback--text);\n }\n }\n\n &.toggled {\n color: $fallback--text;\n color: var(--btnToggledText, $fallback--text);\n background-color: $fallback--fg;\n background-color: var(--btnToggled, $fallback--fg);\n box-shadow: 0 0 4px 0 rgba(255, 255, 255, 0.3), 0 1px 0 0 rgba(0, 0, 0, 0.2) inset, 0 -1px 0 0 rgba(255, 255, 255, 0.2) inset;\n box-shadow: var(--buttonPressedShadow);\n\n svg,\n i {\n color: $fallback--text;\n color: var(--btnToggledText, $fallback--text);\n }\n }\n\n &.danger {\n // TODO: add better color variable\n color: $fallback--text;\n color: var(--alertErrorPanelText, $fallback--text);\n background-color: $fallback--alertError;\n background-color: var(--alertError, $fallback--alertError);\n }\n}\n\n.button-unstyled {\n background: none;\n border: none;\n outline: none;\n display: inline;\n text-align: initial;\n font-size: 100%;\n font-family: inherit;\n padding: 0;\n line-height: unset;\n cursor: pointer;\n box-sizing: content-box;\n color: inherit;\n\n &.-link {\n color: $fallback--link;\n color: var(--link, $fallback--link);\n }\n\n &.-fullwidth {\n width: 100%;\n }\n\n &.-hover-highlight {\n &:hover svg {\n color: $fallback--lightText;\n color: var(--lightText, $fallback--lightText);\n }\n }\n}\n\ninput,\ntextarea,\n.input {\n &.unstyled {\n border-radius: 0;\n background: none;\n box-shadow: none;\n height: unset;\n }\n\n --_padding: 0.5em;\n\n border: none;\n border-radius: $fallback--inputRadius;\n border-radius: var(--inputRadius, $fallback--inputRadius);\n box-shadow: 0 1px 0 0 rgba(0, 0, 0, 0.2) inset, 0 -1px 0 0 rgba(255, 255, 255, 0.2) inset, 0 0 2px 0 rgba(0, 0, 0, 1) inset;\n box-shadow: var(--inputShadow);\n background-color: $fallback--fg;\n background-color: var(--input, $fallback--fg);\n color: $fallback--lightText;\n color: var(--inputText, $fallback--lightText);\n font-family: sans-serif;\n font-family: var(--inputFont, sans-serif);\n font-size: 1em;\n margin: 0;\n box-sizing: border-box;\n display: inline-block;\n position: relative;\n line-height: 2;\n hyphens: none;\n padding: 0 var(--_padding);\n\n &:disabled,\n &[disabled=disabled],\n &.disabled {\n cursor: not-allowed;\n opacity: 0.5;\n }\n\n &[type=range] {\n background: none;\n border: none;\n margin: 0;\n box-shadow: none;\n flex: 1;\n }\n\n &[type=radio] {\n display: none;\n\n &:checked + label::before {\n box-shadow: 0 0 2px black inset, 0 0 0 4px $fallback--fg inset;\n box-shadow: var(--inputShadow), 0 0 0 4px var(--fg, $fallback--fg) inset;\n background-color: var(--accent, $fallback--link);\n }\n\n &:disabled {\n &,\n & + label,\n & + label::before {\n opacity: 0.5;\n }\n }\n\n + label::before {\n flex-shrink: 0;\n display: inline-block;\n content: '';\n transition: box-shadow 200ms;\n width: 1.1em;\n height: 1.1em;\n border-radius: 100%; // Radio buttons should always be circle\n box-shadow: 0 0 2px black inset;\n box-shadow: var(--inputShadow);\n margin-right: 0.5em;\n background-color: $fallback--fg;\n background-color: var(--input, $fallback--fg);\n vertical-align: top;\n text-align: center;\n line-height: 1.1;\n font-size: 1.1em;\n box-sizing: border-box;\n color: transparent;\n overflow: hidden;\n }\n }\n\n &[type=checkbox] {\n display: none;\n\n &:checked + label::before {\n color: $fallback--text;\n color: var(--inputText, $fallback--text);\n }\n\n &:disabled {\n &,\n & + label,\n & + label::before {\n opacity: 0.5;\n }\n }\n\n + label::before {\n flex-shrink: 0;\n display: inline-block;\n content: '✓';\n transition: color 200ms;\n width: 1.1em;\n height: 1.1em;\n border-radius: $fallback--checkboxRadius;\n border-radius: var(--checkboxRadius, $fallback--checkboxRadius);\n box-shadow: 0 0 2px black inset;\n box-shadow: var(--inputShadow);\n margin-right: 0.5em;\n background-color: $fallback--fg;\n background-color: var(--input, $fallback--fg);\n vertical-align: top;\n text-align: center;\n line-height: 1.1;\n font-size: 1.1em;\n box-sizing: border-box;\n color: transparent;\n overflow: hidden;\n }\n }\n\n &.resize-height {\n resize: vertical;\n }\n}\n\n// Textareas should have stock line-height + vertical padding instead of huge line-height\ntextarea {\n padding: var(--_padding);\n line-height: var(--post-line-height);\n}\n\noption {\n color: $fallback--text;\n color: var(--text, $fallback--text);\n background-color: $fallback--bg;\n background-color: var(--bg, $fallback--bg);\n}\n\n.hide-number-spinner {\n -moz-appearance: textfield;\n\n &[type=number]::-webkit-inner-spin-button,\n &[type=number]::-webkit-outer-spin-button {\n opacity: 0;\n display: none;\n }\n}\n\n.btn-block {\n display: block;\n width: 100%;\n}\n\n.btn-group {\n position: relative;\n display: inline-flex;\n vertical-align: middle;\n\n button {\n position: relative;\n flex: 1 1 auto;\n\n &:not(:last-child) {\n border-top-right-radius: 0;\n border-bottom-right-radius: 0;\n }\n\n &:not(:first-child) {\n border-top-left-radius: 0;\n border-bottom-left-radius: 0;\n }\n }\n}\n\n@import './panel.scss';\n\n.fa {\n color: grey;\n}\n\n.mobile-shown {\n display: none;\n}\n\n.badge {\n box-sizing: border-box;\n display: inline-block;\n border-radius: 99px;\n max-width: 10em;\n min-width: 1.7em;\n height: 1.3em;\n padding: 0.15em 0.15em;\n vertical-align: middle;\n font-weight: normal;\n font-style: normal;\n font-size: 0.9em;\n line-height: 1;\n text-align: center;\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n\n &.badge-notification {\n background-color: $fallback--cRed;\n background-color: var(--badgeNotification, $fallback--cRed);\n color: white;\n color: var(--badgeNotificationText, white);\n }\n}\n\n.alert {\n margin: 0 0.35em;\n padding: 0 0.25em;\n border-radius: $fallback--tooltipRadius;\n border-radius: var(--tooltipRadius, $fallback--tooltipRadius);\n\n &.error {\n background-color: $fallback--alertError;\n background-color: var(--alertError, $fallback--alertError);\n color: $fallback--text;\n color: var(--alertErrorText, $fallback--text);\n\n .panel-heading & {\n color: $fallback--text;\n color: var(--alertErrorPanelText, $fallback--text);\n }\n }\n\n &.warning {\n background-color: $fallback--alertWarning;\n background-color: var(--alertWarning, $fallback--alertWarning);\n color: $fallback--text;\n color: var(--alertWarningText, $fallback--text);\n\n .panel-heading & {\n color: $fallback--text;\n color: var(--alertWarningPanelText, $fallback--text);\n }\n }\n\n &.success {\n background-color: var(--alertSuccess, $fallback--alertWarning);\n color: var(--alertSuccessText, $fallback--text);\n\n .panel-heading & {\n color: var(--alertSuccessPanelText, $fallback--text);\n }\n }\n}\n\n.faint {\n color: $fallback--faint;\n color: var(--faint, $fallback--faint);\n}\n\n.faint-link {\n color: $fallback--faint;\n color: var(--faint, $fallback--faint);\n\n &:hover {\n text-decoration: underline;\n }\n}\n\n.visibility-notice {\n padding: 0.5em;\n border: 1px solid $fallback--faint;\n border: 1px solid var(--faint, $fallback--faint);\n border-radius: $fallback--inputRadius;\n border-radius: var(--inputRadius, $fallback--inputRadius);\n}\n\n.notice-dismissible {\n padding-right: 4rem;\n position: relative;\n\n .dismiss {\n position: absolute;\n top: 0;\n right: 0;\n padding: 0.5em;\n color: inherit;\n }\n}\n\n.fa-scale-110 {\n &.svg-inline--fa,\n &.iconLetter {\n font-size: 1.1em;\n }\n}\n\n.fa-old-padding {\n &.iconLetter,\n &.svg-inline--fa, &-layer {\n padding: 0 0.3em;\n }\n}\n\n.veryfaint {\n opacity: 0.25;\n}\n\n.login-hint {\n text-align: center;\n\n @media all and (min-width: 801px) {\n display: none;\n }\n\n a {\n display: inline-block;\n padding: 1em 0;\n width: 100%;\n }\n}\n\n.btn.button-default {\n min-height: 2em;\n}\n\n.new-status-notification {\n position: relative;\n font-size: 1.1em;\n z-index: 1;\n flex: 1;\n}\n\n@media all and (max-width: 800px) {\n .mobile-hidden {\n display: none;\n }\n}\n\n@keyframes spin {\n 0% {\n transform: rotate(0deg);\n }\n\n 100% {\n transform: rotate(359deg);\n }\n}\n\n@keyframes shakeError {\n 0% {\n transform: translateX(0);\n }\n\n 15% {\n transform: translateX(0.375rem);\n }\n\n 30% {\n transform: translateX(-0.375rem);\n }\n\n 45% {\n transform: translateX(0.375rem);\n }\n\n 60% {\n transform: translateX(-0.375rem);\n }\n\n 75% {\n transform: translateX(0.375rem);\n }\n\n 90% {\n transform: translateX(-0.375rem);\n }\n\n 100% {\n transform: translateX(0);\n }\n}\n\n// Vue transitions\n.fade-enter-active,\n.fade-leave-active {\n transition: opacity 0.3s;\n}\n\n.fade-enter-from,\n.fade-leave-active {\n opacity: 0;\n}\n",".panel {\n position: relative;\n display: flex;\n flex-direction: column;\n background-color: $fallback--bg;\n background-color: var(--bg, $fallback--bg);\n\n &::after,\n & {\n border-radius: $fallback--panelRadius;\n border-radius: var(--panelRadius, $fallback--panelRadius);\n }\n\n &::after {\n content: '';\n position: absolute;\n top: 0;\n bottom: 0;\n left: 0;\n right: 0;\n z-index: 5;\n box-shadow: 1px 1px 4px rgba(0, 0, 0, 0.6);\n box-shadow: var(--panelShadow);\n pointer-events: none;\n }\n}\n\n.panel-body {\n padding: var(--panel-body-padding, 0);\n\n &:empty::before {\n content: \"¯\\\\_(ツ)_/¯\"; // Could use words but it'd require translations\n display: block;\n margin: 1em;\n text-align: center;\n }\n\n > p {\n line-height: 1.3;\n padding: 1em;\n margin: 0;\n }\n}\n\n.panel-heading,\n.panel-footer {\n --panel-heading-height-padding: 0.6em;\n --__panel-heading-gap: 0.5em;\n --__panel-heading-height: 3.2em;\n --__panel-heading-height-inner: calc(var(--__panel-heading-height) - 2 * var(--panel-heading-height-padding, 0));\n\n position: relative;\n box-sizing: border-box;\n display: grid;\n grid-auto-flow: column;\n grid-template-columns: minmax(50%, 1fr);\n grid-auto-columns: auto;\n grid-column-gap: var(--__panel-heading-gap);\n flex: none;\n background-size: cover;\n padding: var(--panel-heading-height-padding);\n height: var(--__panel-heading-height);\n line-height: var(--__panel-heading-height-inner);\n z-index: 4;\n\n &.-flexible-height {\n --__panel-heading-height: auto;\n\n &::after,\n &::before {\n display: none;\n }\n }\n\n &.-stub {\n &,\n &::after {\n border-radius: $fallback--panelRadius;\n border-radius: var(--panelRadius, $fallback--panelRadius);\n }\n }\n\n &.-sticky {\n position: sticky;\n top: var(--navbar-height);\n }\n\n &::after,\n &::before {\n content: '';\n position: absolute;\n top: 0;\n bottom: 0;\n right: 0;\n left: 0;\n pointer-events: none;\n }\n\n .title {\n font-size: 1.3em;\n }\n\n .alert {\n white-space: nowrap;\n text-overflow: ellipsis;\n overflow-x: hidden;\n }\n\n &:not(.-flexible-height) {\n > .button-default,\n > .alert {\n height: var(--__panel-heading-height-inner);\n min-height: 0;\n box-sizing: border-box;\n margin: 0;\n min-width: 1px;\n padding-top: 0;\n padding-bottom: 0;\n align-self: stretch;\n }\n }\n}\n\n// TODO Should refactor panels into separate component and utilize slots\n\n.panel-heading {\n border-radius: $fallback--panelRadius $fallback--panelRadius 0 0;\n border-radius: var(--panelRadius, $fallback--panelRadius) var(--panelRadius, $fallback--panelRadius) 0 0;\n border-width: 0 0 1px 0;\n align-items: start;\n // panel theme\n color: var(--panelText);\n background-color: $fallback--bg;\n background-color: var(--bg, $fallback--bg);\n\n &::after {\n background-color: $fallback--fg;\n background-color: var(--panel, $fallback--fg);\n z-index: -2;\n border-radius: $fallback--panelRadius $fallback--panelRadius 0 0;\n border-radius: var(--panelRadius, $fallback--panelRadius) var(--panelRadius, $fallback--panelRadius) 0 0;\n box-shadow: var(--panelHeaderShadow);\n }\n\n a,\n .-link {\n color: $fallback--link;\n color: var(--panelLink, $fallback--link);\n }\n\n .button-unstyled:hover,\n a:hover {\n i[class*=icon-],\n .svg-inline--fa,\n .iconLetter {\n color: var(--panelText);\n }\n }\n\n .faint {\n background-color: transparent;\n color: $fallback--faint;\n color: var(--panelFaint, $fallback--faint);\n }\n\n .faint-link {\n color: $fallback--faint;\n color: var(--faintLink, $fallback--faint);\n }\n\n &:not(.-flexible-height) {\n > .button-default {\n flex-shrink: 0;\n\n &,\n i[class*=icon-] {\n color: $fallback--text;\n color: var(--btnPanelText, $fallback--text);\n }\n\n &:active {\n background-color: $fallback--fg;\n background-color: var(--btnPressedPanel, $fallback--fg);\n color: $fallback--text;\n color: var(--btnPressedPanelText, $fallback--text);\n }\n\n &:disabled {\n color: $fallback--text;\n color: var(--btnDisabledPanelText, $fallback--text);\n }\n\n &.toggled {\n color: $fallback--text;\n color: var(--btnToggledPanelText, $fallback--text);\n }\n }\n }\n\n .rightside-button {\n align-self: stretch;\n text-align: center;\n width: var(--__panel-heading-height);\n height: var(--__panel-heading-height);\n margin: calc(-1 * var(--panel-heading-height-padding)) 0;\n margin-right: calc(-1 * var(--__panel-heading-gap));\n\n > button {\n box-sizing: border-box;\n padding: calc(1 * var(--panel-heading-height-padding)) 0;\n height: 100%;\n width: 100%;\n text-align: center;\n\n svg {\n font-size: 1.2em;\n }\n }\n }\n\n .rightside-icon {\n align-self: stretch;\n text-align: center;\n width: var(--__panel-heading-height);\n margin-right: calc(-1 * var(--__panel-heading-gap));\n\n svg {\n font-size: 1.2em;\n }\n }\n}\n\n.panel-footer {\n border-radius: 0 0 $fallback--panelRadius $fallback--panelRadius;\n border-radius: 0 0 var(--panelRadius, $fallback--panelRadius) var(--panelRadius, $fallback--panelRadius);\n align-items: center;\n border-width: 1px 0 0 0;\n border-style: solid;\n border-color: var(--border, $fallback--border);\n}\n","\n@import '../../_variables.scss';\n.thread-tree-replies {\n margin-left: var(--status-margin, $status-margin);\n border-left: 2px solid var(--border, $fallback--border);\n}\n\n.thread-tree-replies-hidden {\n padding: var(--status-margin, $status-margin);\n /* Make the button stretch along the whole row */\n display: flex;\n align-items: stretch;\n flex-direction: column;\n}\n","\n@import '../../_variables.scss';\n\n.Conversation {\n z-index: 1;\n\n .conversation-dive-to-top-level-box {\n padding: var(--status-margin, $status-margin);\n border-bottom-width: 1px;\n border-bottom-style: solid;\n border-bottom-color: var(--border, $fallback--border);\n border-radius: 0;\n /* Make the button stretch along the whole row */\n display: flex;\n align-items: stretch;\n flex-direction: column;\n }\n\n .thread-ancestors {\n margin-left: var(--status-margin, $status-margin);\n border-left: 2px solid var(--border, $fallback--border);\n }\n\n .thread-ancestor.-faded .StatusContent {\n --link: var(--faintLink);\n --text: var(--faint);\n color: var(--text);\n }\n\n .thread-ancestor-dive-box {\n padding-left: var(--status-margin, $status-margin);\n border-bottom-width: 1px;\n border-bottom-style: solid;\n border-bottom-color: var(--border, $fallback--border);\n border-radius: 0;\n /* Make the button stretch along the whole row */\n &, &-inner {\n display: flex;\n align-items: stretch;\n flex-direction: column;\n }\n }\n .thread-ancestor-dive-box-inner {\n padding: var(--status-margin, $status-margin);\n }\n\n .conversation-status {\n border-bottom-width: 1px;\n border-bottom-style: solid;\n border-bottom-color: var(--border, $fallback--border);\n border-radius: 0;\n }\n\n .thread-ancestor-has-other-replies .conversation-status,\n .thread-ancestor:last-child .conversation-status,\n .thread-ancestor:last-child .thread-ancestor-dive-box,\n &:last-child .conversation-status,\n &.-expanded .thread-tree .conversation-status {\n border-bottom: none;\n }\n\n .thread-ancestors + .thread-tree > .conversation-status {\n border-top-width: 1px;\n border-top-style: solid;\n border-top-color: var(--border, $fallback--border);\n }\n\n /* expanded conversation in timeline */\n &.status-fadein.-expanded .thread-body {\n border-left-width: 4px;\n border-left-style: solid;\n border-left-color: $fallback--cRed;\n border-left-color: var(--cRed, $fallback--cRed);\n border-radius: 0 0 $fallback--panelRadius $fallback--panelRadius;\n border-radius: 0 0 var(--panelRadius, $fallback--panelRadius) var(--panelRadius, $fallback--panelRadius);\n border-bottom: 1px solid var(--border, $fallback--border);\n }\n\n &.-expanded.status-fadein {\n margin: calc(var(--status-margin, $status-margin) / 2);\n }\n}\n","\n@import '../../_variables.scss';\n\n.TimelineMenu {\n margin-right: auto;\n min-width: 0;\n\n .popover-trigger-button {\n vertical-align: bottom;\n }\n\n .panel::after {\n border-top-right-radius: 0;\n border-top-left-radius: 0;\n }\n\n .timeline-menu-title {\n margin: 0;\n cursor: pointer;\n user-select: none;\n width: 100%;\n display: flex;\n\n .timeline-menu-name {\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n }\n\n svg {\n margin-left: 0.6em;\n transition: transform 100ms;\n }\n\n .click-blocker {\n cursor: default;\n flex-grow: 1;\n }\n }\n\n &.open .timeline-menu-title svg {\n color: $fallback--text;\n color: var(--panelText, $fallback--text);\n transform: rotate(180deg);\n }\n\n .panel {\n box-shadow: var(--popoverShadow);\n }\n\n}\n\n.timeline-menu-popover {\n min-width: 24rem;\n max-width: 100vw;\n margin-top: 0.6rem;\n font-size: 1rem;\n border-top-right-radius: 0;\n border-top-left-radius: 0;\n\n ul {\n list-style: none;\n margin: 0;\n padding: 0;\n }\n\n li {\n border-bottom: 1px solid;\n border-color: $fallback--border;\n border-color: var(--border, $fallback--border);\n padding: 0;\n\n &:last-child a {\n border-bottom-right-radius: $fallback--panelRadius;\n border-bottom-right-radius: var(--panelRadius, $fallback--panelRadius);\n border-bottom-left-radius: $fallback--panelRadius;\n border-bottom-left-radius: var(--panelRadius, $fallback--panelRadius);\n }\n\n &:last-child {\n border: none;\n }\n }\n\n a {\n display: block;\n padding: 0 0.65em;\n height: 3.5em;\n line-height: 3.5em;\n\n &:hover {\n background-color: $fallback--lightBg;\n background-color: var(--selectedMenu, $fallback--lightBg);\n color: $fallback--link;\n color: var(--selectedMenuText, $fallback--link);\n --faint: var(--selectedMenuFaintText, $fallback--faint);\n --faintLink: var(--selectedMenuFaintLink, $fallback--faint);\n --lightText: var(--selectedMenuLightText, $fallback--lightText);\n --icon: var(--selectedMenuIcon, $fallback--icon);\n }\n\n &.router-link-active {\n font-weight: bolder;\n background-color: $fallback--lightBg;\n background-color: var(--selectedMenu, $fallback--lightBg);\n color: $fallback--text;\n color: var(--selectedMenuText, $fallback--text); --faint: var(--selectedMenuFaintText, $fallback--faint);\n --faintLink: var(--selectedMenuFaintLink, $fallback--faint);\n --lightText: var(--selectedMenuLightText, $fallback--lightText);\n --icon: var(--selectedMenuIcon, $fallback--icon);\n\n &:hover {\n text-decoration: underline;\n }\n }\n\n svg {\n margin-right: 0.4em;\n margin-left: -0.2em;\n }\n }\n}\n\n","@import '../../_variables.scss';\n\n.Timeline {\n .alert-dot {\n border-radius: 100%;\n height: 8px;\n width: 8px;\n position: absolute;\n left: calc(50% - 4px);\n top: calc(50% - 4px);\n margin-left: 6px;\n margin-top: -6px;\n background-color: var(--badgeNeutral);\n }\n\n .alert-badge {\n font-size: 0.75em;\n line-height: 1;\n text-align: right;\n border-radius: var(--tooltipRadius);\n position: absolute;\n left: calc(50% - 0.5em);\n top: calc(50% - 0.4em);\n padding: 0.2em;\n margin-left: 0.7em;\n margin-top: -1em;\n background-color: var(--badgeNeutral);\n color: var(--badgeNeutralText);\n }\n\n .loadmore-button {\n position: relative;\n }\n\n &.-blocked {\n cursor: progress;\n }\n\n .conversation-heading {\n top: calc(var(--__panel-heading-height) * var(--currentPanelStack, 2));\n z-index: 2;\n }\n\n &.-nonpanel {\n .timeline-heading {\n text-align: center;\n line-height: 2.75em;\n padding: 0 0.5em;\n }\n\n .timeline-heading {\n .button-default, .alert {\n line-height: 2em;\n width: 100%;\n }\n }\n }\n}\n","@import '../../_variables.scss';\n\n.tab-switcher {\n display: flex;\n\n .tab-icon {\n margin: 0.2em auto;\n display: block;\n }\n\n &.top-tabs {\n flex-direction: column;\n\n > .tabs {\n width: 100%;\n overflow-y: hidden;\n overflow-x: auto;\n padding-top: 5px;\n flex-direction: row;\n flex: 0 0 auto;\n\n &::after, &::before {\n content: '';\n flex: 1 1 auto;\n border-bottom: 1px solid;\n border-bottom-color: $fallback--border;\n border-bottom-color: var(--border, $fallback--border);\n }\n\n .tab-wrapper {\n height: 2em;\n\n &:not(.active)::after {\n left: 0;\n right: 0;\n bottom: 0;\n border-bottom: 1px solid;\n border-bottom-color: $fallback--border;\n border-bottom-color: var(--border, $fallback--border);\n }\n }\n .tab {\n width: 100%;\n min-width: 1px;\n border-bottom-left-radius: 0;\n border-bottom-right-radius: 0;\n padding-bottom: 99px;\n margin-bottom: 6px - 99px;\n }\n }\n .contents.scrollable-tabs {\n flex-basis: 0;\n }\n }\n\n &.side-tabs {\n flex-direction: row;\n\n @media all and (max-width: 800px) {\n overflow-x: auto;\n }\n\n > .contents {\n flex: 1 1 auto;\n }\n\n > .tabs {\n flex: 0 0 auto;\n overflow-y: auto;\n overflow-x: hidden;\n flex-direction: column;\n\n &::after, &::before {\n flex-shrink: 0;\n flex-basis: .5em;\n content: '';\n border-right: 1px solid;\n border-right-color: $fallback--border;\n border-right-color: var(--border, $fallback--border);\n }\n\n &::after {\n flex-grow: 1;\n }\n\n &::before {\n flex-grow: 0;\n }\n\n .tab-wrapper {\n min-width: 10em;\n display: flex;\n flex-direction: column;\n\n @media all and (max-width: 800px) {\n min-width: 4em;\n }\n\n &:not(.active)::after {\n top: 0;\n right: 0;\n bottom: 0;\n border-right: 1px solid;\n border-right-color: $fallback--border;\n border-right-color: var(--border, $fallback--border);\n }\n\n &::before {\n flex: 0 0 6px;\n content: '';\n border-right: 1px solid;\n border-right-color: $fallback--border;\n border-right-color: var(--border, $fallback--border);\n }\n\n &:last-child .tab {\n margin-bottom: 0;\n }\n }\n\n .tab {\n flex: 1;\n box-sizing: content-box;\n min-width: 10em;\n min-width: 1px;\n border-top-right-radius: 0;\n border-bottom-right-radius: 0;\n padding-left: 1em;\n padding-right: calc(1em + 200px);\n margin-right: -200px;\n margin-left: 1em;\n\n @media all and (max-width: 800px) {\n padding-left: .25em;\n padding-right: calc(.25em + 200px);\n margin-right: calc(.25em - 200px);\n margin-left: .25em;\n .text {\n display: none\n }\n }\n }\n }\n }\n\n .contents {\n flex: 1 0 auto;\n min-height: 0px;\n\n .hidden {\n display: none;\n }\n .full-height:not(.hidden) {\n height: 100%;\n display: flex;\n flex-direction: column;\n > *:not(.mobile-label) {\n flex: 1;\n }\n }\n\n &.scrollable-tabs {\n overflow-y: auto;\n }\n }\n\n .tab {\n position: relative;\n white-space: nowrap;\n padding: 6px 1em;\n\n &:not(.active) {\n z-index: 4;\n\n &:hover {\n z-index: 6;\n }\n }\n\n &.active {\n background: transparent;\n z-index: 5;\n color: $fallback--text;\n color: var(--tabActiveText, $fallback--text);\n }\n\n img {\n max-height: 26px;\n vertical-align: top;\n margin-top: -5px;\n }\n }\n\n .tabs {\n display: flex;\n position: relative;\n box-sizing: border-box;\n\n &::after, &::before {\n display: block;\n flex: 1 1 auto;\n }\n }\n\n .tab-wrapper {\n position: relative;\n display: flex;\n flex: 0 0 auto;\n\n &:not(.active) {\n &::after {\n content: '';\n position: absolute;\n z-index: 7;\n }\n }\n }\n\n .mobile-label {\n padding-left: .3em;\n padding-bottom: .25em;\n margin-top: .5em;\n margin-left: .2em;\n margin-bottom: .25em;\n border-bottom: 1px solid var(--border, $fallback--border);\n\n @media all and (min-width: 800px) {\n display: none;\n }\n }\n}\n","\n@import '../../_variables.scss';\n\n.chat-title {\n display: flex;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n\n --emoji-size: 14px;\n\n .username {\n max-width: 100%;\n text-overflow: ellipsis;\n white-space: nowrap;\n display: inline;\n word-wrap: break-word;\n overflow: hidden;\n }\n\n .avatar-container {\n align-self: center;\n line-height: 1;\n }\n\n .titlebar-avatar {\n margin-right: 0.5em;\n height: 1.5em;\n width: 1.5em;\n border-radius: $fallback--avatarAltRadius;\n border-radius: var(--avatarAltRadius, $fallback--avatarAltRadius);\n\n &.animated::before {\n display: none;\n }\n }\n}\n",".chat-list-item {\n display: flex;\n flex-direction: row;\n padding: 0.75em;\n height: 5em;\n overflow: hidden;\n box-sizing: border-box;\n cursor: pointer;\n\n :focus {\n outline: none;\n }\n\n &:hover {\n background-color: var(--selectedPost, $fallback--lightBg);\n box-shadow: 0 0 3px 1px rgba(0, 0, 0, 0.1);\n }\n\n .chat-list-item-left {\n margin-right: 1em;\n }\n\n .chat-list-item-center {\n width: 100%;\n box-sizing: border-box;\n overflow: hidden;\n word-wrap: break-word;\n }\n\n .heading {\n width: 100%;\n display: inline-flex;\n justify-content: space-between;\n line-height: 1em;\n }\n\n .heading-right {\n white-space: nowrap;\n }\n\n .name-and-account-name {\n text-overflow: ellipsis;\n white-space: nowrap;\n overflow: hidden;\n flex-shrink: 1;\n line-height: var(--post-line-height);\n }\n\n .chat-preview {\n display: inline-flex;\n overflow: hidden;\n white-space: nowrap;\n text-overflow: ellipsis;\n margin: 0.35em 0;\n color: $fallback--text;\n color: var(--faint, $fallback--text);\n width: 100%;\n }\n\n a {\n color: var(--faintLink, $fallback--link);\n text-decoration: none;\n pointer-events: none;\n }\n\n &:hover .animated.avatar {\n canvas {\n display: none;\n }\n img {\n visibility: visible;\n }\n }\n\n .Avatar {\n border-radius: $fallback--avatarAltRadius;\n border-radius: var(--avatarAltRadius, $fallback--avatarAltRadius);\n }\n\n .chat-preview-body {\n --emoji-size: 1.4em;\n }\n\n .time-wrapper {\n line-height: var(--post-line-height);\n }\n\n .chat-preview-body {\n padding-right: 1em;\n }\n}\n","\n.basic-user-card {\n display: flex;\n flex: 1 0;\n margin: 0;\n padding: 0.6em 1em;\n\n --emoji-size: 14px;\n\n &-collapsed-content {\n margin-left: 0.7em;\n text-align: left;\n flex: 1;\n min-width: 0;\n }\n\n &-user-name {\n img {\n object-fit: contain;\n height: 16px;\n width: 16px;\n vertical-align: middle;\n }\n }\n\n &-user-name-value,\n &-screen-name {\n display: inline-block;\n max-width: 100%;\n overflow: hidden;\n white-space: nowrap;\n text-overflow: ellipsis;\n }\n\n &-expanded-content {\n flex: 1;\n margin-left: 0.7em;\n min-width: 0;\n }\n}\n",".chat-new {\n .input-wrap {\n display: flex;\n margin: 0.7em 0.5em 0.7em 0.5em;\n\n input {\n width: 100%;\n }\n }\n\n .search-icon {\n margin-right: 0.3em;\n }\n\n .member-list {\n padding-bottom: 0.7rem;\n }\n\n .basic-user-card:hover {\n cursor: pointer;\n background-color: var(--selectedPost, $fallback--lightBg);\n }\n\n .go-back-button {\n text-align: center;\n line-height: 1;\n height: 100%;\n align-self: start;\n width: var(--__panel-heading-height-inner);\n }\n}\n","\n@import '../../_variables.scss';\n\n.chat-list {\n min-height: 25em;\n margin-bottom: 0;\n}\n\n.emtpy-chat-list-alert {\n padding: 3em;\n font-size: 1.2em;\n display: flex;\n justify-content: center;\n color: $fallback--text;\n color: var(--faint, $fallback--text);\n}\n\n","@import '../../_variables.scss';\n\n.chat-message-wrapper {\n\n &.hovered-message-chain {\n .animated.Avatar {\n canvas {\n display: none;\n }\n img {\n visibility: visible;\n }\n }\n }\n\n .chat-message-menu {\n transition: opacity 0.1s;\n opacity: 0;\n position: absolute;\n top: -0.8em;\n\n button {\n padding-top: 0.2em;\n padding-bottom: 0.2em;\n }\n }\n\n .menu-icon {\n cursor: pointer;\n\n &:hover, .extra-button-popover.open & {\n color: $fallback--text;\n color: var(--text, $fallback--text);\n }\n }\n\n .popover {\n width: 12em;\n }\n\n .chat-message {\n display: flex;\n padding-bottom: 0.5em;\n\n .status-body:hover {\n --_still-image-img-visibility: visible;\n --_still-image-canvas-visibility: hidden;\n --_still-image-label-visibility: hidden;\n }\n }\n\n .avatar-wrapper {\n margin-right: 0.72em;\n width: 32px;\n }\n\n .link-preview, .attachments {\n margin-bottom: 1em;\n }\n\n .chat-message-inner {\n display: flex;\n flex-direction: column;\n align-items: flex-start;\n max-width: 80%;\n min-width: 10em;\n width: 100%;\n\n &.with-media {\n width: 100%;\n\n .status {\n width: 100%;\n }\n }\n }\n\n .status {\n border-radius: $fallback--chatMessageRadius;\n border-radius: var(--chatMessageRadius, $fallback--chatMessageRadius);\n display: flex;\n padding: 0.75em;\n }\n\n .created-at {\n position: relative;\n float: right;\n font-size: 0.8em;\n margin: -1em 0 -0.5em 0;\n font-style: italic;\n opacity: 0.8;\n }\n\n .without-attachment {\n .message-content {\n // TODO figure out how to do it properly\n .RichContent::after {\n margin-right: 5.4em;\n content: \" \";\n display: inline-block;\n }\n }\n }\n\n .pending {\n .status-content.media-body, .created-at {\n color: var(--faint);\n }\n }\n\n .error {\n .status-content.media-body, .created-at {\n color: $fallback--cRed;\n color: var(--badgeNotification, $fallback--cRed);\n }\n }\n\n .incoming {\n a {\n color: var(--chatMessageIncomingLink, $fallback--link);\n }\n\n .status {\n color: var(--chatMessageIncomingText, $fallback--text);\n background-color: var(--chatMessageIncomingBg, $fallback--bg);\n border: 1px solid var(--chatMessageIncomingBorder, --border);\n }\n\n .created-at {\n a {\n color: var(--chatMessageIncomingText, $fallback--text);\n }\n }\n\n .chat-message-menu {\n left: 0.4rem;\n }\n }\n\n .outgoing {\n display: flex;\n flex-direction: row;\n flex-wrap: wrap;\n align-content: end;\n justify-content: flex-end;\n\n a {\n color: var(--chatMessageOutgoingLink, $fallback--link);\n }\n\n .status {\n color: var(--chatMessageOutgoingText, $fallback--text);\n background-color: var(--chatMessageOutgoingBg, $fallback--lightBg);\n border: 1px solid var(--chatMessageOutgoingBorder, --lightBg);\n }\n\n .chat-message-inner {\n align-items: flex-end;\n }\n\n .chat-message-menu {\n right: 0.4rem;\n }\n }\n\n .visible {\n opacity: 1;\n }\n\n}\n\n.chat-message-date-separator {\n text-align: center;\n margin: 1.4em 0;\n font-size: 0.9em;\n user-select: none;\n color: $fallback--text;\n color: var(--faintedText, $fallback--text);\n}\n",".chat-view {\n display: flex;\n height: 100%;\n\n .chat-view-inner {\n height: auto;\n width: 100%;\n overflow: visible;\n display: flex;\n }\n\n .chat-view-body {\n box-sizing: border-box;\n background-color: var(--chatBg, $fallback--bg);\n display: flex;\n flex-direction: column;\n width: 100%;\n overflow: visible;\n min-height: calc(100vh - var(--navbar-height));\n margin: 0 0 0 0;\n border-radius: 10px 10px 0 0;\n border-radius: var(--panelRadius, 10px) var(--panelRadius, 10px) 0 0;\n\n &::after {\n border-radius: 0;\n }\n }\n\n .message-list {\n padding: 0 0.8em;\n height: 100%;\n display: flex;\n flex-direction: column;\n justify-content: end;\n }\n\n .footer {\n position: sticky;\n bottom: 0;\n background-color: $fallback--bg;\n background-color: var(--bg, $fallback--bg);\n z-index: 1;\n }\n\n .chat-view-heading {\n grid-template-columns: auto minmax(50%, 1fr);\n }\n\n .go-back-button {\n text-align: center;\n line-height: 1;\n height: 100%;\n align-self: start;\n width: var(--__panel-heading-height-inner);\n }\n\n .jump-to-bottom-button {\n width: 2.5em;\n height: 2.5em;\n border-radius: 100%;\n position: absolute;\n right: 1.3em;\n top: -3.2em;\n background-color: $fallback--fg;\n background-color: var(--btn, $fallback--fg);\n display: flex;\n justify-content: center;\n align-items: center;\n box-shadow: 0 1px 1px rgba(0, 0, 0, 0.3), 0 2px 4px rgba(0, 0, 0, 0.3);\n z-index: 10;\n transition: 0.35s all;\n transition-timing-function: cubic-bezier(0, 1, 0.5, 1);\n opacity: 0;\n visibility: hidden;\n cursor: pointer;\n\n &.visible {\n opacity: 1;\n visibility: visible;\n }\n\n i {\n font-size: 1em;\n color: $fallback--text;\n color: var(--text, $fallback--text);\n }\n\n .unread-message-count {\n font-size: 0.8em;\n left: 50%;\n margin-top: -1rem;\n padding: 0.1em;\n border-radius: 50px;\n position: absolute;\n }\n\n .chat-loading-error {\n width: 100%;\n display: flex;\n align-items: flex-end;\n height: 100%;\n\n .error {\n width: 100%;\n }\n }\n }\n}\n","\n.follow-card {\n &-content-container {\n flex-shrink: 0;\n display: flex;\n flex-direction: row;\n justify-content: space-between;\n flex-wrap: wrap;\n line-height: 1.5em;\n }\n\n &-button {\n margin-top: 0.5em;\n padding: 0 1.5em;\n margin-left: 1em;\n }\n\n &-follow-button {\n margin-top: 0.5em;\n margin-left: auto;\n width: 10em;\n }\n}\n","\n@import '../../_variables.scss';\n\n.with-load-more {\n &-footer {\n padding: 10px;\n text-align: center;\n border-top: 1px solid;\n border-top-color: $fallback--border;\n border-top-color: var(--border, $fallback--border);\n\n .error {\n font-size: 1rem;\n }\n\n a {\n cursor: pointer;\n }\n }\n}\n","\n@import '../../_variables.scss';\n\n.user-profile {\n flex: 2;\n flex-basis: 500px;\n\n // No sticky header on user profile\n --currentPanelStack: 1;\n\n .user-profile-fields {\n margin: 0 0.5em;\n\n img {\n object-fit: contain;\n vertical-align: middle;\n max-width: 100%;\n max-height: 400px;\n\n &.emoji {\n width: 18px;\n height: 18px;\n }\n }\n\n .user-profile-field {\n display: flex;\n margin: 0.25em;\n border: 1px solid var(--border, $fallback--border);\n border-radius: $fallback--inputRadius;\n border-radius: var(--inputRadius, $fallback--inputRadius);\n\n .user-profile-field-name {\n flex: 0 1 30%;\n font-weight: 500;\n text-align: right;\n color: var(--lightText);\n min-width: 120px;\n border-right: 1px solid var(--border, $fallback--border);\n }\n\n .user-profile-field-value {\n flex: 1 1 70%;\n color: var(--text);\n margin: 0 0 0 0.25em;\n }\n\n .user-profile-field-name, .user-profile-field-value {\n line-height: 1.3;\n text-overflow: ellipsis;\n white-space: nowrap;\n overflow: hidden;\n padding: 0.5em 1.5em;\n box-sizing: border-box;\n }\n }\n }\n\n .userlist-placeholder {\n display: flex;\n justify-content: center;\n align-items: middle;\n padding: 2em;\n }\n}\n.user-profile-placeholder {\n .panel-body {\n display: flex;\n justify-content: center;\n align-items: middle;\n padding: 7em;\n }\n}\n","\n@import '../../_variables.scss';\n\n.search-result-heading {\n color: $fallback--faint;\n color: var(--faint, $fallback--faint);\n padding: 0.75rem;\n text-align: center;\n}\n\n@media all and (max-width: 800px) {\n .search-nav-heading {\n .tab-switcher .tabs .tab-wrapper {\n display: block;\n justify-content: center;\n flex: 1 1 auto;\n text-align: center;\n }\n }\n}\n\n.search-result {\n box-sizing: border-box;\n border-bottom: 1px solid;\n border-color: $fallback--border;\n border-color: var(--border, $fallback--border);\n}\n\n.search-result-footer {\n border-width: 1px 0 0 0;\n border-style: solid;\n border-color: var(--border, $fallback--border);\n padding: 10px;\n background-color: $fallback--fg;\n background-color: var(--panel, $fallback--fg);\n}\n\n.search-input-container {\n padding: 0.8rem;\n display: flex;\n justify-content: center;\n\n .search-input {\n width: 100%;\n line-height: 1.125rem;\n font-size: 1rem;\n padding: 0.5rem;\n box-sizing: border-box;\n }\n\n .search-button {\n margin-left: 0.5em;\n }\n}\n\n.loading-icon {\n padding: 1em;\n}\n\n.trend {\n display: flex;\n align-items: center;\n\n .hashtag {\n flex: 1 1 auto;\n color: $fallback--text;\n color: var(--text, $fallback--text);\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n }\n\n .count {\n flex: 0 0 auto;\n width: 2rem;\n font-size: 1.5rem;\n line-height: 2.25rem;\n font-weight: 500;\n text-align: center;\n color: $fallback--text;\n color: var(--text, $fallback--text);\n }\n }\n\n .more-statuses-button {\n height: 3.5em;\n line-height: 3.5em;\n }\n\n","\n@import '../../_variables.scss';\n$validations-cRed: #f04124;\n\n.registration-form {\n display: flex;\n flex-direction: column;\n margin: 0.6em;\n\n .container {\n display: flex;\n flex-direction: row;\n\n > * {\n min-width: 0;\n }\n }\n\n .terms-of-service {\n flex: 0 1 50%;\n margin: 0.8em;\n }\n\n .text-fields {\n margin-top: 0.6em;\n flex: 1 0;\n display: flex;\n flex-direction: column;\n }\n\n textarea {\n min-height: 100px;\n resize: vertical;\n }\n\n .form-group {\n display: flex;\n flex-direction: column;\n padding: 0.3em 0;\n line-height: 2;\n margin-bottom: 1em;\n }\n\n .form-group--error {\n animation-name: shakeError;\n animation-duration: .6s;\n animation-timing-function: ease-in-out;\n }\n\n .form-group--error .form--label {\n color: $validations-cRed;\n color: var(--cRed, $validations-cRed);\n }\n\n .form-error {\n margin-top: -0.7em;\n text-align: left;\n\n span {\n font-size: 0.85em;\n }\n }\n\n .form-error ul {\n list-style: none;\n padding: 0 0 0 5px;\n margin-top: 0;\n\n li::before {\n content: \"• \";\n }\n }\n\n form textarea {\n line-height:16px;\n resize: vertical;\n }\n\n .captcha {\n max-width: 350px;\n margin-bottom: 0.4em;\n }\n\n .btn {\n margin-top: 0.6em;\n height: 2em;\n }\n\n .error {\n text-align: center;\n }\n}\n\n@media all and (max-width: 800px) {\n .registration-form .container {\n flex-direction: column-reverse;\n }\n}\n","\n@import '../../_variables.scss';\n\n.password-reset-form {\n display: flex;\n flex-direction: column;\n align-items: center;\n margin: 0.6em;\n\n .container {\n display: flex;\n flex: 1 0;\n flex-direction: column;\n margin-top: 0.6em;\n max-width: 18rem;\n\n > * {\n min-width: 0;\n }\n }\n\n .form-group {\n display: flex;\n flex-direction: column;\n margin-bottom: 1em;\n padding: 0.3em 0;\n line-height: 1.85em;\n }\n\n .error {\n text-align: center;\n animation-name: shakeError;\n animation-duration: 0.4s;\n animation-timing-function: ease-in-out;\n }\n\n .alert {\n padding: 0.5em;\n margin: 0.3em 0 1em;\n }\n\n .password-reset-required {\n background-color: var(--alertError, $fallback--alertError);\n padding: 10px 0;\n }\n\n .notice-dismissible {\n padding-right: 2rem;\n }\n\n .dismiss {\n cursor: pointer;\n }\n}\n\n","\n.follow-request-card-content-container {\n display: flex;\n flex-direction: row;\n flex-wrap: wrap;\n button {\n margin-top: 0.5em;\n margin-right: 0.5em;\n flex: 1 1;\n max-width: 12em;\n min-width: 8em;\n\n &:last-child {\n margin-right: 0;\n }\n }\n}\n","\n.tos-content {\n margin: 1em\n}\n","\n\n.staff-group {\n padding-left: 1em;\n padding-top: 1em;\n\n .basic-user-card {\n padding-left: 0;\n }\n}\n\n",".mrf-section {\n margin: 1em;\n\n table {\n width:100%;\n text-align: left;\n padding-left:10px;\n padding-bottom:20px;\n\n th, td {\n width: 180px;\n max-width: 360px;\n overflow: hidden;\n vertical-align: text-top;\n }\n\n th+th, td+td {\n width: auto;\n }\n }\n}\n","\n@import '../../_variables.scss';\n\n.list-card {\n display: flex;\n}\n\n.list-name,\n.button-list-edit {\n margin: 0;\n padding: 1em;\n color: $fallback--link;\n color: var(--link, $fallback--link);\n\n &:hover {\n background-color: $fallback--lightBg;\n background-color: var(--selectedMenu, $fallback--lightBg);\n color: $fallback--link;\n color: var(--selectedMenuText, $fallback--link);\n --faint: var(--selectedMenuFaintText, $fallback--faint);\n --faintLink: var(--selectedMenuFaintLink, $fallback--faint);\n --lightText: var(--selectedMenuLightText, $fallback--lightText);\n }\n}\n\n.list-name {\n flex-grow: 1;\n}\n","\n.Lists {\n .new-list-button {\n padding: 0 0.5em;\n }\n}\n","\n@import '../../_variables.scss';\n\n.ListsUserSearch {\n .input-wrap {\n display: flex;\n margin: 0.7em 0.5em 0.7em 0.5em;\n\n input {\n width: 100%;\n }\n }\n\n .search-icon {\n margin-right: 0.3em;\n }\n}\n\n","\n@import 'src/_variables.scss';\n\n.panel-loading {\n display: flex;\n height: 100%;\n align-items: center;\n justify-content: center;\n font-size: 2em;\n color: $fallback--text;\n color: var(--text, $fallback--text);\n .loading-text svg {\n line-height: 0;\n vertical-align: middle;\n color: $fallback--text;\n color: var(--text, $fallback--text);\n }\n}\n","\n@import '../../_variables.scss';\n\n.ListEdit {\n --panel-body-padding: 0.5em;\n\n height: calc(100vh - var(--navbar-height));\n overflow: hidden;\n display: flex;\n flex-direction: column;\n\n .list-edit-heading {\n grid-template-columns: auto minmax(50%, 1fr);\n }\n\n .panel-body {\n display: flex;\n flex: 1;\n flex-direction: column;\n overflow: hidden;\n }\n\n .list-member-management {\n flex: 1 0 auto;\n }\n\n .search-icon {\n margin-right: 0.3em;\n }\n\n .users-list {\n padding-bottom: 0.7rem;\n overflow-y: auto;\n }\n\n & .search-list,\n & .members-list {\n overflow: hidden;\n flex-direction: column;\n min-height: 0;\n }\n\n .go-back-button {\n text-align: center;\n line-height: 1;\n height: 100%;\n align-self: start;\n width: var(--__panel-heading-height-inner);\n }\n\n .btn {\n margin: 0 0.5em;\n }\n\n .panel-footer {\n grid-template-columns: minmax(10%, 1fr);\n\n .footer-button {\n min-width: 9em;\n }\n }\n}\n","\n.announcement-editor {\n display: flex;\n align-items: stretch;\n flex-direction: column;\n\n .announcement-metadata {\n margin-top: 0.5em;\n }\n\n .post-textarea {\n resize: vertical;\n height: 10em;\n overflow: none;\n box-sizing: content-box;\n }\n}\n","\n@import \"../../variables\";\n\n.announcement {\n border-bottom-width: 1px;\n border-bottom-style: solid;\n border-bottom-color: var(--border, $fallback--border);\n border-radius: 0;\n padding: var(--status-margin, $status-margin);\n\n .heading, .body {\n margin-bottom: var(--status-margin, $status-margin);\n }\n\n .footer {\n display: flex;\n flex-direction: column;\n .times {\n display: flex;\n flex-direction: column;\n }\n }\n\n .footer .actions {\n display: flex;\n flex-direction: row;\n justify-content: space-evenly;\n\n .btn {\n flex: 1;\n margin: 1em;\n max-width: 10em;\n }\n }\n}\n","\n@import \"../../variables\";\n\n.announcements-page {\n .post-form {\n padding: var(--status-margin, $status-margin);\n\n .heading, .body {\n margin-bottom: var(--status-margin, $status-margin);\n }\n\n .post-button {\n min-width: 10em;\n }\n }\n}\n"],"names":[],"sourceRoot":""}
\ No newline at end of file
diff --git a/priv/static/static/css/app.a7f63ee9107a77599942.css b/priv/static/static/css/app.a7f63ee9107a77599942.css
new file mode 100644
index 0000000000..a4f192bc83
Binary files /dev/null and b/priv/static/static/css/app.a7f63ee9107a77599942.css differ
diff --git a/priv/static/static/css/app.a7f63ee9107a77599942.css.map b/priv/static/static/css/app.a7f63ee9107a77599942.css.map
new file mode 100644
index 0000000000..e59e4205a4
--- /dev/null
+++ b/priv/static/static/css/app.a7f63ee9107a77599942.css.map
@@ -0,0 +1 @@
+{"version":3,"file":"static/css/app.a7f63ee9107a77599942.css","mappings":"AACA,YASE,mBAGA,uBACA,uCAPA,SACA,aACA,uBAJA,OAUA,SAAQ,CAJR,cACA,oBATA,eAGA,QAFA,MAFA,wBAaA,CAEA,cACE,oBAGF,6BAEE,gCADA,mBACA,CAGF,iBACE,UAIJ,mCACE,GACE,6BAGF,GACE,iCCrCJ,sBAAsB,iBAAiB,CAAC,yDAAyD,eAAe,CAAC,2DAA2D,eAAe,CAAC,2CAA2C,mBAAW,CAAX,mBAAW,CAAX,YAAY,CAAC,4BAA4B,kBAAY,CAAZ,mBAAY,CAAZ,aAAa,CAAC,oCAAoC,kBAAM,CAAC,6BAAqB,CAArB,qBAAqB,CAA5B,UAAM,CAAN,MAAM,CAAuB,eAAe,CAAC,iBAAiB,CAAC,6DAAqF,MAAM,CAA9B,iBAAiB,CAAC,KAAK,CAAQ,qBAAqB,CAAC,6EAA6E,UAAU,CAAC,+EAA+E,WAAW,CAAC,gFAAgF,UAAU,CAAC,kFAAkF,WAAW,CAAC,kCAA+G,4BAA4B,CAAxC,WAAW,CAAgF,SAAS,CAAC,2EAAxC,aAAa,CAAtF,WAAW,CAAxC,MAAM,CAA8G,eAAe,CAAjD,mBAAmB,CAA7H,iBAAiB,CAAC,KAAK,CAAmB,UAAU,CAArB,UAAkS,CCGlsC,YACE,aACA,sBACA,aAEA,iBACE,eACA,WAGF,sBACE,SAGF,0BAIE,mB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,0BAHA,cACA,qBAEA,CCbJ,UACE,0BAA2B,CAI3B,aACA,sBAHA,0CACA,eAEA,CAEA,6BACE,2CAGF,sBACE,aACA,OACA,sBACA,gBAGF,kCACE,cAGF,uBACE,kBAGF,sBAEE,gBADA,oBACA,CAGF,+CAGE,sBACA,YAAW,CAFX,eAEA,CAGF,0BAIE,iBADA,YADA,cADA,kBAIA,0CAGF,eACE,cAGF,wBACE,sCAEA,uCACE,cCzDN,qBAEE,oBADA,aAEA,sBAEA,4CACE,gBAGF,oCAIE,uBAFA,YACA,cAFA,eAGA,CCXJ,cACE,2CACA,gBACA,mCAEA,2CAEE,yCAOA,mDACE,aACA,sBAIJ,+BACE,aACA,mBACA,6BAEA,oCACE,OACA,WACA,eC3BJ,+BACE,mCAEA,6EAEE,yCAGF,4CACE","sources":["webpack://pleroma_fe/./src/components/modal/modal.vue","webpack://pleroma_fe/./node_modules/vue-virtual-scroller/dist/vue-virtual-scroller.css","webpack://pleroma_fe/./src/components/login_form/login_form.vue","webpack://pleroma_fe/./src/components/media_upload/media_upload.vue","webpack://pleroma_fe/./src/components/scope_selector/scope_selector.vue","webpack://pleroma_fe/./src/_variables.scss","webpack://pleroma_fe/./src/components/checkbox/checkbox.vue","webpack://pleroma_fe/./src/components/popover/popover.vue","webpack://pleroma_fe/./src/components/still-image/still-image.vue","webpack://pleroma_fe/./src/components/emoji_picker/emoji_picker.scss","webpack://pleroma_fe/./src/components/emoji_input/emoji_input.vue","webpack://pleroma_fe/./src/components/select/select.vue","webpack://pleroma_fe/./src/components/poll/poll_form.vue","webpack://pleroma_fe/./src/components/flash/flash.vue","webpack://pleroma_fe/./src/components/attachment/attachment.scss","webpack://pleroma_fe/./src/components/gallery/gallery.vue","webpack://pleroma_fe/./src/components/user_avatar/user_avatar.vue","webpack://pleroma_fe/./src/components/mention_link/mention_link.scss","webpack://pleroma_fe/./src/components/mentions_line/mentions_line.scss","webpack://pleroma_fe/./src/components/hashtag_link/hashtag_link.scss","webpack://pleroma_fe/./src/components/rich_content/rich_content.scss","webpack://pleroma_fe/./src/components/poll/poll.vue","webpack://pleroma_fe/./src/components/status_body/status_body.scss","webpack://pleroma_fe/./src/components/link-preview/link-preview.vue","webpack://pleroma_fe/./src/components/status_content/status_content.vue","webpack://pleroma_fe/./src/components/post_status_form/post_status_form.vue","webpack://pleroma_fe/./src/components/remote_follow/remote_follow.vue","webpack://pleroma_fe/./src/components/dialog_modal/dialog_modal.vue","webpack://pleroma_fe/./src/components/moderation_tools/moderation_tools.vue","webpack://pleroma_fe/./src/components/account_actions/account_actions.vue","webpack://pleroma_fe/./src/components/user_note/user_note.vue","webpack://pleroma_fe/./src/components/user_card/user_card.scss","webpack://pleroma_fe/./src/components/user_panel/user_panel.vue","webpack://pleroma_fe/./src/components/navigation/navigation_entry.vue","webpack://pleroma_fe/./src/components/navigation/navigation_pins.vue","webpack://pleroma_fe/./src/components/nav_panel/nav_panel.vue","webpack://pleroma_fe/./src/components/features_panel/features_panel.vue","webpack://pleroma_fe/./src/components/who_to_follow_panel/who_to_follow_panel.vue","webpack://pleroma_fe/./src/components/shout_panel/shout_panel.vue","webpack://pleroma_fe/./src/components/media_modal/media_modal.vue","webpack://pleroma_fe/./src/components/side_drawer/side_drawer.vue","webpack://pleroma_fe/./src/components/mobile_post_status_button/mobile_post_status_button.vue","webpack://pleroma_fe/./src/components/reply_button/reply_button.vue","webpack://pleroma_fe/./src/components/favorite_button/favorite_button.vue","webpack://pleroma_fe/./src/components/react_button/react_button.vue","webpack://pleroma_fe/./src/components/retweet_button/retweet_button.vue","webpack://pleroma_fe/./src/components/extra_buttons/extra_buttons.vue","webpack://pleroma_fe/./src/components/avatar_list/avatar_list.vue","webpack://pleroma_fe/./src/components/status_popover/status_popover.vue","webpack://pleroma_fe/./src/components/user_list_popover/user_list_popover.vue","webpack://pleroma_fe/./src/components/emoji_reactions/emoji_reactions.vue","webpack://pleroma_fe/./src/components/status/status.scss","webpack://pleroma_fe/./src/components/report/report.scss","webpack://pleroma_fe/./src/components/notification/notification.scss","webpack://pleroma_fe/./src/components/notifications/notifications.scss","webpack://pleroma_fe/./src/components/mobile_nav/mobile_nav.vue","webpack://pleroma_fe/./src/components/search_bar/search_bar.vue","webpack://pleroma_fe/./src/components/desktop_nav/desktop_nav.scss","webpack://pleroma_fe/./src/components/list/list.vue","webpack://pleroma_fe/./src/components/user_reporting_modal/user_reporting_modal.vue","webpack://pleroma_fe/./src/components/edit_status_modal/edit_status_modal.vue","webpack://pleroma_fe/./src/components/post_status_modal/post_status_modal.vue","webpack://pleroma_fe/./src/components/status_history_modal/status_history_modal.vue","webpack://pleroma_fe/./src/components/global_notice_list/global_notice_list.vue","webpack://pleroma_fe/./src/App.scss","webpack://pleroma_fe/./src/panel.scss","webpack://pleroma_fe/./src/components/thread_tree/thread_tree.vue","webpack://pleroma_fe/./src/components/conversation/conversation.vue","webpack://pleroma_fe/./src/components/timeline_menu/timeline_menu.vue","webpack://pleroma_fe/./src/components/timeline/timeline.scss","webpack://pleroma_fe/./src/components/tab_switcher/tab_switcher.scss","webpack://pleroma_fe/./src/components/chat_title/chat_title.vue","webpack://pleroma_fe/./src/components/chat_list_item/chat_list_item.scss","webpack://pleroma_fe/./src/components/basic_user_card/basic_user_card.vue","webpack://pleroma_fe/./src/components/chat_new/chat_new.scss","webpack://pleroma_fe/./src/components/chat_list/chat_list.vue","webpack://pleroma_fe/./src/components/chat_message/chat_message.scss","webpack://pleroma_fe/./src/components/chat/chat.scss","webpack://pleroma_fe/./src/components/follow_card/follow_card.vue","webpack://pleroma_fe/./src/hocs/with_load_more/with_load_more.scss","webpack://pleroma_fe/./src/components/user_profile/user_profile.vue","webpack://pleroma_fe/./src/components/search/search.vue","webpack://pleroma_fe/./src/components/interface_language_switcher/interface_language_switcher.vue","webpack://pleroma_fe/./src/components/registration/registration.vue","webpack://pleroma_fe/./src/components/password_reset/password_reset.vue","webpack://pleroma_fe/./src/components/follow_request_card/follow_request_card.vue","webpack://pleroma_fe/./src/components/terms_of_service_panel/terms_of_service_panel.vue","webpack://pleroma_fe/./src/components/staff_panel/staff_panel.vue","webpack://pleroma_fe/./src/components/mrf_transparency_panel/mrf_transparency_panel.scss","webpack://pleroma_fe/./src/components/lists_card/lists_card.vue","webpack://pleroma_fe/./src/components/lists/lists.vue","webpack://pleroma_fe/./src/components/lists_user_search/lists_user_search.vue","webpack://pleroma_fe/./src/components/panel_loading/panel_loading.vue","webpack://pleroma_fe/./src/components/lists_edit/lists_edit.vue","webpack://pleroma_fe/./src/components/announcement_editor/announcement_editor.vue","webpack://pleroma_fe/./src/components/announcement/announcement.vue","webpack://pleroma_fe/./src/components/announcements_page/announcements_page.vue"],"sourcesContent":["\n.modal-view {\n z-index: var(--ZI_modals);\n position: fixed;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n display: flex;\n justify-content: center;\n align-items: center;\n overflow: auto;\n pointer-events: none;\n animation-duration: 0.2s;\n animation-name: modal-background-fadein;\n opacity: 0;\n\n > * {\n pointer-events: initial;\n }\n\n &.modal-background {\n pointer-events: initial;\n background-color: rgb(0 0 0 / 50%);\n }\n\n &.open {\n opacity: 1;\n }\n}\n\n@keyframes modal-background-fadein {\n from {\n background-color: rgb(0 0 0 / 0%);\n }\n\n to {\n background-color: rgb(0 0 0 / 50%);\n }\n}\n",".vue-recycle-scroller{position:relative}.vue-recycle-scroller.direction-vertical:not(.page-mode){overflow-y:auto}.vue-recycle-scroller.direction-horizontal:not(.page-mode){overflow-x:auto}.vue-recycle-scroller.direction-horizontal{display:flex}.vue-recycle-scroller__slot{flex:auto 0 0}.vue-recycle-scroller__item-wrapper{flex:1;box-sizing:border-box;overflow:hidden;position:relative}.vue-recycle-scroller.ready .vue-recycle-scroller__item-view{position:absolute;top:0;left:0;will-change:transform}.vue-recycle-scroller.direction-vertical .vue-recycle-scroller__item-wrapper{width:100%}.vue-recycle-scroller.direction-horizontal .vue-recycle-scroller__item-wrapper{height:100%}.vue-recycle-scroller.ready.direction-vertical .vue-recycle-scroller__item-view{width:100%}.vue-recycle-scroller.ready.direction-horizontal .vue-recycle-scroller__item-view{height:100%}.resize-observer[data-v-b329ee4c]{position:absolute;top:0;left:0;z-index:-1;width:100%;height:100%;border:none;background-color:transparent;pointer-events:none;display:block;overflow:hidden;opacity:0}.resize-observer[data-v-b329ee4c] object{display:block;position:absolute;top:0;left:0;height:100%;width:100%;overflow:hidden;pointer-events:none;z-index:-1}","\n@import \"../../variables\";\n\n.login-form {\n display: flex;\n flex-direction: column;\n padding: 0.6em;\n\n .btn {\n min-height: 2em;\n width: 10em;\n }\n\n .register {\n flex: 1 1;\n }\n\n .login-bottom {\n margin-top: 1em;\n display: flex;\n flex-direction: row;\n align-items: center;\n justify-content: space-between;\n }\n\n .form-group {\n display: flex;\n flex-direction: column;\n padding: 0.3em 0.5em 0.6em;\n line-height: 24px;\n }\n\n .form-bottom {\n display: flex;\n padding: 0.5em;\n height: 32px;\n\n button {\n width: 10em;\n }\n\n p {\n margin: 0.35em;\n padding: 0.35em;\n display: flex;\n }\n }\n\n .error {\n text-align: center;\n animation-name: shakeError;\n animation-duration: 0.4s;\n animation-timing-function: ease-in-out;\n }\n}\n","\n@import \"../../variables\";\n\n.media-upload {\n .hidden-input-file {\n display: none;\n }\n}\n\nlabel.media-upload {\n cursor: pointer; // We use for interactivity... i wonder if it's fine\n}\n","\n@import \"../../variables\";\n\n.ScopeSelector {\n .scope {\n display: inline-block;\n cursor: pointer;\n min-width: 1.3em;\n min-height: 1.3em;\n text-align: center;\n\n &.selected svg {\n color: $fallback--lightText;\n color: var(--lightText, $fallback--lightText);\n }\n }\n}\n","$main-color: #f58d2c;\n$main-background: white;\n$darkened-background: whitesmoke;\n\n$fallback--bg: #121a24;\n$fallback--fg: #182230;\n$fallback--faint: rgb(185 185 186 / 50%);\n$fallback--text: #b9b9ba;\n$fallback--link: #d8a070;\n$fallback--icon: #666;\n$fallback--lightBg: rgb(21 30 42);\n$fallback--lightText: #b9b9ba;\n$fallback--border: #222;\n$fallback--cRed: #f00;\n$fallback--cBlue: #0095ff;\n$fallback--cGreen: #0fa00f;\n$fallback--cOrange: orange;\n\n$fallback--alertError: rgb(211 16 20 / 50%);\n$fallback--alertWarning: rgb(111 111 20 / 50%);\n\n$fallback--panelRadius: 10px;\n$fallback--checkboxRadius: 2px;\n$fallback--btnRadius: 4px;\n$fallback--inputRadius: 4px;\n$fallback--tooltipRadius: 5px;\n$fallback--avatarRadius: 4px;\n$fallback--avatarAltRadius: 10px;\n$fallback--attachmentRadius: 10px;\n$fallback--chatMessageRadius: 10px;\n\n$fallback--buttonShadow: 0 0 2px 0 rgb(0 0 0 / 100%),\n 0 1px 0 0 rgb(255 255 255 / 20%) inset,\n 0 -1px 0 0 rgb(0 0 0 / 20%) inset;\n\n$status-margin: 0.75em;\n","\n@import \"../../variables\";\n@import \"../../mixins\";\n\n.checkbox {\n position: relative;\n display: inline-block;\n min-height: 1.2em;\n\n &-indicator {\n position: relative;\n padding-left: 1.2em;\n }\n\n &-indicator::before {\n position: absolute;\n right: 0;\n top: 0;\n display: block;\n content: \"✓\";\n transition: color 200ms;\n width: 1.1em;\n height: 1.1em;\n border-radius: $fallback--checkboxRadius;\n border-radius: var(--checkboxRadius, $fallback--checkboxRadius);\n box-shadow: 0 0 2px black inset;\n box-shadow: var(--inputShadow);\n background-color: $fallback--fg;\n background-color: var(--input, $fallback--fg);\n vertical-align: top;\n text-align: center;\n line-height: 1.1em;\n font-size: 1.1em;\n color: transparent;\n overflow: hidden;\n box-sizing: border-box;\n }\n\n &.disabled {\n .checkbox-indicator::before,\n .label {\n opacity: 0.5;\n }\n\n .label {\n color: $fallback--faint;\n color: var(--faint, $fallback--faint);\n }\n }\n\n input[type=\"checkbox\"] {\n &:checked + .checkbox-indicator::before {\n color: $fallback--text;\n color: var(--inputText, $fallback--text);\n }\n\n &:indeterminate + .checkbox-indicator::before {\n content: \"–\";\n color: $fallback--text;\n color: var(--inputText, $fallback--text);\n }\n }\n\n &.indeterminate-fix {\n input[type=\"checkbox\"] + .checkbox-indicator::before {\n content: \"–\";\n }\n }\n\n & > span {\n margin-left: 0.5em;\n }\n}\n","\n@import \"../../variables\";\n\n.popover-trigger-button {\n display: inline-block;\n}\n\n.popover {\n z-index: var(--ZI_popover_override, var(--ZI_popovers));\n position: fixed;\n min-width: 0;\n max-width: calc(100vw - 20px);\n box-shadow: 2px 2px 3px rgb(0 0 0 / 50%);\n box-shadow: var(--popupShadow);\n}\n\n.popover-default {\n &::after {\n content: \"\";\n position: absolute;\n top: 0;\n bottom: 0;\n left: 0;\n right: 0;\n z-index: 3;\n box-shadow: 1px 1px 4px rgb(0 0 0 / 60%);\n box-shadow: var(--panelShadow);\n pointer-events: none;\n }\n\n border-radius: $fallback--btnRadius;\n border-radius: var(--btnRadius, $fallback--btnRadius);\n background-color: $fallback--bg;\n background-color: var(--popover, $fallback--bg);\n color: $fallback--text;\n color: var(--popoverText, $fallback--text);\n\n --faint: var(--popoverFaintText, $fallback--faint);\n --faintLink: var(--popoverFaintLink, $fallback--faint);\n --lightText: var(--popoverLightText, $fallback--lightText);\n --postLink: var(--popoverPostLink, $fallback--link);\n --postFaintLink: var(--popoverPostFaintLink, $fallback--link);\n --icon: var(--popoverIcon, $fallback--icon);\n}\n\n.dropdown-menu {\n display: block;\n padding: 0.5rem 0;\n font-size: 1em;\n text-align: left;\n list-style: none;\n max-width: 100vw;\n z-index: var(--ZI_popover_override, var(--ZI_popovers));\n white-space: nowrap;\n\n .dropdown-divider {\n height: 0;\n margin: 0.5rem 0;\n overflow: hidden;\n border-top: 1px solid $fallback--border;\n border-top: 1px solid var(--border, $fallback--border);\n }\n\n .dropdown-item {\n line-height: 21px;\n overflow: hidden;\n display: block;\n padding: 0.5em 0.75em;\n clear: both;\n font-weight: 400;\n text-align: inherit;\n white-space: nowrap;\n border: none;\n border-radius: 0;\n background-color: transparent;\n box-shadow: none;\n width: 100%;\n height: 100%;\n box-sizing: border-box;\n\n --btnText: var(--popoverText, $fallback--text);\n\n &-icon {\n svg {\n width: 22px;\n margin-right: 0.75rem;\n color: var(--menuPopoverIcon, $fallback--icon);\n }\n }\n\n &.-has-submenu {\n .chevron-icon {\n margin-right: 0.25rem;\n margin-left: 2rem;\n }\n }\n\n &:active,\n &:hover {\n background-color: $fallback--lightBg;\n background-color: var(--selectedMenuPopover, $fallback--lightBg);\n box-shadow: none;\n\n --btnText: var(--selectedMenuPopoverText, $fallback--link);\n --faint: var(--selectedMenuPopoverFaintText, $fallback--faint);\n --faintLink: var(--selectedMenuPopoverFaintLink, $fallback--faint);\n --lightText: var(--selectedMenuPopoverLightText, $fallback--lightText);\n --icon: var(--selectedMenuPopoverIcon, $fallback--icon);\n\n svg {\n color: var(--selectedMenuPopoverIcon, $fallback--icon);\n\n --icon: var(--selectedMenuPopoverIcon, $fallback--icon);\n }\n }\n\n .menu-checkbox {\n display: inline-block;\n vertical-align: middle;\n min-width: 22px;\n max-width: 22px;\n min-height: 22px;\n max-height: 22px;\n line-height: 22px;\n text-align: center;\n border-radius: 0;\n background-color: $fallback--fg;\n background-color: var(--input, $fallback--fg);\n box-shadow: 0 0 2px black inset;\n box-shadow: var(--inputShadow);\n margin-right: 0.75em;\n\n &.menu-checkbox-checked::after {\n font-size: 1.25em;\n content: \"✓\";\n }\n\n &.-radio {\n border-radius: 9999px;\n\n &.menu-checkbox-checked::after {\n font-size: 2em;\n content: \"•\";\n }\n }\n }\n }\n\n .button-default.dropdown-item {\n &,\n i[class*=\"icon-\"] {\n color: $fallback--text;\n color: var(--btnText, $fallback--text);\n }\n\n &:active {\n background-color: $fallback--lightBg;\n background-color: var(--selectedMenuPopover, $fallback--lightBg);\n color: $fallback--link;\n color: var(--selectedMenuPopoverText, $fallback--link);\n }\n\n &:disabled {\n color: $fallback--text;\n color: var(--btnDisabledText, $fallback--text);\n }\n\n &.toggled {\n color: $fallback--text;\n color: var(--btnToggledText, $fallback--text);\n }\n }\n}\n","\n@import \"../../variables\";\n\n.still-image {\n position: relative;\n line-height: 0;\n overflow: hidden;\n display: inline-flex;\n align-items: center;\n\n canvas {\n position: absolute;\n top: 0;\n bottom: 0;\n left: 0;\n right: 0;\n width: 100%;\n height: 100%;\n object-fit: contain;\n visibility: var(--_still-image-canvas-visibility, visible);\n }\n\n img {\n width: 100%;\n height: 100%;\n object-fit: contain;\n }\n\n &.animated {\n &::before {\n zoom: var(--_still_image-label-scale, 1);\n content: \"gif\";\n position: absolute;\n line-height: 1;\n font-size: 0.7em;\n top: 0.5em;\n left: 0.5em;\n background: rgb(127 127 127 / 50%);\n color: #fff;\n display: block;\n padding: 2px 4px;\n border-radius: $fallback--tooltipRadius;\n border-radius: var(--tooltipRadius, $fallback--tooltipRadius);\n z-index: 2;\n visibility: var(--_still-image-label-visibility, visible);\n }\n\n &:hover canvas {\n display: none;\n }\n\n &:hover::before {\n visibility: var(--_still-image-label-visibility, hidden);\n }\n\n img {\n visibility: var(--_still-image-img-visibility, hidden);\n }\n\n &:hover img {\n visibility: visible;\n }\n }\n}\n","@import \"../../variables\";\n\n$emoji-picker-header-height: 36px;\n$emoji-picker-header-picture-width: 32px;\n$emoji-picker-header-picture-height: 32px;\n$emoji-picker-emoji-size: 32px;\n\n.emoji-picker {\n width: 25em;\n max-width: calc(100vw - 20px); // popover gives 10px margin from window edge\n display: flex;\n flex-direction: column;\n background-color: $fallback--bg;\n background-color: var(--popover, $fallback--bg);\n color: $fallback--link;\n color: var(--popoverText, $fallback--link);\n\n --faint: var(--popoverFaintText, $fallback--faint);\n --faintLink: var(--popoverFaintLink, $fallback--faint);\n --lightText: var(--popoverLightText, $fallback--lightText);\n --icon: var(--popoverIcon, $fallback--icon);\n\n &-header-image {\n display: inline-flex;\n justify-content: center;\n align-items: center;\n width: $emoji-picker-header-picture-width;\n max-width: $emoji-picker-header-picture-width;\n height: $emoji-picker-header-picture-height;\n max-height: $emoji-picker-header-picture-height;\n\n .still-image {\n max-width: 100%;\n max-height: 100%;\n height: 100%;\n width: 100%;\n object-fit: contain;\n }\n }\n\n .keep-open,\n .too-many-emoji {\n padding: 7px;\n line-height: normal;\n }\n\n .too-many-emoji {\n display: flex;\n flex-direction: column;\n }\n\n .keep-open-label {\n padding: 0 7px;\n display: flex;\n }\n\n .heading {\n display: flex;\n padding: 10px 7px 5px;\n }\n\n .content {\n display: flex;\n flex-direction: column;\n flex: 1 1 auto;\n min-height: 0;\n }\n\n .emoji-tabs {\n flex-grow: 1;\n display: flex;\n flex-flow: row nowrap;\n overflow-x: auto;\n }\n\n .additional-tabs {\n display: flex;\n border-left: 1px solid;\n border-left-color: $fallback--icon;\n border-left-color: var(--icon, $fallback--icon);\n padding-left: 7px;\n flex: 0 0 auto;\n }\n\n .additional-tabs,\n .emoji-tabs {\n flex-basis: auto;\n display: flex;\n align-content: center;\n\n &-item {\n padding: 0 7px;\n cursor: pointer;\n font-size: 1.85em;\n width: $emoji-picker-header-picture-width;\n max-width: $emoji-picker-header-picture-width;\n height: $emoji-picker-header-picture-height;\n max-height: $emoji-picker-header-picture-height;\n display: flex;\n align-items: center;\n\n &.disabled {\n opacity: 0.5;\n pointer-events: none;\n }\n\n &.active {\n border-bottom: 4px solid;\n\n svg {\n color: $fallback--lightText;\n color: var(--lightText, $fallback--lightText);\n }\n }\n }\n }\n\n .sticker-picker {\n flex: 1 1 auto;\n }\n\n .stickers,\n .emoji {\n &-content {\n display: flex;\n flex-direction: column;\n flex: 1 1 auto;\n min-height: 0;\n\n &.hidden {\n opacity: 0;\n pointer-events: none;\n position: absolute;\n }\n }\n }\n\n .emoji {\n &-search {\n padding: 5px;\n flex: 0 0 auto;\n\n input {\n width: 100%;\n }\n }\n\n &-groups {\n height: 100%;\n min-height: 200px;\n flex: 1 1 1px;\n position: relative;\n overflow: auto;\n user-select: none;\n mask:\n linear-gradient(to top, white 0, transparent 100%) bottom no-repeat,\n linear-gradient(to bottom, white 0, transparent 100%) top no-repeat,\n linear-gradient(to top, white, white);\n transition: mask-size 150ms;\n mask-size: 100% 20px, 100% 20px, auto;\n // Autoprefixed seem to ignore this one, and also syntax is different\n mask-composite: xor;\n mask-composite: exclude;\n\n &.scrolled {\n &-top {\n mask-size: 100% 20px, 100% 0, auto;\n }\n\n &-bottom {\n mask-size: 100% 0, 100% 20px, auto;\n }\n }\n }\n\n &-group {\n display: flex;\n align-items: center;\n flex-wrap: wrap;\n padding-left: 5px;\n justify-content: left;\n\n &-title {\n font-size: 0.85em;\n width: 100%;\n margin: 0;\n\n &.disabled {\n display: none;\n }\n }\n }\n\n &-item {\n width: $emoji-picker-emoji-size;\n height: $emoji-picker-emoji-size;\n box-sizing: border-box;\n display: flex;\n line-height: $emoji-picker-emoji-size;\n align-items: center;\n justify-content: center;\n margin: 4px;\n cursor: pointer;\n\n .emoji-picker-emoji.-custom {\n object-fit: contain;\n max-width: 100%;\n max-height: 100%;\n }\n\n .emoji-picker-emoji.-unicode {\n font-size: 24px;\n overflow: hidden;\n }\n }\n }\n}\n","\n@import \"../../variables\";\n\n.emoji-input {\n display: flex;\n flex-direction: column;\n position: relative;\n\n .emoji-picker-icon {\n position: absolute;\n top: 0;\n right: 0;\n margin: 0.2em 0.25em;\n font-size: 1.3em;\n cursor: pointer;\n line-height: 24px;\n\n &:hover i {\n color: $fallback--text;\n color: var(--text, $fallback--text);\n }\n }\n\n .emoji-picker-panel {\n position: absolute;\n z-index: 20;\n margin-top: 2px;\n\n &.hide {\n display: none;\n }\n }\n\n input,\n textarea {\n flex: 1 0 auto;\n }\n\n &.with-picker input {\n padding-right: 30px;\n }\n\n .hidden-overlay {\n opacity: 0;\n pointer-events: none;\n position: absolute;\n top: 0;\n bottom: 0;\n right: 0;\n left: 0;\n overflow: hidden;\n\n /* DEBUG STUFF */\n color: red;\n\n /* set opacity to non-zero to see the overlay */\n\n .caret {\n width: 0;\n margin-right: calc(-1ch - 1px);\n border: 1px solid red;\n }\n }\n}\n\n.autocomplete {\n &-panel {\n position: absolute;\n }\n\n &-item {\n display: flex;\n cursor: pointer;\n padding: 0.2em 0.4em;\n border-bottom: 1px solid rgb(0 0 0 / 40%);\n height: 32px;\n\n .image {\n width: 32px;\n height: 32px;\n line-height: 32px;\n text-align: center;\n font-size: 32px;\n margin-right: 4px;\n\n img {\n width: 32px;\n height: 32px;\n object-fit: contain;\n }\n }\n\n .label {\n display: flex;\n flex-direction: column;\n justify-content: center;\n margin: 0 0.1em 0 0.2em;\n\n .displayText {\n line-height: 1.5;\n }\n\n .detailText {\n font-size: 9px;\n line-height: 9px;\n }\n }\n\n &.highlighted {\n background-color: $fallback--fg;\n background-color: var(--selectedMenuPopover, $fallback--fg);\n color: var(--selectedMenuPopoverText, $fallback--text);\n\n --faint: var(--selectedMenuPopoverFaintText, $fallback--faint);\n --faintLink: var(--selectedMenuPopoverFaintLink, $fallback--faint);\n --lightText: var(--selectedMenuPopoverLightText, $fallback--lightText);\n --icon: var(--selectedMenuPopoverIcon, $fallback--icon);\n }\n }\n}\n","\n@import \"../../variables\";\n\n/* TODO fix order of styles */\nlabel.Select {\n padding: 0;\n\n select {\n appearance: none;\n background: transparent;\n border: none;\n color: $fallback--text;\n color: var(--inputText, --text, $fallback--text);\n margin: 0;\n padding: 0 2em 0 0.2em;\n font-family: sans-serif;\n font-family: var(--inputFont, sans-serif);\n font-size: 1em;\n width: 100%;\n z-index: 1;\n height: 2em;\n line-height: 16px;\n }\n\n .select-down-icon {\n position: absolute;\n top: 0;\n bottom: 0;\n right: 5px;\n height: 100%;\n width: 0.875em;\n color: $fallback--text;\n color: var(--inputText, $fallback--text);\n line-height: 2;\n z-index: 0;\n pointer-events: none;\n }\n}\n","\n@import \"../../variables\";\n\n.poll-form {\n display: flex;\n flex-direction: column;\n padding: 0 0.5em 0.5em;\n\n .add-option {\n align-self: flex-start;\n padding-top: 0.25em;\n padding-left: 0.1em;\n }\n\n .poll-option {\n display: flex;\n align-items: baseline;\n justify-content: space-between;\n margin-bottom: 0.25em;\n }\n\n .input-container {\n width: 100%;\n\n input {\n // Hack: dodge the floating X icon\n padding-right: 2.5em;\n width: 100%;\n }\n }\n\n .delete-option {\n // Hack: Move the icon over the input box\n width: 1.5em;\n margin-left: -1.5em;\n z-index: 1;\n }\n\n .poll-type-expiry {\n margin-top: 0.5em;\n display: flex;\n width: 100%;\n }\n\n .poll-type {\n margin-right: 0.75em;\n flex: 1 1 60%;\n\n .poll-type-select {\n padding-right: 0.75em;\n }\n }\n\n .poll-expiry {\n display: flex;\n\n .expiry-amount {\n width: 3em;\n text-align: right;\n }\n }\n}\n","\n@import \"../../variables\";\n\n.Flash {\n display: inline-block;\n width: 100%;\n height: 100%;\n position: relative;\n\n .player {\n height: 100%;\n width: 100%;\n }\n\n .placeholder {\n height: 100%;\n width: 100%;\n display: flex;\n align-items: center;\n justify-content: center;\n background: var(--bg);\n color: var(--link);\n }\n\n .hider {\n top: 0;\n }\n\n .label {\n text-align: center;\n flex: 1 1 0;\n line-height: 1.2;\n white-space: normal;\n word-wrap: normal;\n }\n\n .hidden {\n display: none;\n visibility: \"hidden\";\n }\n}\n","@import \"../../variables\";\n\n.Attachment {\n display: inline-flex;\n flex-direction: column;\n position: relative;\n align-self: flex-start;\n line-height: 0;\n height: 100%;\n border-style: solid;\n border-width: 1px;\n border-radius: $fallback--attachmentRadius;\n border-radius: var(--attachmentRadius, $fallback--attachmentRadius);\n border-color: $fallback--border;\n border-color: var(--border, $fallback--border);\n\n .attachment-wrapper {\n flex: 1 1 auto;\n height: 100%;\n position: relative;\n overflow: hidden;\n }\n\n .description-container {\n flex: 0 1 0;\n display: flex;\n padding-top: 0.5em;\n z-index: 1;\n\n p {\n flex: 1;\n text-align: center;\n line-height: 1.5;\n padding: 0.5em;\n margin: 0;\n white-space: nowrap;\n text-overflow: ellipsis;\n overflow: hidden;\n }\n\n &.-static {\n position: absolute;\n left: 0;\n right: 0;\n bottom: 0;\n padding-top: 0;\n background: var(--popover);\n box-shadow: var(--popupShadow);\n }\n }\n\n .description-field {\n flex: 1;\n min-width: 0;\n }\n\n & .placeholder-container,\n & .image-container,\n & .audio-container,\n & .video-container,\n & .flash-container,\n & .oembed-container {\n display: flex;\n justify-content: center;\n width: 100%;\n height: 100%;\n }\n\n .image-container {\n .image {\n width: 100%;\n height: 100%;\n }\n }\n\n & .flash-container,\n & .video-container {\n & .flash,\n & video {\n width: 100%;\n height: 100%;\n object-fit: contain;\n align-self: center;\n }\n }\n\n .audio-container {\n display: flex;\n align-items: flex-end;\n\n audio {\n width: 100%;\n height: 100%;\n }\n }\n\n .placeholder-container {\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n padding-top: 0.5em;\n }\n\n .play-icon {\n position: absolute;\n font-size: 64px;\n top: calc(50% - 32px);\n left: calc(50% - 32px);\n color: rgb(255 255 255 / 75%);\n text-shadow: 0 0 2px rgb(0 0 0 / 40%);\n\n &::before {\n margin: 0;\n }\n }\n\n .attachment-buttons {\n display: flex;\n position: absolute;\n right: 0;\n top: 0;\n margin-top: 0.5em;\n margin-right: 0.5em;\n z-index: 1;\n\n .attachment-button {\n padding: 0;\n border-radius: $fallback--tooltipRadius;\n border-radius: var(--tooltipRadius, $fallback--tooltipRadius);\n text-align: center;\n width: 2em;\n height: 2em;\n margin-left: 0.5em;\n font-size: 1.25em;\n // TODO: theming? hard to theme with unknown background image color\n background: rgb(230 230 230 / 70%);\n\n .svg-inline--fa {\n color: rgb(0 0 0 / 60%);\n }\n\n &:hover .svg-inline--fa {\n color: rgb(0 0 0 / 90%);\n }\n }\n }\n\n &.-contain-fit {\n img,\n canvas {\n object-fit: contain;\n }\n }\n\n &.-cover-fit {\n img,\n canvas {\n object-fit: cover;\n }\n }\n\n .oembed-container {\n line-height: 1.2em;\n flex: 1 0 100%;\n width: 100%;\n margin-right: 15px;\n display: flex;\n\n img {\n width: 100%;\n }\n\n .image {\n flex: 1;\n\n img {\n border: 0;\n border-radius: 5px;\n height: 100%;\n object-fit: cover;\n }\n }\n\n .text {\n flex: 2;\n margin: 8px;\n word-break: break-all;\n\n h1 {\n font-size: 1rem;\n margin: 0;\n }\n }\n }\n\n &.-size-small {\n .play-icon {\n zoom: 0.5;\n opacity: 0.7;\n }\n\n .attachment-buttons {\n zoom: 0.7;\n opacity: 0.5;\n }\n }\n\n &.-editable {\n padding: 0.5em;\n\n & .description-container,\n & .attachment-buttons {\n margin: 0;\n }\n }\n\n &.-placeholder {\n display: inline-block;\n color: $fallback--link;\n color: var(--postLink, $fallback--link);\n overflow: hidden;\n white-space: nowrap;\n height: auto;\n line-height: 1.5;\n\n &:not(.-editable) {\n border: none;\n }\n\n &.-editable {\n display: flex;\n flex-direction: row;\n align-items: baseline;\n\n & .description-container,\n & .attachment-buttons {\n margin: 0;\n padding: 0;\n position: relative;\n }\n\n .description-container {\n flex: 1;\n padding-left: 0.5em;\n }\n\n .attachment-buttons {\n order: 99;\n align-self: center;\n }\n }\n\n a {\n display: inline-block;\n max-width: 100%;\n overflow: hidden;\n text-overflow: ellipsis;\n }\n\n svg {\n color: inherit;\n }\n }\n\n &.-loading {\n cursor: progress;\n }\n\n &.-compact {\n .placeholder-container {\n padding-bottom: 0.5em;\n }\n }\n}\n","\n@import \"../../variables\";\n\n.Gallery {\n .gallery-rows {\n display: flex;\n flex-direction: column;\n }\n\n .gallery-row {\n position: relative;\n height: 0;\n width: 100%;\n flex-grow: 1;\n\n .gallery-row-inner {\n position: absolute;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n display: flex;\n flex-flow: row wrap;\n align-content: stretch;\n\n .gallery-item {\n margin: 0 0.5em 0 0;\n flex-grow: 1;\n height: 100%;\n box-sizing: border-box;\n // to make failed images a bit more noticeable on chromium\n min-width: 2em;\n\n &:last-child {\n margin: 0;\n }\n }\n\n &.-grid {\n width: 100%;\n height: auto;\n position: relative;\n display: grid;\n grid-gap: 0.5em;\n grid-template-columns: repeat(auto-fill, minmax(15em, 1fr));\n\n .gallery-item {\n margin: 0;\n height: 200px;\n }\n }\n }\n\n &.-grid,\n &.-minimal {\n height: auto;\n\n .gallery-row-inner {\n position: relative;\n }\n }\n\n &:not(:first-child) {\n margin-top: 0.5em;\n }\n }\n\n &.-long {\n .gallery-rows {\n max-height: 25em;\n overflow: hidden;\n mask:\n linear-gradient(to top, white, transparent) bottom/100% 70px no-repeat,\n linear-gradient(to top, white, white);\n\n /* Autoprefixed seem to ignore this one, and also syntax is different */\n mask-composite: xor;\n mask-composite: exclude;\n }\n }\n\n .many-attachments-text {\n text-align: center;\n line-height: 2;\n }\n\n .many-attachments-buttons {\n display: flex;\n }\n\n .many-attachments-button {\n display: flex;\n flex: 1;\n justify-content: center;\n line-height: 2;\n\n button {\n padding: 0 2em;\n }\n }\n}\n","\n@import \"../../variables\";\n\n.Avatar {\n --_avatarShadowBox: var(--avatarStatusShadow);\n --_avatarShadowFilter: var(--avatarStatusShadowFilter);\n --_avatarShadowInset: var(--avatarStatusShadowInset);\n --_still-image-label-visibility: hidden;\n\n display: inline-block;\n position: relative;\n width: 48px;\n height: 48px;\n\n &.-compact {\n width: 32px;\n height: 32px;\n border-radius: $fallback--avatarAltRadius;\n border-radius: var(--avatarAltRadius, $fallback--avatarAltRadius);\n }\n\n .avatar {\n width: 100%;\n height: 100%;\n box-shadow: var(--_avatarShadowBox);\n border-radius: $fallback--avatarRadius;\n border-radius: var(--avatarRadius, $fallback--avatarRadius);\n\n &.-better-shadow {\n box-shadow: var(--_avatarShadowInset);\n filter: var(--_avatarShadowFilter);\n }\n\n &.-animated::before {\n display: none;\n }\n\n &.-compact {\n border-radius: $fallback--avatarAltRadius;\n border-radius: var(--avatarAltRadius, $fallback--avatarAltRadius);\n }\n\n &.-placeholder {\n background-color: $fallback--fg;\n background-color: var(--fg, $fallback--fg);\n }\n }\n\n img {\n width: 100%;\n height: 100%;\n }\n\n .bot-indicator {\n position: absolute;\n bottom: 0;\n right: 0;\n margin: -0.2em;\n padding: 0.2em;\n background: rgb(127 127 127 / 50%);\n color: #fff;\n border-radius: var(--tooltipRadius);\n }\n}\n","@import \"../../variables\";\n\n.MentionLink {\n position: relative;\n white-space: normal;\n display: inline;\n color: var(--link);\n word-break: normal;\n\n & .new,\n & .original {\n display: inline;\n border-radius: 2px;\n }\n\n .mention-avatar {\n border-radius: var(--avatarAltRadius, $fallback--avatarAltRadius);\n width: 1.5em;\n height: 1.5em;\n vertical-align: middle;\n user-select: none;\n margin-right: 0.2em;\n }\n\n .full {\n position: absolute;\n display: inline-block;\n pointer-events: none;\n opacity: 0;\n top: 100%;\n left: 0;\n height: 100%;\n word-wrap: normal;\n white-space: nowrap;\n transition: opacity 0.2s ease;\n z-index: 1;\n margin-top: 0.25em;\n padding: 0.5em;\n user-select: all;\n }\n\n & .short.-with-tooltip,\n & .you {\n user-select: none;\n }\n\n & .short,\n & .full {\n white-space: nowrap;\n }\n\n .shortName {\n white-space: normal;\n }\n\n .new {\n &.-you {\n .shortName {\n font-weight: 600;\n }\n }\n\n &.-has-selection {\n color: var(--alertNeutralText, $fallback--text);\n background-color: var(--alertNeutral, $fallback--fg);\n }\n\n .at {\n color: var(--link);\n opacity: 0.8;\n display: inline-block;\n line-height: 1;\n padding: 0 0.1em;\n vertical-align: -25%;\n margin: 0;\n }\n\n &.-striped {\n & .shortName {\n background-image:\n repeating-linear-gradient(\n 135deg,\n var(--____highlight-tintColor),\n var(--____highlight-tintColor) 5px,\n var(--____highlight-tintColor2) 5px,\n var(--____highlight-tintColor2) 10px\n );\n }\n }\n\n &.-solid {\n .shortName {\n background-image: linear-gradient(var(--____highlight-tintColor2), var(--____highlight-tintColor2));\n }\n }\n\n &.-side {\n .shortName {\n box-shadow: 0 -5px 3px -4px inset var(--____highlight-solidColor);\n }\n }\n }\n\n .serverName.-faded {\n color: var(--faintLink, $fallback--link);\n }\n}\n\n.mention-link-popover {\n max-width: 70ch;\n max-height: 20rem;\n overflow: hidden;\n}\n",".MentionsLine {\n word-break: break-all;\n\n .mention-link:not(:first-child)::before {\n content: \" \";\n }\n\n .showMoreLess {\n margin-left: 0.5em;\n white-space: normal;\n color: var(--link);\n }\n}\n",".HashtagLink {\n position: relative;\n white-space: normal;\n display: inline-block;\n color: var(--link);\n}\n","@import \"../../variables\";\n\n.RichContent {\n blockquote {\n margin: 0.2em 0 0.2em 0.2em;\n font-style: italic;\n border-left: 0.2em solid var(--faint, $fallback--faint);\n padding-left: 1em;\n }\n\n pre {\n overflow: auto;\n }\n\n code,\n samp,\n kbd,\n var,\n pre {\n font-family: var(--postCodeFont, monospace);\n }\n\n p {\n margin: 0 0 1em;\n }\n\n p:last-child {\n margin: 0;\n }\n\n h1 {\n font-size: 1.1em;\n line-height: 1.2em;\n margin: 1.4em 0;\n }\n\n h2 {\n font-size: 1.1em;\n margin: 1em 0;\n }\n\n h3 {\n font-size: 1em;\n margin: 1.2em 0;\n }\n\n h4 {\n margin: 1.1em 0;\n }\n\n .img {\n display: inline-block;\n }\n\n .emoji {\n display: inline-block;\n width: var(--emoji-size, 32px);\n height: var(--emoji-size, 32px);\n }\n\n .img,\n video {\n max-width: 100%;\n max-height: 400px;\n vertical-align: middle;\n object-fit: contain;\n }\n}\n","\n@import \"../../variables\";\n\n.poll {\n .votes {\n display: flex;\n flex-direction: column;\n margin: 0 0 0.5em;\n }\n\n .poll-option {\n margin: 0.75em 0.5em;\n }\n\n .option-result {\n height: 100%;\n display: flex;\n flex-direction: row;\n position: relative;\n color: $fallback--lightText;\n color: var(--lightText, $fallback--lightText);\n }\n\n .option-result-label {\n display: flex;\n align-items: center;\n padding: 0.1em 0.25em;\n z-index: 1;\n word-break: break-word;\n }\n\n .result-percentage {\n width: 3.5em;\n flex-shrink: 0;\n }\n\n .result-fill {\n height: 100%;\n position: absolute;\n color: $fallback--text;\n color: var(--pollText, $fallback--text);\n background-color: $fallback--lightBg;\n background-color: var(--poll, $fallback--lightBg);\n border-radius: $fallback--panelRadius;\n border-radius: var(--panelRadius, $fallback--panelRadius);\n top: 0;\n left: 0;\n transition: width 0.5s;\n }\n\n .option-vote {\n display: flex;\n align-items: center;\n }\n\n input {\n width: 3.5em;\n }\n\n .footer {\n display: flex;\n align-items: center;\n }\n\n &.loading * {\n cursor: progress;\n }\n\n .poll-vote-button {\n padding: 0 0.5em;\n margin-right: 0.5em;\n }\n\n .poll-checkbox {\n display: none;\n }\n}\n","@import \"../../variables\";\n\n.StatusBody {\n display: flex;\n flex-direction: column;\n\n .emoji {\n --_still_image-label-scale: 0.5;\n }\n\n .attachments {\n margin-top: 0.5em;\n }\n\n & .text,\n & .summary {\n font-family: var(--postFont, sans-serif);\n white-space: pre-wrap;\n overflow-wrap: break-word;\n word-wrap: break-word;\n word-break: break-word;\n line-height: var(--post-line-height);\n }\n\n .summary {\n display: block;\n font-style: italic;\n padding-bottom: 0.5em;\n }\n\n .text {\n &.-single-line {\n white-space: nowrap;\n text-overflow: ellipsis;\n overflow: hidden;\n height: 1.4em;\n }\n }\n\n .summary-wrapper {\n margin-bottom: 0.5em;\n border-style: solid;\n border-width: 0 0 1px;\n border-color: var(--border, $fallback--border);\n flex-grow: 0;\n\n &.-tall {\n position: relative;\n\n .summary {\n max-height: 2em;\n overflow: hidden;\n white-space: nowrap;\n text-overflow: ellipsis;\n }\n }\n }\n\n .text-wrapper {\n display: flex;\n flex-flow: column nowrap;\n\n &.-tall-status {\n position: relative;\n height: 220px;\n overflow-x: hidden;\n overflow-y: hidden;\n z-index: 1;\n\n .media-body {\n min-height: 0;\n mask:\n linear-gradient(to top, white, transparent) bottom/100% 70px no-repeat,\n linear-gradient(to top, white, white);\n\n /* Autoprefixed seem to ignore this one, and also syntax is different */\n mask-composite: xor;\n mask-composite: exclude;\n }\n }\n }\n\n & .tall-status-hider,\n & .tall-subject-hider,\n & .status-unhider,\n & .cw-status-hider {\n display: inline-block;\n word-break: break-all;\n width: 100%;\n text-align: center;\n }\n\n .tall-status-hider {\n position: absolute;\n height: 70px;\n margin-top: 150px;\n line-height: 110px;\n z-index: 2;\n }\n\n .tall-subject-hider {\n // position: absolute;\n padding-bottom: 0.5em;\n }\n\n & .status-unhider,\n & .cw-status-hider {\n word-break: break-all;\n\n svg {\n color: inherit;\n }\n }\n\n .greentext {\n color: $fallback--cGreen;\n color: var(--postGreentext, $fallback--cGreen);\n }\n\n .cyantext {\n color: var(--postCyantext, $fallback--cBlue);\n }\n\n &.-compact {\n align-items: top;\n flex-direction: row;\n\n --emoji-size: 16px;\n\n & .body,\n & .attachments {\n max-height: 3.25em;\n }\n\n .body {\n overflow: hidden;\n white-space: normal;\n min-width: 5em;\n flex: 5 1 auto;\n mask-size: auto 3.5em, auto auto;\n mask-position: 0 0, 0 0;\n mask-repeat: repeat-x, repeat;\n mask-image: linear-gradient(to bottom, white 2em, transparent 3em);\n\n /* Autoprefixed seem to ignore this one, and also syntax is different */\n mask-composite: xor;\n mask-composite: exclude;\n }\n\n .attachments {\n margin-top: 0;\n flex: 1 1 0;\n min-width: 5em;\n height: 100%;\n margin-left: 0.5em;\n }\n\n .summary-wrapper {\n .summary::after {\n content: \": \";\n }\n\n line-height: inherit;\n margin: 0;\n border: none;\n display: inline-block;\n }\n\n .text-wrapper {\n display: inline-block;\n }\n }\n}\n","\n@import \"../../variables\";\n\n.link-preview-card {\n display: flex;\n flex-direction: row;\n cursor: pointer;\n overflow: hidden;\n margin-top: 0.5em;\n\n .card-image {\n flex-shrink: 0;\n width: 120px;\n max-width: 25%;\n\n img {\n width: 100%;\n height: 100%;\n object-fit: cover;\n border-radius: $fallback--attachmentRadius;\n border-radius: var(--attachmentRadius, $fallback--attachmentRadius);\n }\n }\n\n .card-content {\n max-height: 100%;\n margin: 0.5em;\n display: flex;\n flex-direction: column;\n }\n\n .card-host {\n font-size: 0.85em;\n }\n\n .card-description {\n margin: 0.5em 0 0;\n overflow: hidden;\n text-overflow: ellipsis;\n word-break: break-word;\n line-height: 1.2em;\n // cap description at 3 lines, the 1px is to clean up some stray pixels\n // TODO: fancier fade-out at the bottom to show off that it's too long?\n max-height: calc(1.2em * 3 - 1px);\n }\n\n .nsfw-alert {\n margin: 2em 0;\n }\n\n color: $fallback--text;\n color: var(--text, $fallback--text);\n border-style: solid;\n border-width: 1px;\n border-radius: $fallback--attachmentRadius;\n border-radius: var(--attachmentRadius, $fallback--attachmentRadius);\n border-color: $fallback--border;\n border-color: var(--border, $fallback--border);\n}\n","\n.StatusContent {\n flex: 1;\n min-width: 0;\n}\n","\n@import \"../../variables\";\n\n.post-status-form {\n position: relative;\n\n .attachments {\n margin-bottom: 0.5em;\n }\n\n .form-bottom {\n display: flex;\n justify-content: space-between;\n padding: 0.5em;\n height: 2.5em;\n\n button {\n width: 10em;\n }\n\n p {\n margin: 0.35em;\n padding: 0.35em;\n display: flex;\n }\n }\n\n .form-bottom-left {\n display: flex;\n flex: 1;\n padding-right: 7px;\n margin-right: 7px;\n max-width: 10em;\n }\n\n .preview-heading {\n display: flex;\n padding-left: 0.5em;\n }\n\n .preview-toggle {\n flex: 1;\n cursor: pointer;\n user-select: none;\n\n &:hover {\n text-decoration: underline;\n }\n\n svg,\n i {\n margin-left: 0.2em;\n font-size: 0.8em;\n transform: rotate(90deg);\n }\n }\n\n .preview-container {\n margin-bottom: 1em;\n }\n\n .preview-error {\n font-style: italic;\n color: $fallback--faint;\n color: var(--faint, $fallback--faint);\n }\n\n .preview-status {\n border: 1px solid $fallback--border;\n border: 1px solid var(--border, $fallback--border);\n border-radius: $fallback--tooltipRadius;\n border-radius: var(--tooltipRadius, $fallback--tooltipRadius);\n padding: 0.5em;\n margin: 0;\n }\n\n .reply-or-quote-selector {\n margin-bottom: 0.5em;\n }\n\n .text-format {\n .only-format {\n color: $fallback--faint;\n color: var(--faint, $fallback--faint);\n }\n }\n\n .visibility-tray {\n display: flex;\n justify-content: space-between;\n padding-top: 5px;\n align-items: baseline;\n }\n\n .visibility-notice.edit-warning {\n > :first-child {\n margin-top: 0;\n }\n\n > :last-child {\n margin-bottom: 0;\n }\n }\n\n // Order is not necessary but a good indicator\n .media-upload-icon {\n order: 1;\n justify-content: left;\n }\n\n .emoji-icon {\n order: 2;\n justify-content: center;\n }\n\n .poll-icon {\n order: 3;\n justify-content: right;\n }\n\n .media-upload-icon,\n .poll-icon,\n .emoji-icon {\n font-size: 1.85em;\n line-height: 1.1;\n flex: 1;\n padding: 0 0.1em;\n display: flex;\n align-items: center;\n\n &.selected,\n &:hover {\n // needs to be specific to override icon default color\n svg,\n i,\n label {\n color: $fallback--lightText;\n color: var(--lightText, $fallback--lightText);\n }\n }\n\n &.disabled {\n svg,\n i {\n cursor: not-allowed;\n color: $fallback--icon;\n color: var(--btnDisabledText, $fallback--icon);\n\n &:hover {\n color: $fallback--icon;\n color: var(--btnDisabledText, $fallback--icon);\n }\n }\n }\n }\n\n .error {\n text-align: center;\n }\n\n .media-upload-wrapper {\n margin-right: 0.2em;\n margin-bottom: 0.5em;\n width: 18em;\n\n img,\n video {\n object-fit: contain;\n max-height: 10em;\n }\n\n .video {\n max-height: 10em;\n }\n\n input {\n flex: 1;\n width: 100%;\n }\n }\n\n .status-input-wrapper {\n display: flex;\n position: relative;\n width: 100%;\n flex-direction: column;\n }\n\n .btn[disabled] {\n cursor: not-allowed;\n }\n\n form {\n display: flex;\n flex-direction: column;\n margin: 0.6em;\n position: relative;\n }\n\n .form-group {\n display: flex;\n flex-direction: column;\n padding: 0.25em 0.5em 0.5em;\n line-height: 1.85;\n }\n\n .form-post-body {\n // TODO: make a resizable textarea component?\n box-sizing: content-box; // needed for easier computation of dynamic size\n overflow: hidden;\n transition: min-height 200ms 100ms;\n // stock padding + 1 line of text (for counter)\n padding-bottom: calc(var(--_padding) + var(--post-line-height) * 1em);\n // two lines of text\n height: calc(var(--post-line-height) * 1em);\n min-height: calc(var(--post-line-height) * 1em);\n resize: none;\n\n &.scrollable-form {\n overflow-y: auto;\n }\n }\n\n .main-input {\n position: relative;\n }\n\n .character-counter {\n position: absolute;\n bottom: 0;\n right: 0;\n padding: 0;\n margin: 0 0.5em;\n\n &.error {\n color: $fallback--cRed;\n color: var(--cRed, $fallback--cRed);\n }\n }\n\n @keyframes fade-in {\n from { opacity: 0; }\n to { opacity: 0.6; }\n }\n\n @keyframes fade-out {\n from { opacity: 0.6; }\n to { opacity: 0; }\n }\n\n .drop-indicator {\n position: absolute;\n width: 100%;\n height: 100%;\n font-size: 5em;\n display: flex;\n align-items: center;\n justify-content: center;\n opacity: 0.6;\n color: $fallback--text;\n color: var(--text, $fallback--text);\n background-color: $fallback--bg;\n background-color: var(--bg, $fallback--bg);\n border-radius: $fallback--tooltipRadius;\n border-radius: var(--tooltipRadius, $fallback--tooltipRadius);\n border: 2px dashed $fallback--text;\n border: 2px dashed var(--text, $fallback--text);\n }\n}\n","\n.remote-follow {\n max-width: 220px;\n\n .remote-button {\n width: 100%;\n min-height: 2em;\n }\n}\n","\n@import \"../../variables\";\n\n// TODO: unify with other modals.\n.dark-overlay {\n &::before {\n bottom: 0;\n content: \" \";\n display: block;\n cursor: default;\n left: 0;\n position: fixed;\n right: 0;\n top: 0;\n background: rgb(27 31 35 / 50%);\n z-index: 2000;\n }\n}\n\n.dialog-modal.panel {\n top: 0;\n left: 50%;\n max-height: 80vh;\n max-width: 90vw;\n margin: 15vh auto;\n position: fixed;\n transform: translateX(-50%);\n z-index: 2001;\n cursor: default;\n display: block;\n background-color: $fallback--bg;\n background-color: var(--bg, $fallback--bg);\n\n .dialog-modal-heading {\n .title {\n text-align: center;\n }\n }\n\n .dialog-modal-content {\n margin: 0;\n padding: 1rem;\n background-color: $fallback--bg;\n background-color: var(--bg, $fallback--bg);\n white-space: normal;\n }\n\n .dialog-modal-footer {\n margin: 0;\n padding: 0.5em;\n background-color: $fallback--bg;\n background-color: var(--bg, $fallback--bg);\n border-top: 1px solid $fallback--border;\n border-top: 1px solid var(--border, $fallback--border);\n display: flex;\n justify-content: flex-end;\n\n button {\n width: auto;\n margin-left: 0.5rem;\n }\n }\n}\n\n","\n@import \"../../variables\";\n\n.moderation-tools-popover {\n height: 100%;\n\n .trigger {\n /* stylelint-disable-next-line declaration-no-important */\n display: flex !important;\n height: 100%;\n }\n}\n\n.moderation-tools-button {\n svg,\n i {\n font-size: 0.8em;\n }\n}\n","\n@import \"../../variables\";\n\n.AccountActions {\n .ellipsis-button {\n width: 2.5em;\n margin: -0.5em 0;\n padding: 0.5em 0;\n text-align: center;\n\n &:not(:hover) .icon {\n color: $fallback--lightText;\n color: var(--lightText, $fallback--lightText);\n }\n }\n}\n","\n@import \"../../variables\";\n\n.user-note {\n display: flex;\n flex-direction: column;\n\n .heading {\n display: flex;\n flex-direction: row;\n justify-content: space-between;\n align-items: center;\n margin-bottom: 0.75em;\n\n .btn {\n min-width: 95px;\n }\n\n .buttons {\n display: flex;\n flex-direction: row;\n justify-content: right;\n\n .btn {\n margin-left: 0.5em;\n }\n }\n }\n\n .note-text {\n align-self: stretch;\n }\n\n .note-text.-blank {\n font-style: italic;\n color: var(--faint, $fallback--faint);\n }\n}\n","@import \"../../variables\";\n\n.user-card {\n position: relative;\n z-index: 1;\n\n &:hover {\n --_still-image-img-visibility: visible;\n --_still-image-canvas-visibility: hidden;\n --_still-image-label-visibility: hidden;\n }\n\n .panel-heading {\n padding: 0.5em 0;\n text-align: center;\n box-shadow: none;\n background: transparent;\n flex-direction: column;\n align-items: stretch;\n // create new stacking context\n position: relative;\n }\n\n .panel-body {\n word-wrap: break-word;\n border-bottom-right-radius: inherit;\n border-bottom-left-radius: inherit;\n // create new stacking context\n position: relative;\n }\n\n .background-image {\n position: absolute;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n mask:\n linear-gradient(to top, white, transparent) bottom no-repeat,\n linear-gradient(to top, white, white);\n // Autoprefixer seem to ignore this one, and also syntax is different\n mask-composite: xor;\n mask-composite: exclude;\n background-size: cover;\n mask-size: 100% 60%;\n border-top-left-radius: calc(var(--__roundnessTop, --panelRadius) - 1px);\n border-top-right-radius: calc(var(--__roundnessTop, --panelRadius) - 1px);\n border-bottom-left-radius: calc(var(--__roundnessBottom, --panelRadius) - 1px);\n border-bottom-right-radius: calc(var(--__roundnessBottom, --panelRadius) - 1px);\n background-color: var(--profileBg);\n z-index: -2;\n\n &.hide-bio {\n mask-size: 100% 40px;\n }\n }\n\n &-bio {\n text-align: center;\n display: block;\n line-height: 1.3;\n padding: 1em;\n margin: 0;\n\n a {\n color: $fallback--link;\n color: var(--postLink, $fallback--link);\n }\n\n img {\n object-fit: contain;\n vertical-align: middle;\n max-width: 100%;\n max-height: 400px;\n }\n }\n\n &.-rounded-t {\n border-top-left-radius: $fallback--panelRadius;\n border-top-left-radius: var(--panelRadius, $fallback--panelRadius);\n border-top-right-radius: $fallback--panelRadius;\n border-top-right-radius: var(--panelRadius, $fallback--panelRadius);\n\n --__roundnessTop: var(--panelRadius);\n --__roundnessBottom: 0;\n }\n\n &.-rounded {\n border-radius: $fallback--panelRadius;\n border-radius: var(--panelRadius, $fallback--panelRadius);\n\n --__roundnessTop: var(--panelRadius);\n --__roundnessBottom: var(--panelRadius);\n }\n\n &.-popover {\n border-radius: $fallback--tooltipRadius;\n border-radius: var(--tooltipRadius, $fallback--tooltipRadius);\n\n --__roundnessTop: var(--tooltipRadius);\n --__roundnessBottom: var(--tooltipRadius);\n }\n\n &.-bordered {\n border-width: 1px;\n border-style: solid;\n border-color: $fallback--border;\n border-color: var(--border, $fallback--border);\n }\n}\n\n.user-info {\n color: $fallback--lightText;\n color: var(--lightText, $fallback--lightText);\n padding: 0 26px;\n\n a {\n color: $fallback--lightText;\n color: var(--lightText, $fallback--lightText);\n\n &:hover {\n color: var(--icon);\n }\n }\n\n .container {\n min-width: 0;\n padding: 16px 0 6px;\n display: flex;\n align-items: flex-start;\n max-height: 56px;\n\n > * {\n min-width: 0;\n }\n\n > a {\n vertical-align: middle;\n display: flex;\n }\n\n .Avatar {\n --_avatarShadowBox: var(--avatarShadow);\n --_avatarShadowFilter: var(--avatarShadowFilter);\n --_avatarShadowInset: var(--avatarShadowInset);\n\n width: 56px;\n height: 56px;\n object-fit: cover;\n }\n }\n\n &-avatar {\n position: relative;\n cursor: pointer;\n\n &.-overlay {\n position: absolute;\n left: 0;\n top: 0;\n right: 0;\n bottom: 0;\n background-color: rgb(0 0 0 / 30%);\n display: flex;\n justify-content: center;\n align-items: center;\n border-radius: $fallback--avatarRadius;\n border-radius: var(--avatarRadius, $fallback--avatarRadius);\n opacity: 0;\n transition: opacity 0.2s ease;\n\n svg {\n color: #fff;\n }\n }\n\n &:hover &.-overlay {\n opacity: 1;\n }\n }\n\n .external-link-button,\n .edit-profile-button {\n cursor: pointer;\n width: 2.5em;\n text-align: center;\n margin: -0.5em 0;\n padding: 0.5em 0;\n\n &:not(:hover) .icon {\n color: $fallback--lightText;\n color: var(--lightText, $fallback--lightText);\n }\n }\n\n .bottom-line {\n font-weight: light;\n font-size: 1.1em;\n align-items: baseline;\n\n .lock-icon {\n margin-left: 0.5em;\n }\n\n .user-screen-name {\n min-width: 1px;\n flex: 0 1 auto;\n text-overflow: ellipsis;\n overflow: hidden;\n }\n\n .dailyAvg {\n min-width: 1px;\n flex: 0 0 auto;\n margin-left: 1em;\n font-size: 0.7em;\n color: $fallback--text;\n color: var(--text, $fallback--text);\n }\n\n .user-role {\n flex: none;\n color: $fallback--text;\n color: var(--alertNeutralText, $fallback--text);\n background-color: $fallback--fg;\n background-color: var(--alertNeutral, $fallback--fg);\n }\n }\n\n .user-summary {\n display: block;\n margin-left: 0.6em;\n text-align: left;\n text-overflow: ellipsis;\n white-space: nowrap;\n flex: 1 1 0;\n // This is so that text doesn't get overlapped by avatar's shadow if it has\n // big one\n z-index: 1;\n line-height: 2em;\n\n --emoji-size: 1.7em;\n\n .top-line,\n .bottom-line {\n display: flex;\n }\n }\n\n .user-name {\n text-overflow: ellipsis;\n overflow: hidden;\n flex: 1 1 auto;\n margin-right: 1em;\n font-size: 1.1em;\n }\n\n .user-meta {\n margin-bottom: 0.15em;\n display: flex;\n align-items: baseline;\n line-height: 22px;\n flex-wrap: wrap;\n\n .following {\n flex: 1 0 auto;\n margin: 0;\n margin-bottom: 0.25em;\n text-align: left;\n }\n\n .highlighter {\n flex: 0 1 auto;\n display: flex;\n flex-wrap: wrap;\n margin-right: -0.5em;\n align-self: start;\n\n .userHighlightCl {\n padding: 2px 10px;\n flex: 1 0 auto;\n }\n\n .userHighlightSel {\n padding-top: 0;\n padding-bottom: 0;\n flex: 1 0 auto;\n }\n\n .userHighlightText {\n width: 70px;\n flex: 1 0 auto;\n }\n\n .userHighlightCl,\n .userHighlightText,\n .userHighlightSel {\n vertical-align: top;\n margin-right: 0.5em;\n margin-bottom: 0.25em;\n }\n }\n }\n\n .user-interactions {\n position: relative;\n display: flex;\n flex-flow: row wrap;\n margin-right: -0.75em;\n\n > * {\n margin: 0 0.75em 0.6em 0;\n white-space: nowrap;\n min-width: 95px;\n }\n\n button {\n margin: 0;\n }\n }\n\n .user-note {\n margin: 0 0.75em 0.6em 0;\n }\n}\n\n.sidebar .edit-profile-button {\n display: none;\n}\n\n.user-counts {\n display: flex;\n line-height: 16px;\n padding: 0.5em 1.5em 0;\n text-align: center;\n justify-content: space-between;\n color: $fallback--lightText;\n color: var(--lightText, $fallback--lightText);\n flex-wrap: wrap;\n}\n\n.user-count {\n flex: 1 0 auto;\n padding: 0.5em 0;\n margin: 0 0.5em;\n\n h5 {\n font-size: 1em;\n font-weight: bolder;\n margin: 0 0 0.25em;\n }\n\n /* stylelint-disable-next-line no-descending-specificity */\n a {\n text-decoration: none;\n }\n}\n\n.mute-expiry {\n display: flex;\n flex-direction: row;\n}\n","\n.user-panel .signed-in {\n overflow: visible;\n z-index: 10;\n}\n","\n@import \"../../variables\";\n\n.NavigationEntry {\n display: flex;\n box-sizing: border-box;\n align-items: baseline;\n height: 3.5em;\n line-height: 3.5em;\n padding: 0 1em;\n width: 100%;\n color: $fallback--link;\n color: var(--link, $fallback--link);\n\n .timelines-chevron {\n margin-right: 0;\n }\n\n .main-link {\n flex: 1;\n }\n\n .menu-icon {\n margin-right: 0.8em;\n }\n\n .extra-button {\n width: 3em;\n text-align: center;\n\n &:last-child {\n margin-right: -0.8em;\n }\n }\n\n &:hover {\n background-color: $fallback--lightBg;\n background-color: var(--selectedMenu, $fallback--lightBg);\n color: $fallback--link;\n color: var(--selectedMenuText, $fallback--link);\n\n --faint: var(--selectedMenuFaintText, $fallback--faint);\n --faintLink: var(--selectedMenuFaintLink, $fallback--faint);\n --lightText: var(--selectedMenuLightText, $fallback--lightText);\n\n .menu-icon {\n --icon: var(--text, $fallback--icon);\n }\n }\n\n &.-active {\n font-weight: bolder;\n background-color: $fallback--lightBg;\n background-color: var(--selectedMenu, $fallback--lightBg);\n color: $fallback--text;\n color: var(--selectedMenuText, $fallback--text);\n\n --faint: var(--selectedMenuFaintText, $fallback--faint);\n --faintLink: var(--selectedMenuFaintLink, $fallback--faint);\n --lightText: var(--selectedMenuLightText, $fallback--lightText);\n\n .menu-icon {\n --icon: var(--text, $fallback--icon);\n }\n\n &:hover {\n text-decoration: underline;\n }\n }\n}\n","\n@import \"../../variables\";\n\n.NavigationPins {\n display: flex;\n flex-wrap: wrap;\n overflow: hidden;\n height: 100%;\n\n .alert-dot {\n border-radius: 100%;\n height: 0.5em;\n width: 0.5em;\n position: absolute;\n right: calc(50% - 0.75em);\n top: calc(50% - 0.5em);\n background-color: $fallback--cRed;\n background-color: var(--badgeNotification, $fallback--cRed);\n }\n\n .pinned-item {\n position: relative;\n flex: 1 0 3em;\n min-width: 2em;\n text-align: center;\n overflow: visible;\n box-sizing: border-box;\n height: 100%;\n\n & .svg-inline--fa,\n & .iconLetter {\n margin: 0;\n }\n\n &.router-link-active {\n color: $fallback--text;\n color: var(--panelText, $fallback--text);\n border-bottom: 4px solid;\n\n & .svg-inline--fa,\n & .iconLetter {\n color: inherit;\n }\n }\n }\n}\n","\n@import \"../../variables\";\n\n.NavPanel {\n .panel {\n overflow: hidden;\n box-shadow: var(--panelShadow);\n }\n\n ul {\n list-style: none;\n margin: 0;\n padding: 0;\n }\n\n li {\n position: relative;\n border-bottom: 1px solid;\n border-color: $fallback--border;\n border-color: var(--border, $fallback--border);\n }\n\n > li {\n &:first-child .menu-item {\n border-top-right-radius: $fallback--panelRadius;\n border-top-right-radius: var(--panelRadius, $fallback--panelRadius);\n border-top-left-radius: $fallback--panelRadius;\n border-top-left-radius: var(--panelRadius, $fallback--panelRadius);\n }\n\n &:last-child .menu-item {\n border-bottom-right-radius: $fallback--panelRadius;\n border-bottom-right-radius: var(--panelRadius, $fallback--panelRadius);\n border-bottom-left-radius: $fallback--panelRadius;\n border-bottom-left-radius: var(--panelRadius, $fallback--panelRadius);\n }\n }\n\n li:last-child {\n border: none;\n }\n\n .navigation-chevron {\n margin-left: 0.8em;\n margin-right: 0.8em;\n font-size: 1.1em;\n }\n\n .timelines-chevron {\n margin-left: 0.8em;\n font-size: 1.1em;\n }\n\n .timelines-background {\n padding: 0 0 0 0.6em;\n background-color: $fallback--lightBg;\n background-color: var(--selectedMenu, $fallback--lightBg);\n border-bottom: 1px solid;\n border-color: $fallback--border;\n border-color: var(--border, $fallback--border);\n }\n\n .timelines {\n background-color: $fallback--bg;\n background-color: var(--bg, $fallback--bg);\n }\n\n .nav-panel-heading {\n // breaks without a unit\n // stylelint-disable-next-line length-zero-no-unit\n --panel-heading-height-padding: 0px;\n }\n}\n","\n .features-panel li {\n line-height: 24px;\n }\n","\n .who-to-follow * {\n vertical-align: middle;\n }\n\n .who-to-follow img {\n width: 32px;\n height: 32px;\n }\n\n .who-to-follow {\n padding: 0 1em;\n margin: 0;\n }\n\n .who-to-follow-items {\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n padding: 0;\n margin: 1em 0;\n }\n\n .who-to-follow-more {\n padding: 0;\n margin: 1em 0;\n text-align: center;\n }\n","\n@import \"../../variables\";\n\n.floating-shout {\n position: fixed;\n bottom: 0.5em;\n z-index: var(--ZI_popovers);\n max-width: 25em;\n\n &.-left {\n left: 0.5em;\n }\n\n &:not(.-left) {\n right: 0.5em;\n }\n}\n\n.shout-panel {\n .shout-heading {\n cursor: pointer;\n\n .icon {\n color: $fallback--text;\n color: var(--panelText, $fallback--text);\n margin-right: 0.5em;\n }\n\n .title {\n display: flex;\n justify-content: space-between;\n align-items: center;\n }\n }\n\n .shout-window {\n overflow-y: auto;\n overflow-x: hidden;\n max-height: 20em;\n }\n\n .shout-window-container {\n height: 100%;\n }\n\n .shout-message {\n display: flex;\n padding: 0.2em 0.5em;\n }\n\n .shout-avatar {\n img {\n height: 24px;\n width: 24px;\n border-radius: $fallback--avatarRadius;\n border-radius: var(--avatarRadius, $fallback--avatarRadius);\n margin-right: 0.5em;\n margin-top: 0.25em;\n }\n }\n\n .shout-input {\n display: flex;\n\n textarea {\n flex: 1;\n margin: 0.6em;\n min-height: 3.5em;\n resize: none;\n }\n }\n\n .shout-panel {\n .title {\n display: flex;\n justify-content: space-between;\n }\n }\n}\n","\n$modal-view-button-icon-height: 3em;\n$modal-view-button-icon-half-height: calc(#{$modal-view-button-icon-height} / 2);\n$modal-view-button-icon-width: 3em;\n$modal-view-button-icon-margin: 0.5em;\n\n.media-modal-view {\n @keyframes media-fadein {\n from {\n opacity: 0;\n }\n\n to {\n opacity: 1;\n }\n }\n\n .modal-image-container {\n display: flex;\n overflow: hidden;\n align-items: center;\n flex-direction: column;\n max-width: 100%;\n max-height: 100%;\n width: 100%;\n height: 100%;\n flex-grow: 1;\n justify-content: center;\n\n &-inner {\n width: 100%;\n height: 100%;\n flex-grow: 1;\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n }\n }\n\n .description,\n .counter {\n /* Hardcoded since background is also hardcoded */\n color: white;\n margin-top: 1em;\n text-shadow: 0 0 10px black, 0 0 10px black;\n padding: 0.2em 2em;\n }\n\n .description {\n flex: 0 0 auto;\n overflow-y: auto;\n min-height: 1em;\n max-width: 500px;\n max-height: 9.5em;\n word-break: break-all;\n }\n\n .modal-image {\n max-width: 100%;\n max-height: 100%;\n image-orientation: from-image; // NOTE: only FF supports this\n animation: 0.1s cubic-bezier(0.7, 0, 1, 0.6) media-fadein;\n\n &.loading {\n opacity: 0.5;\n }\n }\n\n .loading-spinner {\n width: 100%;\n height: 100%;\n position: absolute;\n pointer-events: none;\n display: flex;\n justify-content: center;\n align-items: center;\n\n svg {\n color: white;\n }\n }\n\n .modal-view-button {\n border: 0;\n padding: 0;\n opacity: 0;\n box-shadow: none;\n background: none;\n appearance: none;\n overflow: visible;\n cursor: pointer;\n transition: opacity 333ms cubic-bezier(0.4, 0, 0.22, 1);\n height: $modal-view-button-icon-height;\n width: $modal-view-button-icon-width;\n\n .button-icon {\n position: absolute;\n height: $modal-view-button-icon-height;\n width: $modal-view-button-icon-width;\n font-size: 1rem;\n line-height: $modal-view-button-icon-height;\n color: #fff;\n text-align: center;\n background-color: rgb(0 0 0 / 30%);\n }\n }\n\n .modal-view-button-arrow {\n position: absolute;\n display: block;\n top: 50%;\n margin-top: $modal-view-button-icon-half-height;\n width: $modal-view-button-icon-width;\n height: $modal-view-button-icon-height;\n\n .arrow-icon {\n position: absolute;\n top: 0;\n line-height: $modal-view-button-icon-height;\n color: #fff;\n text-align: center;\n background-color: rgb(0 0 0 / 30%);\n }\n\n &--prev {\n left: 0;\n\n .arrow-icon {\n left: $modal-view-button-icon-margin;\n }\n }\n\n &--next {\n right: 0;\n\n .arrow-icon {\n right: $modal-view-button-icon-margin;\n }\n }\n }\n\n .modal-view-button-hide {\n position: absolute;\n top: 0;\n right: 0;\n\n .button-icon {\n top: $modal-view-button-icon-margin;\n right: $modal-view-button-icon-margin;\n }\n }\n}\n\n.modal-view.media-modal-view {\n z-index: var(--ZI_media_modal);\n flex-direction: column;\n\n .modal-view-button-arrow,\n .modal-view-button-hide {\n opacity: 0.75;\n\n &:focus,\n &:hover {\n outline: none;\n box-shadow: none;\n }\n\n &:hover {\n opacity: 1;\n }\n }\n\n overflow: hidden;\n}\n","\n@import \"../../variables\";\n\n.side-drawer-container {\n position: fixed;\n z-index: var(--ZI_navbar);\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n display: flex;\n align-items: stretch;\n transition-duration: 0s;\n transition-property: transform;\n}\n\n.side-drawer-container-open {\n transform: translate(0%);\n}\n\n.side-drawer-container-closed {\n transition-delay: 0.35s;\n transform: translate(-100%);\n}\n\n.side-drawer-darken {\n top: 0;\n left: 0;\n width: 100vw;\n height: 100vh;\n position: fixed;\n z-index: -1;\n transition: 0.35s;\n transition-property: background-color;\n background-color: rgb(0 0 0 / 50%);\n}\n\n.side-drawer-darken-closed {\n background-color: rgb(0 0 0 / 0%);\n}\n\n.side-drawer-click-outside {\n flex: 1 1 100%;\n}\n\n.side-drawer {\n overflow-x: hidden;\n transition: 0.35s;\n transition-timing-function: cubic-bezier(0, 1, 0.5, 1);\n transition-property: transform;\n margin: 0 0 0 -100px;\n padding: 0 0 1em 100px;\n width: 80%;\n max-width: 20em;\n flex: 0 0 80%;\n box-shadow: 1px 1px 4px rgb(0 0 0 / 60%);\n box-shadow: var(--panelShadow);\n background-color: $fallback--bg;\n background-color: var(--popover, $fallback--bg);\n color: $fallback--link;\n color: var(--popoverText, $fallback--link);\n\n --faint: var(--popoverFaintText, $fallback--faint);\n --faintLink: var(--popoverFaintLink, $fallback--faint);\n --lightText: var(--popoverLightText, $fallback--lightText);\n --icon: var(--popoverIcon, $fallback--icon);\n\n .badge {\n margin-left: 10px;\n }\n}\n\n.side-drawer-logo-wrapper {\n display: flex;\n align-items: center;\n padding: 0.85em;\n\n img {\n flex: none;\n height: 50px;\n margin-right: 0.85em;\n }\n\n span {\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n }\n}\n\n.side-drawer-click-outside-closed {\n flex: 0 0 0;\n}\n\n.side-drawer-closed {\n transform: translate(-100%);\n}\n\n.side-drawer-heading {\n background: transparent;\n flex-direction: column;\n align-items: stretch;\n display: flex;\n padding: 0;\n margin: 0;\n}\n\n.side-drawer ul {\n list-style: none;\n margin: 0;\n padding: 0;\n border-bottom: 1px solid;\n border-color: $fallback--border;\n border-color: var(--border, $fallback--border);\n}\n\n.side-drawer ul:last-child {\n border: 0;\n}\n\n.side-drawer li {\n padding: 0;\n\n a,\n button {\n box-sizing: border-box;\n display: block;\n height: 3em;\n line-height: 3em;\n padding: 0 0.7em;\n\n &:hover {\n background-color: $fallback--lightBg;\n background-color: var(--selectedMenuPopover, $fallback--lightBg);\n color: $fallback--text;\n color: var(--selectedMenuPopoverText, $fallback--text);\n\n --faint: var(--selectedMenuPopoverFaintText, $fallback--faint);\n --faintLink: var(--selectedMenuPopoverFaintLink, $fallback--faint);\n --lightText: var(--selectedMenuPopoverLightText, $fallback--lightText);\n --icon: var(--selectedMenuPopoverIcon, $fallback--icon);\n }\n }\n}\n","\n@import \"../../variables\";\n\n.MobilePostButton {\n &.button-default {\n width: 5em;\n height: 5em;\n border-radius: 100%;\n position: fixed;\n bottom: 1.5em;\n right: 1.5em;\n // TODO: this needs its own color, it has to stand out enough and link color\n // is not very optimal for this particular use.\n background-color: $fallback--fg;\n background-color: var(--btn, $fallback--fg);\n display: flex;\n justify-content: center;\n align-items: center;\n box-shadow: 0 2px 2px rgb(0 0 0 / 30%), 0 4px 6px rgb(0 0 0 / 30%);\n z-index: 10;\n transition: 0.35s transform;\n transition-timing-function: cubic-bezier(0, 1, 0.5, 1);\n }\n\n &.hidden {\n transform: translateY(150%);\n }\n\n svg {\n font-size: 1.5em;\n color: $fallback--text;\n color: var(--text, $fallback--text);\n }\n}\n\n@media all and (min-width: 801px) {\n .new-status-button:not(.always-show) {\n display: none;\n }\n}\n\n","\n@import \"../../variables\";\n@import \"../../mixins\";\n\n.ReplyButton {\n display: flex;\n\n > :first-child {\n padding: 10px;\n margin: -10px -8px -10px -10px;\n }\n\n .action-counter {\n pointer-events: none;\n user-select: none;\n }\n\n .interactive {\n &:hover .svg-inline--fa,\n &.-active .svg-inline--fa {\n color: $fallback--cBlue;\n color: var(--cBlue, $fallback--cBlue);\n }\n\n @include unfocused-style {\n .focus-marker {\n visibility: hidden;\n }\n }\n\n @include focused-style {\n .focus-marker {\n visibility: visible;\n }\n }\n }\n}\n","\n@import \"../../variables\";\n@import \"../../mixins\";\n\n.FavoriteButton {\n display: flex;\n\n > :first-child {\n padding: 10px;\n margin: -10px -8px -10px -10px;\n }\n\n .action-counter {\n pointer-events: none;\n user-select: none;\n }\n\n .interactive {\n .svg-inline--fa {\n animation-duration: 0.6s;\n }\n\n &:hover .svg-inline--fa,\n &.-favorited .svg-inline--fa {\n color: $fallback--cOrange;\n color: var(--cOrange, $fallback--cOrange);\n }\n\n @include unfocused-style {\n .focus-marker {\n visibility: hidden;\n }\n\n .active-marker {\n visibility: visible;\n }\n }\n\n @include focused-style {\n .focus-marker {\n visibility: visible;\n }\n\n .active-marker {\n visibility: hidden;\n }\n }\n }\n}\n","\n@import \"../../variables\";\n@import \"../../mixins\";\n\n.ReactButton {\n .reaction-picker-filter {\n padding: 0.5em;\n display: flex;\n\n input {\n flex: 1;\n }\n }\n\n .reaction-picker-divider {\n height: 1px;\n width: 100%;\n margin: 0.5em;\n background-color: var(--border, $fallback--border);\n }\n\n .reaction-picker {\n width: 10em;\n height: 9em;\n font-size: 1.5em;\n overflow-y: scroll;\n display: flex;\n flex-wrap: wrap;\n padding: 0.5em;\n text-align: center;\n align-content: flex-start;\n user-select: none;\n mask:\n linear-gradient(to top, white 0, transparent 100%) bottom no-repeat,\n linear-gradient(to bottom, white 0, transparent 100%) top no-repeat,\n linear-gradient(to top, white, white);\n transition: mask-size 150ms;\n mask-size: 100% 20px, 100% 20px, auto;\n\n /* Autoprefixed seem to ignore this one, and also syntax is different */\n mask-composite: xor;\n mask-composite: exclude;\n\n .emoji-button {\n cursor: pointer;\n flex-basis: 20%;\n line-height: 1.5;\n align-content: center;\n\n &:hover {\n transform: scale(1.25);\n }\n }\n }\n\n .popover-trigger {\n padding: 10px;\n margin: -10px;\n\n &:hover .svg-inline--fa {\n color: $fallback--text;\n color: var(--text, $fallback--text);\n }\n\n @include unfocused-style {\n .focus-marker {\n visibility: hidden;\n }\n }\n\n @include focused-style {\n .focus-marker {\n visibility: visible;\n }\n }\n }\n}\n\n","\n@import \"../../variables\";\n@import \"../../mixins\";\n\n.RetweetButton {\n display: flex;\n\n > :first-child {\n padding: 10px;\n margin: -10px -8px -10px -10px;\n }\n\n .action-counter {\n pointer-events: none;\n user-select: none;\n }\n\n .interactive {\n .svg-inline--fa {\n animation-duration: 0.6s;\n }\n\n &:hover .svg-inline--fa,\n &.-repeated .svg-inline--fa {\n color: $fallback--cGreen;\n color: var(--cGreen, $fallback--cGreen);\n }\n\n @include unfocused-style {\n .focus-marker {\n visibility: hidden;\n }\n\n .active-marker {\n visibility: visible;\n }\n }\n\n @include focused-style {\n .focus-marker {\n visibility: visible;\n }\n\n .active-marker {\n visibility: hidden;\n }\n }\n }\n}\n","\n@import \"../../variables\";\n@import \"../../mixins\";\n\n.ExtraButtons {\n .popover-trigger {\n position: static;\n padding: 10px;\n margin: -10px;\n\n &:hover .svg-inline--fa {\n color: $fallback--text;\n color: var(--text, $fallback--text);\n }\n }\n\n .popover-trigger-button {\n /* override of popover internal stuff */\n width: auto;\n\n @include unfocused-style {\n .focus-marker {\n visibility: hidden;\n }\n }\n\n @include focused-style {\n .focus-marker {\n visibility: visible;\n }\n }\n }\n}\n","\n@import \"../../variables\";\n\n.avatars {\n display: flex;\n margin: 0;\n padding: 0;\n\n // For hiding overflowing elements\n flex-wrap: wrap;\n height: 24px;\n\n .avatars-item {\n margin: 0 0 5px 5px;\n\n &:first-child {\n padding-left: 5px;\n }\n\n .avatar-small {\n border-radius: $fallback--avatarAltRadius;\n border-radius: var(--avatarAltRadius, $fallback--avatarAltRadius);\n height: 24px;\n width: 24px;\n }\n }\n}\n","\n@import \"../../variables\";\n\n/* popover styles load on-demand, so we need to override */\n.status-popover.popover {\n font-size: 1rem;\n min-width: 15em;\n max-width: 95%;\n border-color: $fallback--border;\n border-color: var(--border, $fallback--border);\n border-style: solid;\n border-width: 1px;\n border-radius: $fallback--tooltipRadius;\n border-radius: var(--tooltipRadius, $fallback--tooltipRadius);\n\n /* TODO cleanup this */\n .Status.Status {\n border: none;\n }\n\n .status-preview-no-content {\n padding: 1em;\n text-align: center;\n\n i {\n font-size: 2em;\n }\n }\n}\n\n","\n@import \"../../variables\";\n\n.user-list-popover {\n padding: 0.5em;\n\n --emoji-size: 16px;\n\n .user-list-row {\n padding: 0.25em;\n display: flex;\n flex-direction: row;\n\n .user-list-names {\n display: flex;\n flex-direction: column;\n margin-left: 0.5em;\n min-width: 5em;\n\n img {\n width: 1em;\n height: 1em;\n }\n }\n\n .user-list-screen-name {\n font-size: 0.65em;\n }\n }\n}\n\n","\n@import \"../../variables\";\n@import \"../../mixins\";\n\n.EmojiReactions {\n display: flex;\n margin-top: 0.25em;\n flex-wrap: wrap;\n\n --emoji-size: calc(1.25em * var(--emojiReactionsScale, 1));\n\n .emoji-reaction-container {\n display: flex;\n align-items: stretch;\n margin-top: 0.5em;\n margin-right: 0.5em;\n\n .emoji-reaction-popover {\n padding: 0;\n\n .emoji-reaction-count-button {\n background-color: var(--btn);\n margin: 0;\n height: 100%;\n border-top-left-radius: 0;\n border-bottom-left-radius: 0;\n box-sizing: border-box;\n min-width: 2em;\n display: inline-flex;\n justify-content: center;\n align-items: center;\n color: $fallback--text;\n color: var(--btnText, $fallback--text);\n\n &.-picked-reaction {\n border: 1px solid var(--accent, $fallback--link);\n margin-right: -1px;\n }\n }\n }\n }\n\n .emoji-reaction {\n padding-left: 0.5em;\n display: flex;\n align-items: center;\n justify-content: center;\n box-sizing: border-box;\n border-top-right-radius: 0;\n border-bottom-right-radius: 0;\n margin: 0;\n\n .reaction-emoji {\n width: var(--emoji-size);\n height: var(--emoji-size);\n margin-right: 0.25em;\n line-height: var(--emoji-size);\n display: flex;\n justify-content: center;\n align-items: center;\n }\n\n .reaction-emoji-content {\n max-width: 100%;\n max-height: 100%;\n width: auto;\n height: auto;\n line-height: inherit;\n overflow: hidden;\n font-size: calc(var(--emoji-size) * 0.8);\n margin: 0;\n }\n\n &:focus {\n outline: none;\n }\n\n .svg-inline--fa {\n color: $fallback--text;\n color: var(--btnText, $fallback--text);\n }\n\n &.-picked-reaction {\n border: 1px solid var(--accent, $fallback--link);\n margin-left: -1px; // offset the border, can't use inset shadows either\n margin-right: -1px;\n\n .svg-inline--fa {\n color: $fallback--link;\n color: var(--accent, $fallback--link);\n }\n }\n\n @include unfocused-style {\n .focus-marker {\n visibility: hidden;\n }\n\n .active-marker {\n visibility: visible;\n }\n }\n\n @include focused-style {\n .svg-inline--fa {\n color: $fallback--link;\n color: var(--accent, $fallback--link);\n }\n\n .focus-marker {\n visibility: visible;\n }\n\n .active-marker {\n visibility: hidden;\n }\n }\n }\n\n .emoji-reaction-expand {\n padding: 0 0.5em;\n margin-right: 0.5em;\n margin-top: 0.5em;\n display: flex;\n align-items: center;\n justify-content: center;\n\n &:hover {\n text-decoration: underline;\n }\n }\n}\n","@import \"../../variables\";\n\n.Status {\n min-width: 0;\n white-space: normal;\n word-wrap: break-word;\n word-break: break-word;\n\n &:hover {\n --_still-image-img-visibility: visible;\n --_still-image-canvas-visibility: hidden;\n --_still-image-label-visibility: hidden;\n }\n\n &.-focused {\n background-color: $fallback--lightBg;\n background-color: var(--selectedPost, $fallback--lightBg);\n color: $fallback--text;\n color: var(--selectedPostText, $fallback--text);\n\n --lightText: var(--selectedPostLightText, $fallback--light);\n --faint: var(--selectedPostFaintText, $fallback--faint);\n --faintLink: var(--selectedPostFaintLink, $fallback--faint);\n --postLink: var(--selectedPostPostLink, $fallback--faint);\n --postFaintLink: var(--selectedPostFaintPostLink, $fallback--faint);\n --icon: var(--selectedPostIcon, $fallback--icon);\n }\n\n .gravestone {\n padding: var(--status-margin, $status-margin);\n color: $fallback--faint;\n color: var(--faint, $fallback--faint);\n display: flex;\n\n .deleted-text {\n margin: 0.5em 0;\n align-items: center;\n }\n }\n\n .status-container {\n display: flex;\n padding: var(--status-margin, $status-margin);\n\n > * {\n min-width: 0;\n }\n\n &.-repeat {\n padding-top: 0;\n }\n }\n\n .pin {\n padding: var(--status-margin, $status-margin) var(--status-margin, $status-margin) 0;\n display: flex;\n align-items: center;\n justify-content: flex-end;\n }\n\n ._misclick-prevention & {\n pointer-events: none;\n\n .attachments {\n pointer-events: initial;\n cursor: initial;\n }\n }\n\n .left-side {\n margin-right: var(--status-margin, $status-margin);\n }\n\n .right-side {\n flex: 1;\n min-width: 0;\n }\n\n .usercard {\n margin-bottom: var(--status-margin, $status-margin);\n }\n\n .status-username {\n white-space: nowrap;\n overflow: hidden;\n max-width: 85%;\n font-weight: bold;\n flex-shrink: 1;\n margin-right: 0.4em;\n text-overflow: ellipsis;\n\n --_still_image-label-scale: 0.25;\n --emoji-size: 14px;\n }\n\n .status-favicon {\n height: 18px;\n width: 18px;\n margin-right: 0.4em;\n }\n\n .status-heading {\n margin-bottom: 0.5em;\n }\n\n .heading-name-row {\n display: flex;\n justify-content: space-between;\n line-height: 1.3;\n\n a {\n display: inline-block;\n word-break: break-all;\n }\n }\n\n .account-name {\n min-width: 1.6em;\n margin-right: 0.4em;\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n flex: 1 1 0;\n }\n\n .heading-left {\n display: flex;\n min-width: 0;\n }\n\n .heading-right {\n display: flex;\n flex-shrink: 0;\n\n .button-unstyled {\n padding: 5px;\n margin: -5px;\n\n &:hover svg {\n color: $fallback--lightText;\n color: var(--lightText, $fallback--lightText);\n }\n }\n\n .svg-inline--fa {\n margin-left: 0.25em;\n }\n }\n\n .glued-label {\n display: inline-flex;\n white-space: nowrap;\n }\n\n .timeago {\n margin-right: 0.2em;\n }\n\n & .heading-reply-row,\n & .heading-edited-row {\n position: relative;\n align-content: baseline;\n font-size: 0.85em;\n margin-top: 0.2em;\n line-height: 130%;\n max-width: 100%;\n align-items: stretch;\n }\n\n & .reply-to-popover,\n & .reply-to-no-popover,\n & .mentions {\n min-width: 0;\n margin-right: 0.4em;\n flex-shrink: 0;\n }\n\n .reply-glued-label {\n margin-right: 0.5em;\n }\n\n .reply-to-popover {\n .reply-to:hover::before {\n content: \"\";\n display: block;\n position: absolute;\n bottom: 0;\n width: 100%;\n border-bottom: 1px solid var(--faint);\n pointer-events: none;\n }\n\n .faint-link:hover {\n // override default\n text-decoration: none;\n }\n\n &.-strikethrough {\n .reply-to::after {\n content: \"\";\n display: block;\n position: absolute;\n top: 50%;\n width: 100%;\n border-bottom: 1px solid var(--faint);\n pointer-events: none;\n }\n }\n }\n\n & .mentions,\n & .reply-to {\n white-space: nowrap;\n position: relative;\n }\n\n & .mentions-text,\n & .reply-to-text {\n color: var(--faint);\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n }\n\n .mentions-line {\n display: inline;\n }\n\n .replies {\n margin-top: 0.25em;\n line-height: 1.3;\n font-size: 0.85em;\n display: flex;\n flex-wrap: wrap;\n\n & > * {\n margin-right: 0.4em;\n }\n }\n\n .reply-link {\n height: 17px;\n }\n\n .repeat-info {\n padding: 0.4em var(--status-margin, $status-margin);\n\n .repeat-icon {\n color: $fallback--cGreen;\n color: var(--cGreen, $fallback--cGreen);\n }\n }\n\n .repeater-avatar {\n border-radius: var(--avatarAltRadius, $fallback--avatarAltRadius);\n margin-left: 28px;\n width: 20px;\n height: 20px;\n }\n\n .repeater-name {\n text-overflow: ellipsis;\n margin-right: 0;\n\n .emoji {\n width: 14px;\n height: 14px;\n vertical-align: middle;\n object-fit: contain;\n }\n }\n\n .status-fadein {\n animation-duration: 0.4s;\n animation-name: fadein;\n }\n\n @keyframes fadein {\n from {\n opacity: 0;\n }\n\n to {\n opacity: 1;\n }\n }\n\n .status-actions {\n position: relative;\n width: 100%;\n display: flex;\n margin-top: var(--status-margin, $status-margin);\n\n > * {\n max-width: 4em;\n flex: 1;\n }\n }\n\n .muted {\n padding: 0.25em 0.6em;\n height: 1.2em;\n line-height: 1.2em;\n text-overflow: ellipsis;\n overflow: hidden;\n display: flex;\n flex-wrap: nowrap;\n\n & .status-username,\n & .mute-thread,\n & .mute-words {\n word-wrap: normal;\n word-break: normal;\n white-space: nowrap;\n }\n\n & .status-username,\n & .mute-words {\n text-overflow: ellipsis;\n overflow: hidden;\n }\n\n .status-username {\n font-weight: normal;\n flex: 0 1 auto;\n margin-right: 0.2em;\n font-size: smaller;\n }\n\n .mute-thread {\n flex: 0 0 auto;\n }\n\n .mute-words {\n flex: 1 0 5em;\n margin-left: 0.2em;\n\n &::before {\n content: \" \";\n }\n }\n\n .unmute {\n flex: 0 0 auto;\n margin-left: auto;\n display: block;\n }\n }\n\n .reply-form {\n padding-top: 0;\n padding-bottom: 0;\n }\n\n .reply-body {\n flex: 1;\n }\n\n .favs-repeated-users {\n margin-top: var(--status-margin, $status-margin);\n }\n\n .stats {\n width: 100%;\n display: flex;\n line-height: 1em;\n }\n\n .avatar-row {\n flex: 1;\n overflow: hidden;\n position: relative;\n display: flex;\n align-items: center;\n\n &::before {\n content: \"\";\n position: absolute;\n height: 100%;\n width: 1px;\n left: 0;\n background-color: var(--faint, $fallback--faint);\n }\n }\n\n .stat-count {\n margin-right: var(--status-margin, $status-margin);\n user-select: none;\n\n .stat-title {\n color: var(--faint, $fallback--faint);\n font-size: 0.85em;\n text-transform: uppercase;\n position: relative;\n }\n\n .stat-number {\n font-weight: bolder;\n font-size: 1.1em;\n line-height: 1em;\n }\n\n &:hover .stat-title {\n text-decoration: underline;\n }\n }\n\n @media all and (max-width: 800px) {\n .repeater-avatar {\n margin-left: 20px;\n }\n\n .post-avatar {\n width: 40px;\n height: 40px;\n\n // TODO define those other way somehow?\n // stylelint-disable rscss/class-format\n &.-compact {\n width: 32px;\n height: 32px;\n }\n }\n }\n\n .quoted-status {\n margin-top: 0.5em;\n border: 1px solid var(--border, $fallback--border);\n border-radius: var(--attachmentRadius, $fallback--attachmentRadius);\n\n &.-unavailable-prompt {\n padding: 0.5em;\n }\n }\n\n .display-quoted-status-button {\n margin: 0.5em;\n\n &-icon {\n color: inherit;\n }\n }\n}\n","@import \"../../variables\";\n\n.Report {\n .report-content {\n margin: 0.5em 0 1em;\n }\n\n .report-state {\n margin: 0.5em 0 1em;\n }\n\n .reported-status {\n border: 1px solid $fallback--faint;\n border-color: var(--faint, $fallback--faint);\n border-radius: $fallback--inputRadius;\n border-radius: var(--inputRadius, $fallback--inputRadius);\n color: $fallback--text;\n color: var(--text, $fallback--text);\n display: block;\n padding: 0.5em;\n margin: 0.5em 0;\n\n .status-content {\n pointer-events: none;\n }\n\n .reported-status-heading {\n display: flex;\n width: 100%;\n justify-content: space-between;\n margin-bottom: 0.2em;\n }\n\n .reported-status-name {\n font-weight: bold;\n }\n }\n\n .note {\n width: 100%;\n margin-bottom: 0.5em;\n }\n}\n","@import \"../../variables\";\n\n// TODO Copypaste from Status, should unify it somehow\n.Notification {\n border-bottom: 1px solid;\n border-color: $fallback--border;\n border-color: var(--border, $fallback--border);\n word-wrap: break-word;\n word-break: break-word;\n\n --emoji-size: 14px;\n\n &:hover {\n --_still-image-img-visibility: visible;\n --_still-image-canvas-visibility: hidden;\n --_still-image-label-visibility: hidden;\n }\n\n &.-muted {\n padding: 0.25em 0.6em;\n height: 1.2em;\n line-height: 1.2em;\n text-overflow: ellipsis;\n overflow: hidden;\n display: flex;\n flex-wrap: nowrap;\n\n & .status-username,\n & .mute-thread,\n & .mute-words {\n word-wrap: normal;\n word-break: normal;\n white-space: nowrap;\n }\n\n & .status-username,\n & .mute-words {\n text-overflow: ellipsis;\n overflow: hidden;\n }\n\n .status-username {\n font-weight: normal;\n flex: 0 1 auto;\n margin-right: 0.2em;\n font-size: smaller;\n }\n\n .mute-thread {\n flex: 0 0 auto;\n }\n\n .mute-words {\n flex: 1 0 5em;\n margin-left: 0.2em;\n\n &::before {\n content: \" \";\n }\n }\n\n .unmute {\n flex: 0 0 auto;\n margin-left: auto;\n display: block;\n }\n }\n\n .type-icon {\n margin: 0 0.1em;\n }\n\n &.-type--repeat .type-icon {\n color: $fallback--cGreen;\n color: var(--cGreen, $fallback--cGreen);\n }\n\n &.-type--follow .type-icon {\n color: $fallback--cBlue;\n color: var(--cBlue, $fallback--cBlue);\n }\n\n &.-type--follow-request .type-icon {\n color: $fallback--cBlue;\n color: var(--cBlue, $fallback--cBlue);\n }\n\n &.-type--like .type-icon {\n color: orange;\n color: $fallback--cOrange;\n color: var(--cOrange, $fallback--cOrange);\n }\n\n &.-type--move .type-icon {\n color: $fallback--cBlue;\n color: var(--cBlue, $fallback--cBlue);\n }\n}\n","@import \"../../variables\";\n\n.Notifications {\n &:not(.minimal) {\n // a bit of a hack to allow scrolling below notifications\n padding-bottom: 15em;\n }\n\n .loadmore-error {\n color: $fallback--text;\n color: var(--text, $fallback--text);\n }\n\n .notification {\n position: relative;\n\n .notification-overlay {\n position: absolute;\n top: 0;\n right: 0;\n left: 0;\n bottom: 0;\n pointer-events: none;\n }\n\n &.unseen {\n .notification-overlay {\n background-image: linear-gradient(135deg, var(--badgeNotification, $fallback--cRed) 4px, transparent 10px);\n }\n }\n }\n}\n\n/* stylelint-disable-next-line no-descending-specificity */\n.notification {\n box-sizing: border-box;\n\n &:hover .animated.Avatar {\n canvas {\n display: none;\n }\n\n img {\n visibility: visible;\n }\n }\n\n &:last-child .Notification {\n border-bottom: none;\n }\n\n .non-mention {\n display: flex;\n flex: 1;\n flex-wrap: nowrap;\n padding: 0.6em;\n min-width: 0;\n\n .avatar-container {\n width: 32px;\n height: 32px;\n }\n\n .faint {\n --link: var(--faintLink);\n --text: var(--faint);\n }\n }\n\n .follow-request-accept {\n &:hover {\n color: $fallback--text;\n color: var(--text, $fallback--text);\n }\n }\n\n .follow-request-reject {\n &:hover {\n color: $fallback--cRed;\n color: var(--cRed, $fallback--cRed);\n }\n }\n\n .follow-text,\n .move-text {\n padding: 0.5em 0;\n overflow-wrap: break-word;\n display: flex;\n justify-content: space-between;\n\n .follow-name {\n display: block;\n max-width: 100%;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n }\n }\n\n /* TODO cleanup this */\n .Status {\n flex: 1;\n }\n\n time {\n white-space: nowrap;\n }\n\n .notification-right {\n flex: 1;\n padding-left: 0.8em;\n min-width: 0;\n\n .timeago {\n min-width: 3em;\n text-align: right;\n }\n\n .timeago-link {\n margin-right: 0.2em;\n }\n\n .expand-icon {\n .svg-inline--fa {\n margin-left: 0.25em;\n }\n }\n }\n\n .emoji-reaction-emoji {\n font-size: 1.3em;\n max-width: 1.25em;\n height: 1.25em;\n width: auto;\n }\n\n .emoji-reaction-emoji-image {\n vertical-align: middle;\n object-fit: contain;\n }\n\n .notification-details {\n min-width: 0;\n word-wrap: break-word;\n line-height: var(--post-line-height);\n position: relative;\n overflow: hidden;\n width: 100%;\n flex: 1 1 0;\n display: flex;\n flex-wrap: nowrap;\n justify-content: space-between;\n\n .name-and-action {\n flex: 1;\n overflow: hidden;\n text-overflow: ellipsis;\n }\n\n .username {\n font-weight: bolder;\n max-width: 100%;\n text-overflow: ellipsis;\n white-space: nowrap;\n }\n\n .timeago {\n margin-right: 0.2em;\n }\n\n .status-content {\n margin: 0;\n max-height: 300px;\n }\n\n h1 {\n word-break: break-all;\n margin: 0 0 0.3em;\n padding: 0;\n font-size: 1em;\n line-height: 1.5;\n\n small {\n font-weight: lighter;\n }\n }\n\n p {\n margin: 0;\n margin-top: 0;\n margin-bottom: 0.3em;\n }\n }\n}\n","\n@import \"../../variables\";\n\n.MobileNav {\n z-index: var(--ZI_navbar);\n\n .mobile-nav {\n display: grid;\n line-height: var(--navbar-height);\n grid-template-rows: 50px;\n grid-template-columns: 2fr auto;\n width: 100%;\n box-sizing: border-box;\n\n a {\n color: var(--topBarLink, $fallback--link);\n }\n }\n\n .mobile-inner-nav {\n width: 100%;\n display: flex;\n align-items: center;\n }\n\n .mobile-nav-button {\n display: inline-block;\n text-align: center;\n padding: 0 1em;\n position: relative;\n cursor: pointer;\n }\n\n .site-name {\n padding: 0 0.3em;\n display: inline-block;\n }\n\n .item {\n /* moslty just to get rid of extra whitespaces */\n display: flex;\n }\n\n .alert-dot {\n border-radius: 100%;\n height: 8px;\n width: 8px;\n position: absolute;\n left: calc(50% - 4px);\n top: calc(50% - 4px);\n margin-left: 6px;\n margin-top: -6px;\n background-color: $fallback--cRed;\n background-color: var(--badgeNotification, $fallback--cRed);\n }\n\n .mobile-notifications-drawer {\n width: 100%;\n height: 100vh;\n overflow-x: hidden;\n position: fixed;\n top: 0;\n left: 0;\n box-shadow: 1px 1px 4px rgb(0 0 0 / 60%);\n box-shadow: var(--panelShadow);\n transition-property: transform;\n transition-duration: 0.25s;\n transform: translateX(0);\n z-index: var(--ZI_navbar);\n -webkit-overflow-scrolling: touch;\n\n &.-closed {\n transform: translateX(100%);\n box-shadow: none;\n }\n }\n\n .mobile-notifications-header {\n display: flex;\n align-items: center;\n justify-content: space-between;\n z-index: calc(var(--ZI_navbar) + 100);\n width: 100%;\n height: 50px;\n line-height: 50px;\n position: absolute;\n color: var(--topBarText);\n background-color: $fallback--fg;\n background-color: var(--topBar, $fallback--fg);\n box-shadow: 0 0 4px rgb(0 0 0 / 60%);\n box-shadow: var(--topBarShadow);\n\n .spacer {\n flex: 1;\n }\n\n .title {\n font-size: 1.3em;\n margin-left: 0.6em;\n }\n }\n\n .pins {\n flex: 1;\n\n .pinned-item {\n flex-grow: 1;\n }\n }\n\n .mobile-notifications {\n margin-top: 50px;\n width: 100vw;\n height: calc(100vh - var(--navbar-height));\n overflow-x: hidden;\n overflow-y: scroll;\n color: $fallback--text;\n color: var(--text, $fallback--text);\n background-color: $fallback--bg;\n background-color: var(--bg, $fallback--bg);\n\n .notifications {\n padding: 0;\n border-radius: 0;\n box-shadow: none;\n\n .panel {\n border-radius: 0;\n margin: 0;\n box-shadow: none;\n }\n\n .panel::after {\n border-radius: 0;\n }\n\n .panel .panel-heading {\n border-radius: 0;\n box-shadow: none;\n }\n }\n }\n\n .confirm-modal.dark-overlay {\n &::before {\n z-index: 3000;\n }\n\n .dialog-modal.panel {\n z-index: 3001;\n }\n }\n}\n\n","\n@import \"../../variables\";\n\n.SearchBar {\n display: inline-flex;\n align-items: baseline;\n vertical-align: baseline;\n justify-content: flex-end;\n\n &.-expanded {\n width: 100%;\n }\n\n .search-bar-input,\n .search-button {\n height: 29px;\n }\n\n .search-bar-input {\n flex: 1 0 auto;\n }\n\n .cancel-search {\n height: 50px;\n }\n\n .cancel-icon {\n color: $fallback--text;\n color: var(--btnTopBarText, $fallback--text);\n }\n}\n\n","@import \"../../variables\";\n\n.DesktopNav {\n width: 100%;\n z-index: var(--ZI_navbar);\n\n input {\n color: var(--inputTopbarText, var(--inputText));\n }\n\n a {\n color: var(--topBarLink, $fallback--link);\n }\n\n .inner-nav {\n display: grid;\n grid-template-rows: var(--navbar-height);\n grid-template-columns: 2fr auto 2fr;\n grid-template-areas: \"sitename logo actions\";\n box-sizing: border-box;\n padding: 0 1.2em;\n margin: auto;\n max-width: 980px;\n }\n\n &.-column-stretch .inner-nav {\n --miniColumn: 25rem;\n --maxiColumn: 45rem;\n --columnGap: 1em;\n\n max-width:\n calc(\n var(--sidebarColumnWidth, var(--miniColumn)) +\n var(--contentColumnWidth, var(--maxiColumn)) +\n var(--columnGap)\n );\n }\n\n &.-logoLeft .inner-nav {\n grid-template-columns: auto 2fr 2fr;\n grid-template-areas: \"logo sitename actions\";\n }\n\n &.-column-stretch.-wide .inner-nav {\n max-width:\n calc(\n var(--sidebarColumnWidth, var(--miniColumn)) +\n var(--contentColumnWidth, var(--maxiColumn)) +\n var(--notifsColumnWidth, var(--miniColumn)) +\n var(--columnGap)\n );\n }\n\n .button-default {\n &,\n svg {\n color: $fallback--text;\n color: var(--btnTopBarText, $fallback--text);\n }\n\n &:active {\n background-color: $fallback--fg;\n background-color: var(--btnPressedTopBar, $fallback--fg);\n color: $fallback--text;\n color: var(--btnPressedTopBarText, $fallback--text);\n }\n\n &:disabled {\n color: $fallback--text;\n color: var(--btnDisabledTopBarText, $fallback--text);\n }\n\n &.toggled {\n color: $fallback--text;\n color: var(--btnToggledTopBarText, $fallback--text);\n background-color: $fallback--fg;\n background-color: var(--btnToggledTopBar, $fallback--fg);\n }\n }\n\n .logo {\n grid-area: logo;\n position: relative;\n transition: opacity;\n transition-timing-function: ease-out;\n transition-duration: 100ms;\n\n @media all and (min-width: 800px) {\n /* stylelint-disable-next-line declaration-no-important */\n opacity: 1 !important;\n }\n\n .mask {\n mask-repeat: no-repeat;\n mask-position: center;\n mask-size: contain;\n background-color: $fallback--fg;\n background-color: var(--topBarText, $fallback--fg);\n position: absolute;\n top: 0;\n bottom: 0;\n left: 0;\n right: 0;\n }\n\n img {\n display: inline-block;\n height: var(--navbar-height);\n }\n }\n\n .nav-icon {\n margin-left: 0.2em;\n width: 2em;\n height: 100%;\n text-align: center;\n\n .svg-inline--fa {\n color: $fallback--link;\n color: var(--topBarLink, $fallback--link);\n }\n }\n\n .sitename {\n grid-area: sitename;\n }\n\n .actions {\n grid-area: actions;\n }\n\n .item {\n flex: 1;\n line-height: var(--navbar-height);\n height: var(--navbar-height);\n overflow: hidden;\n display: flex;\n flex-wrap: wrap;\n\n &.right {\n justify-content: flex-end;\n text-align: right;\n }\n }\n\n .spacer {\n width: 1em;\n }\n}\n","\n@import \"../../variables\";\n\n.list {\n &-item:not(:last-child) {\n border-bottom: 1px solid;\n border-bottom-color: $fallback--border;\n border-bottom-color: var(--border, $fallback--border);\n }\n\n &-empty-content {\n text-align: center;\n padding: 10px;\n }\n}\n","\n@import \"../../variables\";\n\n.user-reporting-panel {\n width: 90vw;\n max-width: 700px;\n min-height: 20vh;\n max-height: 80vh;\n\n .panel-body {\n display: flex;\n flex-direction: column-reverse;\n border-top: 1px solid;\n border-color: $fallback--border;\n border-color: var(--border, $fallback--border);\n overflow: hidden;\n }\n\n &-left {\n padding: 1.1em 0.7em 0.7em;\n line-height: var(--post-line-height);\n box-sizing: border-box;\n\n > div {\n margin-bottom: 1em;\n\n &:last-child {\n margin-bottom: 0;\n }\n }\n\n p {\n margin-top: 0;\n }\n\n textarea.form-control {\n line-height: 16px;\n resize: none;\n overflow: hidden;\n transition: min-height 200ms 100ms;\n min-height: 44px;\n width: 100%;\n }\n\n .btn {\n min-width: 10em;\n padding: 0 2em;\n }\n\n .alert {\n margin: 1em 0 0;\n line-height: 1.3em;\n }\n }\n\n &-right {\n display: flex;\n flex-direction: column;\n overflow-y: auto;\n }\n\n &-sitem {\n display: flex;\n justify-content: space-between;\n\n /* TODO cleanup this */\n > .Status {\n flex: 1;\n }\n\n > .checkbox {\n margin: 0.75em;\n }\n }\n\n @media all and (min-width: 801px) {\n .panel-body {\n flex-direction: row;\n }\n\n &-left {\n width: 50%;\n max-width: 320px;\n border-right: 1px solid;\n border-color: $fallback--border;\n border-color: var(--border, $fallback--border);\n padding: 1.1em;\n\n > div {\n margin-bottom: 2em;\n }\n }\n\n &-right {\n width: 50%;\n flex: 1 1 auto;\n margin-bottom: 12px;\n }\n }\n}\n","\n.modal-view.edit-form-modal-view {\n align-items: flex-start;\n}\n\n.edit-form-modal-panel {\n flex-shrink: 0;\n margin-top: 25%;\n margin-bottom: 2em;\n width: 100%;\n max-width: 700px;\n\n @media (orientation: landscape) {\n margin-top: 8%;\n }\n\n .form-bottom-left {\n max-width: 6.5em;\n\n .emoji-icon {\n justify-content: right;\n }\n }\n}\n","\n.modal-view.post-form-modal-view {\n align-items: flex-start;\n}\n\n.post-form-modal-panel {\n flex-shrink: 0;\n margin-top: 25%;\n margin-bottom: 2em;\n width: 100%;\n max-width: 700px;\n\n @media (orientation: landscape) {\n margin-top: 8%;\n }\n}\n","\n.modal-view.status-history-modal-view {\n align-items: flex-start;\n}\n\n.status-history-modal-panel {\n flex-shrink: 0;\n margin-top: 25%;\n margin-bottom: 2em;\n width: 100%;\n max-width: 700px;\n\n @media (orientation: landscape) {\n margin-top: 8%;\n }\n}\n","\n@import \"../../variables\";\n\n.global-notice-list {\n position: fixed;\n top: calc(var(--navbar-height) + 0.5em);\n width: 100%;\n pointer-events: none;\n z-index: var(--ZI_modals_popovers);\n display: flex;\n flex-direction: column;\n align-items: center;\n\n .global-notice {\n pointer-events: auto;\n text-align: center;\n width: 40em;\n max-width: calc(100% - 3em);\n display: flex;\n padding-left: 1.5em;\n line-height: 2;\n margin-bottom: 0.5em;\n\n .notice-message {\n flex: 1 1 100%;\n }\n }\n\n .global-error {\n background-color: var(--alertPopupError, $fallback--cRed);\n color: var(--alertPopupErrorText, $fallback--text);\n\n .svg-inline--fa {\n color: var(--alertPopupErrorText, $fallback--text);\n }\n }\n\n .global-warning {\n background-color: var(--alertPopupWarning, $fallback--cOrange);\n color: var(--alertPopupWarningText, $fallback--text);\n\n .svg-inline--fa {\n color: var(--alertPopupWarningText, $fallback--text);\n }\n }\n\n .global-success {\n background-color: var(--alertPopupSuccess, $fallback--cGreen);\n color: var(--alertPopupSuccessText, $fallback--text);\n\n .svg-inline--fa {\n color: var(--alertPopupSuccessText, $fallback--text);\n }\n }\n\n .global-info {\n background-color: var(--alertPopupNeutral, $fallback--fg);\n color: var(--alertPopupNeutralText, $fallback--text);\n\n .svg-inline--fa {\n color: var(--alertPopupNeutralText, $fallback--text);\n }\n }\n\n .close-notice {\n padding-right: 0.2em;\n\n .svg-inline--fa:hover {\n opacity: 0.6;\n }\n }\n}\n","// stylelint-disable rscss/class-format\n/* stylelint-disable no-descending-specificity */\n@import \"./variables\";\n@import \"./panel\";\n\n:root {\n --navbar-height: 3.5rem;\n --post-line-height: 1.4;\n // Z-Index stuff\n --ZI_media_modal: 9000;\n --ZI_modals_popovers: 8500;\n --ZI_modals: 8000;\n --ZI_navbar_popovers: 7500;\n --ZI_navbar: 7000;\n --ZI_popovers: 6000;\n}\n\nhtml {\n font-size: 14px;\n // overflow-x: clip causes my browser's tab to crash with SIGILL lul\n}\n\nbody {\n font-family: sans-serif;\n font-family: var(--interfaceFont, sans-serif);\n margin: 0;\n color: $fallback--text;\n color: var(--text, $fallback--text);\n -webkit-font-smoothing: antialiased;\n -moz-osx-font-smoothing: grayscale;\n overscroll-behavior-y: none;\n overflow-x: clip;\n overflow-y: scroll;\n\n &.hidden {\n display: none;\n }\n}\n\n// ## Custom scrollbars\n// Only show custom scrollbars on devices which\n// have a cursor/pointer to operate them\n@media (any-pointer: fine) {\n * {\n scrollbar-color: var(--btn) transparent;\n\n &::-webkit-scrollbar {\n background: transparent;\n }\n\n &::-webkit-scrollbar-button,\n &::-webkit-scrollbar-thumb {\n background-color: var(--btn);\n box-shadow: var(--buttonShadow);\n border-radius: var(--btnRadius);\n }\n\n // horizontal/vertical/increment/decrement are webkit-specific stuff\n // that indicates whether we're affecting vertical scrollbar, increase button etc\n // stylelint-disable selector-pseudo-class-no-unknown\n &::-webkit-scrollbar-button {\n --___bgPadding: 2px;\n\n color: var(--btnText);\n background-repeat: no-repeat, no-repeat;\n\n &:horizontal {\n background-size: 50% calc(50% - var(--___bgPadding)), 50% calc(50% - var(--___bgPadding));\n\n &:increment {\n background-image:\n linear-gradient(45deg, var(--btnText) 50%, transparent 51%),\n linear-gradient(-45deg, transparent 50%, var(--btnText) 51%);\n background-position: top var(--___bgPadding) left 50%, right 50% bottom var(--___bgPadding);\n }\n\n &:decrement {\n background-image:\n linear-gradient(45deg, transparent 50%, var(--btnText) 51%),\n linear-gradient(-45deg, var(--btnText) 50%, transparent 51%);\n background-position: bottom var(--___bgPadding) right 50%, left 50% top var(--___bgPadding);\n }\n }\n\n &:vertical {\n background-size: calc(50% - var(--___bgPadding)) 50%, calc(50% - var(--___bgPadding)) 50%;\n\n &:increment {\n background-image:\n linear-gradient(-45deg, transparent 50%, var(--btnText) 51%),\n linear-gradient(45deg, transparent 50%, var(--btnText) 51%);\n background-position: right var(--___bgPadding) top 50%, left var(--___bgPadding) top 50%;\n }\n\n &:decrement {\n background-image:\n linear-gradient(-45deg, var(--btnText) 50%, transparent 51%),\n linear-gradient(45deg, var(--btnText) 50%, transparent 51%);\n background-position: left var(--___bgPadding) top 50%, right var(--___bgPadding) top 50%;\n }\n }\n }\n // stylelint-enable selector-pseudo-class-no-unknown\n }\n // Body should have background to scrollbar otherwise it will use white (body color?)\n html {\n scrollbar-color: var(--selectedMenu) var(--wallpaper);\n background: var(--wallpaper);\n }\n}\n\na {\n text-decoration: none;\n color: $fallback--link;\n color: var(--link, $fallback--link);\n}\n\nh4 {\n margin: 0;\n}\n\n.iconLetter {\n display: inline-block;\n text-align: center;\n font-weight: 1000;\n}\n\ni[class*=\"icon-\"],\n.svg-inline--fa,\n.iconLetter {\n color: $fallback--icon;\n color: var(--icon, $fallback--icon);\n}\n\n.button-unstyled:hover,\na:hover {\n > i[class*=\"icon-\"],\n > .svg-inline--fa,\n > .iconLetter {\n color: var(--text);\n }\n}\n\nnav {\n z-index: var(--ZI_navbar);\n background-color: $fallback--fg;\n background-color: var(--topBar, $fallback--fg);\n color: $fallback--faint;\n color: var(--faint, $fallback--faint);\n box-shadow: 0 0 4px rgb(0 0 0 / 60%);\n box-shadow: var(--topBarShadow);\n box-sizing: border-box;\n height: var(--navbar-height);\n position: fixed;\n}\n\n#sidebar {\n grid-area: sidebar;\n}\n\n#modal {\n position: absolute;\n z-index: var(--ZI_modals);\n}\n\n.column.-scrollable {\n top: var(--navbar-height);\n position: sticky;\n}\n\n#main-scroller {\n grid-area: content;\n position: relative;\n}\n\n#notifs-column {\n grid-area: notifs;\n}\n\n.app-bg-wrapper {\n position: fixed;\n height: 100%;\n top: var(--navbar-height);\n z-index: -1000;\n left: 0;\n right: -20px;\n background-size: cover;\n background-repeat: no-repeat;\n background-color: var(--wallpaper);\n background-image: var(--body-background-image);\n background-position: 50%;\n}\n\n.underlay {\n grid-column: 1 / span 3;\n grid-row: 1 / 1;\n pointer-events: none;\n background-color: rgb(0 0 0 / 15%);\n background-color: var(--underlay, rgb(0 0 0 / 15%));\n z-index: -1000;\n}\n\n.app-layout {\n --miniColumn: 25rem;\n --maxiColumn: 45rem;\n --columnGap: 1em;\n --status-margin: 0.75em;\n --effectiveSidebarColumnWidth: minmax(var(--miniColumn), var(--sidebarColumnWidth, var(--miniColumn)));\n --effectiveNotifsColumnWidth: minmax(var(--miniColumn), var(--notifsColumnWidth, var(--miniColumn)));\n --effectiveContentColumnWidth: minmax(var(--miniColumn), var(--contentColumnWidth, var(--maxiColumn)));\n\n position: relative;\n display: grid;\n grid-template-columns:\n var(--effectiveSidebarColumnWidth)\n var(--effectiveContentColumnWidth);\n grid-template-areas: \"sidebar content\";\n grid-template-rows: 1fr;\n box-sizing: border-box;\n margin: 0 auto;\n align-content: flex-start;\n flex-wrap: wrap;\n justify-content: center;\n min-height: 100vh;\n overflow-x: clip;\n\n .column {\n --___columnMargin: var(--columnGap);\n\n display: grid;\n grid-template-columns: 100%;\n box-sizing: border-box;\n grid-row: 1 / 1;\n margin: 0 calc(var(--___columnMargin) / 2);\n padding: calc(var(--___columnMargin)) 0;\n row-gap: var(--___columnMargin);\n align-content: start;\n\n &:not(.-scrollable) {\n margin-top: var(--navbar-height);\n }\n\n &:hover {\n z-index: 2;\n }\n\n &.-full-height {\n margin-bottom: 0;\n padding-top: 0;\n padding-bottom: 0;\n }\n\n &.-scrollable {\n --___paddingIncrease: calc(var(--columnGap) / 2);\n\n position: sticky;\n top: var(--navbar-height);\n max-height: calc(100vh - var(--navbar-height));\n overflow-y: auto;\n overflow-x: hidden;\n margin-left: calc(var(--___paddingIncrease) * -1);\n padding-left: calc(var(--___paddingIncrease) + var(--___columnMargin) / 2);\n\n // On browsers that don't support hiding scrollbars we enforce \"show scrolbars\" mode\n // might implement old style of hiding scrollbars later if there's demand\n @supports (scrollbar-width: none) or (-webkit-text-fill-color: initial) {\n &:not(.-show-scrollbar) {\n scrollbar-width: none;\n margin-right: calc(var(--___paddingIncrease) * -1);\n padding-right: calc(var(--___paddingIncrease) + var(--___columnMargin) / 2);\n\n &::-webkit-scrollbar {\n display: block;\n width: 0;\n }\n }\n }\n\n .panel-heading.-sticky {\n top: calc(var(--columnGap) / -1);\n }\n }\n }\n\n &.-has-new-post-button {\n .column {\n padding-bottom: 10rem;\n }\n }\n\n &.-no-sticky-headers {\n .column {\n .panel-heading.-sticky {\n position: relative;\n top: 0;\n }\n }\n }\n\n .column-inner {\n display: grid;\n grid-template-columns: 100%;\n box-sizing: border-box;\n row-gap: 1em;\n align-content: start;\n }\n\n &.-reverse:not(.-wide, .-mobile) {\n grid-template-columns:\n var(--effectiveContentColumnWidth)\n var(--effectiveSidebarColumnWidth);\n grid-template-areas: \"content sidebar\";\n }\n\n &.-wide {\n grid-template-columns:\n var(--effectiveSidebarColumnWidth)\n var(--effectiveContentColumnWidth)\n var(--effectiveNotifsColumnWidth);\n grid-template-areas: \"sidebar content notifs\";\n\n &.-reverse {\n grid-template-columns:\n var(--effectiveNotifsColumnWidth)\n var(--effectiveContentColumnWidth)\n var(--effectiveSidebarColumnWidth);\n grid-template-areas: \"notifs content sidebar\";\n }\n }\n\n &.-mobile {\n grid-template-columns: 100vw;\n grid-template-areas: \"content\";\n padding: 0;\n\n .column {\n padding-top: 0;\n margin: var(--navbar-height) 0 0 0;\n }\n\n .panel-heading,\n .panel-heading::after,\n .panel-heading::before,\n .panel,\n .panel::after {\n border-top-left-radius: 0;\n border-top-right-radius: 0;\n }\n\n #sidebar,\n #notifs-column {\n display: none;\n }\n }\n\n &.-normal {\n #notifs-column {\n display: none;\n }\n }\n}\n\n.text-center {\n text-align: center;\n}\n\n.button-default {\n user-select: none;\n color: $fallback--text;\n color: var(--btnText, $fallback--text);\n background-color: $fallback--fg;\n background-color: var(--btn, $fallback--fg);\n border: none;\n border-radius: $fallback--btnRadius;\n border-radius: var(--btnRadius, $fallback--btnRadius);\n cursor: pointer;\n box-shadow: $fallback--buttonShadow;\n box-shadow: var(--buttonShadow);\n font-size: 1em;\n font-family: sans-serif;\n font-family: var(--interfaceFont, sans-serif);\n\n &.-sublime {\n background: transparent;\n }\n\n i[class*=\"icon-\"],\n .svg-inline--fa {\n color: $fallback--text;\n color: var(--btnText, $fallback--text);\n }\n\n &::-moz-focus-inner {\n border: none;\n }\n\n &:hover {\n box-shadow: 0 0 4px rgb(255 255 255 / 30%);\n box-shadow: var(--buttonHoverShadow);\n }\n\n &:active {\n box-shadow:\n 0 0 4px 0 rgb(255 255 255 / 30%),\n 0 1px 0 0 rgb(0 0 0 / 20%) inset,\n 0 -1px 0 0 rgb(255 255 255 / 20%) inset;\n box-shadow: var(--buttonPressedShadow);\n color: $fallback--text;\n color: var(--btnPressedText, $fallback--text);\n background-color: $fallback--fg;\n background-color: var(--btnPressed, $fallback--fg);\n\n svg,\n i {\n color: $fallback--text;\n color: var(--btnPressedText, $fallback--text);\n }\n }\n\n &:disabled {\n cursor: not-allowed;\n color: $fallback--text;\n color: var(--btnDisabledText, $fallback--text);\n background-color: $fallback--fg;\n background-color: var(--btnDisabled, $fallback--fg);\n\n svg,\n i {\n color: $fallback--text;\n color: var(--btnDisabledText, $fallback--text);\n }\n }\n\n &.toggled {\n color: $fallback--text;\n color: var(--btnToggledText, $fallback--text);\n background-color: $fallback--fg;\n background-color: var(--btnToggled, $fallback--fg);\n box-shadow:\n 0 0 4px 0 rgb(255 255 255 / 30%),\n 0 1px 0 0 rgb(0 0 0 / 20%) inset,\n 0 -1px 0 0 rgb(255 255 255 / 20%) inset;\n box-shadow: var(--buttonPressedShadow);\n\n svg,\n i {\n color: $fallback--text;\n color: var(--btnToggledText, $fallback--text);\n }\n }\n\n &.danger {\n // TODO: add better color variable\n color: $fallback--text;\n color: var(--alertErrorPanelText, $fallback--text);\n background-color: $fallback--alertError;\n background-color: var(--alertError, $fallback--alertError);\n }\n}\n\n.button-unstyled {\n background: none;\n border: none;\n outline: none;\n display: inline;\n text-align: initial;\n font-size: 100%;\n font-family: inherit;\n padding: 0;\n line-height: unset;\n cursor: pointer;\n box-sizing: content-box;\n color: inherit;\n\n &.-link {\n color: $fallback--link;\n color: var(--link, $fallback--link);\n }\n\n &.-fullwidth {\n width: 100%;\n }\n\n &.-hover-highlight {\n &:hover svg {\n color: $fallback--lightText;\n color: var(--lightText, $fallback--lightText);\n }\n }\n}\n\ninput,\ntextarea,\n.input {\n &.unstyled {\n border-radius: 0;\n background: none;\n box-shadow: none;\n height: unset;\n }\n\n --_padding: 0.5em;\n\n border: none;\n border-radius: $fallback--inputRadius;\n border-radius: var(--inputRadius, $fallback--inputRadius);\n box-shadow:\n 0 1px 0 0 rgb(0 0 0 / 20%) inset,\n 0 -1px 0 0 rgb(255 255 255 / 20%) inset,\n 0 0 2px 0 rgb(0 0 0 / 100%) inset;\n box-shadow: var(--inputShadow);\n background-color: $fallback--fg;\n background-color: var(--input, $fallback--fg);\n color: $fallback--lightText;\n color: var(--inputText, $fallback--lightText);\n font-family: sans-serif;\n font-family: var(--inputFont, sans-serif);\n font-size: 1em;\n margin: 0;\n box-sizing: border-box;\n display: inline-block;\n position: relative;\n line-height: 2;\n hyphens: none;\n padding: 0 var(--_padding);\n\n &:disabled,\n &[disabled=\"disabled\"],\n &.disabled {\n cursor: not-allowed;\n opacity: 0.5;\n }\n\n &[type=\"range\"] {\n background: none;\n border: none;\n margin: 0;\n box-shadow: none;\n flex: 1;\n }\n\n &[type=\"radio\"] {\n display: none;\n\n &:checked + label::before {\n box-shadow: 0 0 2px black inset, 0 0 0 4px $fallback--fg inset;\n box-shadow: var(--inputShadow), 0 0 0 4px var(--fg, $fallback--fg) inset;\n background-color: var(--accent, $fallback--link);\n }\n\n &:disabled {\n &,\n & + label,\n & + label::before {\n opacity: 0.5;\n }\n }\n\n + label::before {\n flex-shrink: 0;\n display: inline-block;\n content: \"\";\n transition: box-shadow 200ms;\n width: 1.1em;\n height: 1.1em;\n border-radius: 100%; // Radio buttons should always be circle\n box-shadow: 0 0 2px black inset;\n box-shadow: var(--inputShadow);\n margin-right: 0.5em;\n background-color: $fallback--fg;\n background-color: var(--input, $fallback--fg);\n vertical-align: top;\n text-align: center;\n line-height: 1.1;\n font-size: 1.1em;\n box-sizing: border-box;\n color: transparent;\n overflow: hidden;\n }\n }\n\n &[type=\"checkbox\"] {\n &:checked + label::before {\n color: $fallback--text;\n color: var(--inputText, $fallback--text);\n }\n\n &:disabled {\n &,\n & + label,\n & + label::before {\n opacity: 0.5;\n }\n }\n\n + label::before {\n flex-shrink: 0;\n display: inline-block;\n content: \"✓\";\n transition: color 200ms;\n width: 1.1em;\n height: 1.1em;\n border-radius: $fallback--checkboxRadius;\n border-radius: var(--checkboxRadius, $fallback--checkboxRadius);\n box-shadow: 0 0 2px black inset;\n box-shadow: var(--inputShadow);\n margin-right: 0.5em;\n background-color: $fallback--fg;\n background-color: var(--input, $fallback--fg);\n vertical-align: top;\n text-align: center;\n line-height: 1.1;\n font-size: 1.1em;\n box-sizing: border-box;\n color: transparent;\n overflow: hidden;\n }\n }\n\n &.resize-height {\n resize: vertical;\n }\n}\n\n// Textareas should have stock line-height + vertical padding instead of huge line-height\ntextarea {\n padding: var(--_padding);\n line-height: var(--post-line-height);\n}\n\noption {\n color: $fallback--text;\n color: var(--text, $fallback--text);\n background-color: $fallback--bg;\n background-color: var(--bg, $fallback--bg);\n}\n\n.hide-number-spinner {\n appearance: textfield;\n\n &[type=\"number\"]::-webkit-inner-spin-button,\n &[type=\"number\"]::-webkit-outer-spin-button {\n opacity: 0;\n display: none;\n }\n}\n\n.cards-list {\n list-style: none;\n display: grid;\n grid-auto-flow: row dense;\n grid-template-columns: 1fr 1fr;\n\n li {\n border: 1px solid var(--border);\n border-radius: var(--inputRadius);\n padding: 0.5em;\n margin: 0.25em;\n }\n}\n\n.btn-block {\n display: block;\n width: 100%;\n}\n\n.btn-group {\n position: relative;\n display: inline-flex;\n vertical-align: middle;\n\n button,\n .button-dropdown {\n position: relative;\n flex: 1 1 auto;\n\n &:not(:last-child),\n &:not(:last-child) .button-default {\n border-top-right-radius: 0;\n border-bottom-right-radius: 0;\n }\n\n &:not(:first-child),\n &:not(:first-child) .button-default {\n border-top-left-radius: 0;\n border-bottom-left-radius: 0;\n }\n }\n}\n\n.fa {\n color: grey;\n}\n\n.mobile-shown {\n display: none;\n}\n\n.badge {\n box-sizing: border-box;\n display: inline-block;\n border-radius: 99px;\n max-width: 10em;\n min-width: 1.7em;\n height: 1.3em;\n padding: 0.15em;\n vertical-align: middle;\n font-weight: normal;\n font-style: normal;\n font-size: 0.9em;\n line-height: 1;\n text-align: center;\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n\n &.badge-notification {\n background-color: $fallback--cRed;\n background-color: var(--badgeNotification, $fallback--cRed);\n color: white;\n color: var(--badgeNotificationText, white);\n }\n}\n\n.alert {\n margin: 0 0.35em;\n padding: 0 0.25em;\n border-radius: $fallback--tooltipRadius;\n border-radius: var(--tooltipRadius, $fallback--tooltipRadius);\n\n &.error {\n background-color: $fallback--alertError;\n background-color: var(--alertError, $fallback--alertError);\n color: $fallback--text;\n color: var(--alertErrorText, $fallback--text);\n\n .panel-heading & {\n color: $fallback--text;\n color: var(--alertErrorPanelText, $fallback--text);\n }\n }\n\n &.warning {\n background-color: $fallback--alertWarning;\n background-color: var(--alertWarning, $fallback--alertWarning);\n color: $fallback--text;\n color: var(--alertWarningText, $fallback--text);\n\n .panel-heading & {\n color: $fallback--text;\n color: var(--alertWarningPanelText, $fallback--text);\n }\n }\n\n &.success {\n background-color: var(--alertSuccess, $fallback--alertWarning);\n color: var(--alertSuccessText, $fallback--text);\n\n .panel-heading & {\n color: var(--alertSuccessPanelText, $fallback--text);\n }\n }\n}\n\n.faint {\n color: $fallback--faint;\n color: var(--faint, $fallback--faint);\n}\n\n.faint-link {\n color: $fallback--faint;\n color: var(--faint, $fallback--faint);\n\n &:hover {\n text-decoration: underline;\n }\n}\n\n.visibility-notice {\n padding: 0.5em;\n border: 1px solid $fallback--faint;\n border: 1px solid var(--faint, $fallback--faint);\n border-radius: $fallback--inputRadius;\n border-radius: var(--inputRadius, $fallback--inputRadius);\n}\n\n.notice-dismissible {\n padding-right: 4rem;\n position: relative;\n\n .dismiss {\n position: absolute;\n top: 0;\n right: 0;\n padding: 0.5em;\n color: inherit;\n }\n}\n\n.fa-scale-110 {\n &.svg-inline--fa,\n &.iconLetter {\n font-size: 1.1em;\n }\n}\n\n.fa-old-padding {\n &.iconLetter,\n &.svg-inline--fa,\n &-layer {\n padding: 0 0.3em;\n }\n}\n\n.veryfaint {\n opacity: 0.25;\n}\n\n.login-hint {\n text-align: center;\n\n @media all and (min-width: 801px) {\n display: none;\n }\n\n a {\n display: inline-block;\n padding: 1em 0;\n width: 100%;\n }\n}\n\n.btn.button-default {\n min-height: 2em;\n}\n\n.new-status-notification {\n position: relative;\n font-size: 1.1em;\n z-index: 1;\n flex: 1;\n}\n\n@media all and (max-width: 800px) {\n .mobile-hidden {\n display: none;\n }\n}\n\n@keyframes spin {\n 0% {\n transform: rotate(0deg);\n }\n\n 100% {\n transform: rotate(359deg);\n }\n}\n\n@keyframes shakeError {\n 0% {\n transform: translateX(0);\n }\n\n 15% {\n transform: translateX(0.375rem);\n }\n\n 30% {\n transform: translateX(-0.375rem);\n }\n\n 45% {\n transform: translateX(0.375rem);\n }\n\n 60% {\n transform: translateX(-0.375rem);\n }\n\n 75% {\n transform: translateX(0.375rem);\n }\n\n 90% {\n transform: translateX(-0.375rem);\n }\n\n 100% {\n transform: translateX(0);\n }\n}\n\n// Vue transitions\n.fade-enter-active,\n.fade-leave-active {\n transition: opacity 0.3s;\n}\n\n.fade-enter-from,\n.fade-leave-active {\n opacity: 0;\n}\n/* stylelint-enable no-descending-specificity */\n\n.visible-for-screenreader-only {\n display: block;\n width: 1px;\n height: 1px;\n margin: -1px;\n overflow: hidden;\n visibility: visible;\n clip: rect(0 0 0 0);\n padding: 0;\n position: absolute;\n}\n","/* stylelint-disable no-descending-specificity */\n.panel {\n position: relative;\n display: flex;\n flex-direction: column;\n background-color: $fallback--bg;\n background-color: var(--bg, $fallback--bg);\n\n &::after,\n & {\n border-radius: $fallback--panelRadius;\n border-radius: var(--panelRadius, $fallback--panelRadius);\n }\n\n &::after {\n content: \"\";\n position: absolute;\n top: 0;\n bottom: 0;\n left: 0;\n right: 0;\n z-index: 5;\n box-shadow: 1px 1px 4px rgb(0 0 0 / 60%);\n box-shadow: var(--panelShadow);\n pointer-events: none;\n }\n}\n\n.panel-body {\n padding: var(--panel-body-padding, 0);\n\n &:empty::before {\n content: \"¯\\\\_(ツ)_/¯\"; // Could use words but it'd require translations\n display: block;\n margin: 1em;\n text-align: center;\n }\n\n > p {\n line-height: 1.3;\n padding: 1em;\n margin: 0;\n }\n}\n\n.panel-heading,\n.panel-footer {\n --panel-heading-height-padding: 0.6em;\n --__panel-heading-gap: 0.5em;\n --__panel-heading-height: 3.2em;\n --__panel-heading-height-inner: calc(var(--__panel-heading-height) - 2 * var(--panel-heading-height-padding, 0));\n\n position: relative;\n box-sizing: border-box;\n display: grid;\n grid-auto-flow: column;\n grid-template-columns: minmax(50%, 1fr);\n grid-auto-columns: auto;\n grid-column-gap: var(--__panel-heading-gap);\n flex: none;\n background-size: cover;\n padding: var(--panel-heading-height-padding);\n height: var(--__panel-heading-height);\n line-height: var(--__panel-heading-height-inner);\n z-index: 4;\n\n &.-flexible-height {\n --__panel-heading-height: auto;\n\n &::after,\n &::before {\n display: none;\n }\n }\n\n &.-stub {\n &,\n &::after {\n border-radius: $fallback--panelRadius;\n border-radius: var(--panelRadius, $fallback--panelRadius);\n }\n }\n\n &.-sticky {\n position: sticky;\n top: var(--navbar-height);\n }\n\n &::after,\n &::before {\n content: \"\";\n position: absolute;\n top: 0;\n bottom: 0;\n right: 0;\n left: 0;\n pointer-events: none;\n }\n\n .title {\n font-size: 1.3em;\n }\n\n .alert {\n white-space: nowrap;\n text-overflow: ellipsis;\n overflow-x: hidden;\n }\n\n &:not(.-flexible-height) {\n > .button-default,\n > .alert {\n height: var(--__panel-heading-height-inner);\n min-height: 0;\n box-sizing: border-box;\n margin: 0;\n min-width: 1px;\n padding-top: 0;\n padding-bottom: 0;\n align-self: stretch;\n }\n }\n}\n\n// TODO Should refactor panels into separate component and utilize slots\n\n.panel-heading {\n border-radius: $fallback--panelRadius $fallback--panelRadius 0 0;\n border-radius: var(--panelRadius, $fallback--panelRadius) var(--panelRadius, $fallback--panelRadius) 0 0;\n border-width: 0 0 1px;\n align-items: start;\n // panel theme\n color: var(--panelText);\n background-color: $fallback--bg;\n background-color: var(--bg, $fallback--bg);\n\n &::after {\n background-color: $fallback--fg;\n background-color: var(--panel, $fallback--fg);\n z-index: -2;\n border-radius: $fallback--panelRadius $fallback--panelRadius 0 0;\n border-radius: var(--panelRadius, $fallback--panelRadius) var(--panelRadius, $fallback--panelRadius) 0 0;\n box-shadow: var(--panelHeaderShadow);\n }\n\n a,\n .-link {\n color: $fallback--link;\n color: var(--panelLink, $fallback--link);\n }\n\n .button-unstyled:hover,\n a:hover {\n i[class*=\"icon-\"],\n .svg-inline--fa,\n .iconLetter {\n color: var(--panelText);\n }\n }\n\n .faint {\n background-color: transparent;\n color: $fallback--faint;\n color: var(--panelFaint, $fallback--faint);\n }\n\n .faint-link {\n color: $fallback--faint;\n color: var(--faintLink, $fallback--faint);\n }\n\n &:not(.-flexible-height) {\n > .button-default {\n flex-shrink: 0;\n\n &,\n i[class*=\"icon-\"] {\n color: $fallback--text;\n color: var(--btnPanelText, $fallback--text);\n }\n\n &:active {\n background-color: $fallback--fg;\n background-color: var(--btnPressedPanel, $fallback--fg);\n color: $fallback--text;\n color: var(--btnPressedPanelText, $fallback--text);\n }\n\n &:disabled {\n color: $fallback--text;\n color: var(--btnDisabledPanelText, $fallback--text);\n }\n\n &.toggled {\n color: $fallback--text;\n color: var(--btnToggledPanelText, $fallback--text);\n }\n }\n }\n\n .rightside-button {\n align-self: stretch;\n text-align: center;\n width: var(--__panel-heading-height);\n height: var(--__panel-heading-height);\n margin: calc(-1 * var(--panel-heading-height-padding)) 0;\n margin-right: calc(-1 * var(--__panel-heading-gap));\n\n > button {\n box-sizing: border-box;\n padding: calc(1 * var(--panel-heading-height-padding)) 0;\n height: 100%;\n width: 100%;\n text-align: center;\n\n svg {\n font-size: 1.2em;\n }\n }\n }\n\n .rightside-icon {\n align-self: stretch;\n text-align: center;\n width: var(--__panel-heading-height);\n margin-right: calc(-1 * var(--__panel-heading-gap));\n\n svg {\n font-size: 1.2em;\n }\n }\n}\n\n.panel-footer {\n border-radius: 0 0 $fallback--panelRadius $fallback--panelRadius;\n border-radius: 0 0 var(--panelRadius, $fallback--panelRadius) var(--panelRadius, $fallback--panelRadius);\n align-items: center;\n border-width: 1px 0 0;\n border-style: solid;\n border-color: var(--border, $fallback--border);\n}\n/* stylelint-enable no-descending-specificity */\n","\n@import \"../../variables\";\n\n.thread-tree-replies {\n margin-left: var(--status-margin, $status-margin);\n border-left: 2px solid var(--border, $fallback--border);\n}\n\n.thread-tree-replies-hidden {\n padding: var(--status-margin, $status-margin);\n\n /* Make the button stretch along the whole row */\n display: flex;\n align-items: stretch;\n flex-direction: column;\n}\n","\n@import \"../../variables\";\n\n.Conversation {\n z-index: 1;\n\n .conversation-dive-to-top-level-box {\n padding: var(--status-margin, $status-margin);\n border-bottom: 1px solid var(--border, $fallback--border);\n border-radius: 0;\n\n /* Make the button stretch along the whole row */\n display: flex;\n align-items: stretch;\n flex-direction: column;\n }\n\n .thread-ancestors {\n margin-left: var(--status-margin, $status-margin);\n border-left: 2px solid var(--border, $fallback--border);\n }\n\n .thread-ancestor.-faded .StatusContent {\n --link: var(--faintLink);\n --text: var(--faint);\n\n color: var(--text);\n }\n\n .thread-ancestor-dive-box {\n padding-left: var(--status-margin, $status-margin);\n border-bottom: 1px solid var(--border, $fallback--border);\n border-radius: 0;\n\n /* Make the button stretch along the whole row */\n &,\n &-inner {\n display: flex;\n align-items: stretch;\n flex-direction: column;\n }\n }\n\n .thread-ancestor-dive-box-inner {\n padding: var(--status-margin, $status-margin);\n }\n\n .conversation-status {\n border-bottom: 1px solid var(--border, $fallback--border);\n border-radius: 0;\n }\n\n .thread-ancestor-has-other-replies .conversation-status,\n &:last-child .conversation-status,\n .thread-ancestor:last-child .conversation-status,\n .thread-ancestor:last-child .thread-ancestor-dive-box,\n &.-expanded .thread-tree .conversation-status {\n border-bottom: none;\n }\n\n .thread-ancestors + .thread-tree > .conversation-status {\n border-top: 1px solid var(--border, $fallback--border);\n }\n\n /* expanded conversation in timeline */\n &.status-fadein.-expanded .thread-body {\n border-left: 4px solid $fallback--cRed;\n border-left-color: var(--cRed, $fallback--cRed);\n border-radius: 0 0 $fallback--panelRadius $fallback--panelRadius;\n border-radius: 0 0 var(--panelRadius, $fallback--panelRadius) var(--panelRadius, $fallback--panelRadius);\n border-bottom: 1px solid var(--border, $fallback--border);\n }\n\n &.-expanded.status-fadein {\n margin: calc(var(--status-margin, $status-margin) / 2);\n }\n}\n","\n@import \"../../variables\";\n\n.timeline-menu-popover {\n min-width: 24rem;\n max-width: 100vw;\n margin-top: 0.6rem;\n font-size: 1rem;\n border-top-right-radius: 0;\n border-top-left-radius: 0;\n\n ul {\n list-style: none;\n margin: 0;\n padding: 0;\n }\n\n a {\n display: block;\n padding: 0 0.65em;\n height: 3.5em;\n line-height: 3.5em;\n\n &:hover {\n background-color: $fallback--lightBg;\n background-color: var(--selectedMenu, $fallback--lightBg);\n color: $fallback--link;\n color: var(--selectedMenuText, $fallback--link);\n\n --faint: var(--selectedMenuFaintText, $fallback--faint);\n --faintLink: var(--selectedMenuFaintLink, $fallback--faint);\n --lightText: var(--selectedMenuLightText, $fallback--lightText);\n --icon: var(--selectedMenuIcon, $fallback--icon);\n }\n\n &.router-link-active {\n font-weight: bolder;\n background-color: $fallback--lightBg;\n background-color: var(--selectedMenu, $fallback--lightBg);\n color: $fallback--text;\n color: var(--selectedMenuText, $fallback--text);\n\n --faint: var(--selectedMenuFaintText, $fallback--faint);\n --faintLink: var(--selectedMenuFaintLink, $fallback--faint);\n --lightText: var(--selectedMenuLightText, $fallback--lightText);\n --icon: var(--selectedMenuIcon, $fallback--icon);\n\n &:hover {\n text-decoration: underline;\n }\n }\n\n svg {\n margin-right: 0.4em;\n margin-left: -0.2em;\n }\n }\n\n li {\n border-bottom: 1px solid;\n border-color: $fallback--border;\n border-color: var(--border, $fallback--border);\n padding: 0;\n\n &:last-child a {\n border-bottom-right-radius: $fallback--panelRadius;\n border-bottom-right-radius: var(--panelRadius, $fallback--panelRadius);\n border-bottom-left-radius: $fallback--panelRadius;\n border-bottom-left-radius: var(--panelRadius, $fallback--panelRadius);\n }\n\n &:last-child {\n border: none;\n }\n }\n}\n\n.TimelineMenu {\n margin-right: auto;\n min-width: 0;\n\n .popover-trigger-button {\n vertical-align: bottom;\n }\n\n .panel::after {\n border-top-right-radius: 0;\n border-top-left-radius: 0;\n }\n\n .timeline-menu-title {\n margin: 0;\n cursor: pointer;\n user-select: none;\n width: 100%;\n display: flex;\n\n .timeline-menu-name {\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n }\n\n svg {\n margin-left: 0.6em;\n transition: transform 100ms;\n }\n\n .click-blocker {\n cursor: default;\n flex-grow: 1;\n }\n }\n\n &.open .timeline-menu-title svg {\n color: $fallback--text;\n color: var(--panelText, $fallback--text);\n transform: rotate(180deg);\n }\n\n .panel {\n box-shadow: var(--popoverShadow);\n }\n}\n","@import \"../../variables\";\n\n.Timeline {\n .alert-dot {\n border-radius: 100%;\n height: 8px;\n width: 8px;\n position: absolute;\n left: calc(50% - 4px);\n top: calc(50% - 4px);\n margin-left: 6px;\n margin-top: -6px;\n background-color: var(--badgeNeutral);\n }\n\n .alert-badge {\n font-size: 0.75em;\n line-height: 1;\n text-align: right;\n border-radius: var(--tooltipRadius);\n position: absolute;\n left: calc(50% - 0.5em);\n top: calc(50% - 0.4em);\n padding: 0.2em;\n margin-left: 0.7em;\n margin-top: -1em;\n background-color: var(--badgeNeutral);\n color: var(--badgeNeutralText);\n }\n\n .loadmore-button {\n position: relative;\n }\n\n &.-blocked {\n cursor: progress;\n }\n\n .conversation-heading {\n top: calc(var(--__panel-heading-height) * var(--currentPanelStack, 2));\n z-index: 2;\n }\n\n &.-nonpanel {\n .timeline-heading {\n text-align: center;\n line-height: 2.75em;\n padding: 0 0.5em;\n\n .button-default,\n .alert {\n line-height: 2em;\n width: 100%;\n }\n }\n }\n}\n","@import \"../../variables\";\n\n/* stylelint-disable no-descending-specificity */\n.tab-switcher {\n display: flex;\n\n .tab-icon {\n margin: 0.2em auto;\n display: block;\n }\n\n &.top-tabs {\n flex-direction: column;\n\n > .tabs {\n width: 100%;\n overflow-y: hidden;\n overflow-x: auto;\n padding-top: 5px;\n flex-direction: row;\n flex: 0 0 auto;\n\n &::after,\n &::before {\n content: \"\";\n flex: 1 1 auto;\n border-bottom: 1px solid;\n border-bottom-color: $fallback--border;\n border-bottom-color: var(--border, $fallback--border);\n }\n\n .tab-wrapper {\n height: 2em;\n\n &:not(.active)::after {\n left: 0;\n right: 0;\n bottom: 0;\n border-bottom: 1px solid;\n border-bottom-color: $fallback--border;\n border-bottom-color: var(--border, $fallback--border);\n }\n }\n\n .tab {\n width: 100%;\n min-width: 1px;\n border-bottom-left-radius: 0;\n border-bottom-right-radius: 0;\n padding-bottom: 99px;\n margin-bottom: 6px - 99px;\n }\n }\n\n .contents.scrollable-tabs {\n flex-basis: 0;\n }\n }\n\n &.side-tabs {\n flex-direction: row;\n\n @media all and (max-width: 800px) {\n overflow-x: auto;\n }\n\n > .contents {\n flex: 1 1 auto;\n }\n\n > .tabs {\n flex: 0 0 auto;\n overflow-y: auto;\n overflow-x: hidden;\n flex-direction: column;\n\n &::after,\n &::before {\n flex-shrink: 0;\n flex-basis: 0.5em;\n content: \"\";\n border-right: 1px solid;\n border-right-color: $fallback--border;\n border-right-color: var(--border, $fallback--border);\n }\n\n &::after {\n flex-grow: 1;\n }\n\n &::before {\n flex-grow: 0;\n }\n\n .tab-wrapper {\n min-width: 10em;\n display: flex;\n flex-direction: column;\n\n @media all and (max-width: 800px) {\n min-width: 4em;\n }\n\n &:not(.active)::after {\n top: 0;\n right: 0;\n bottom: 0;\n border-right: 1px solid;\n border-right-color: $fallback--border;\n border-right-color: var(--border, $fallback--border);\n }\n\n &::before {\n flex: 0 0 6px;\n content: \"\";\n border-right: 1px solid;\n border-right-color: $fallback--border;\n border-right-color: var(--border, $fallback--border);\n }\n\n &:last-child .tab {\n margin-bottom: 0;\n }\n }\n\n .tab {\n flex: 1;\n box-sizing: content-box;\n min-width: 10em;\n min-width: 1px;\n border-top-right-radius: 0;\n border-bottom-right-radius: 0;\n padding-left: 1em;\n padding-right: calc(1em + 200px);\n margin-right: -200px;\n margin-left: 1em;\n\n @media all and (max-width: 800px) {\n padding-left: 0.25em;\n padding-right: calc(0.25em + 200px);\n margin-right: calc(0.25em - 200px);\n margin-left: 0.25em;\n\n .text {\n display: none;\n }\n }\n }\n }\n }\n\n .contents {\n flex: 1 0 auto;\n min-height: 0;\n\n .hidden {\n display: none;\n }\n\n .full-height:not(.hidden) {\n height: 100%;\n display: flex;\n flex-direction: column;\n\n > *:not(.mobile-label) {\n flex: 1;\n }\n }\n\n &.scrollable-tabs {\n overflow-y: auto;\n }\n }\n\n .tab {\n position: relative;\n white-space: nowrap;\n padding: 6px 1em;\n\n &:not(.active) {\n z-index: 4;\n\n &:hover {\n z-index: 6;\n }\n }\n\n &.active {\n background: transparent;\n z-index: 5;\n color: $fallback--text;\n color: var(--tabActiveText, $fallback--text);\n }\n\n img {\n max-height: 26px;\n vertical-align: top;\n margin-top: -5px;\n }\n }\n\n .tabs {\n display: flex;\n position: relative;\n box-sizing: border-box;\n\n &::after,\n &::before {\n display: block;\n flex: 1 1 auto;\n }\n }\n\n .tab-wrapper {\n position: relative;\n display: flex;\n flex: 0 0 auto;\n\n &:not(.active) {\n &::after {\n content: \"\";\n position: absolute;\n z-index: 7;\n }\n }\n }\n\n .mobile-label {\n padding-left: 0.3em;\n padding-bottom: 0.25em;\n margin-top: 0.5em;\n margin-left: 0.2em;\n margin-bottom: 0.25em;\n border-bottom: 1px solid var(--border, $fallback--border);\n\n @media all and (min-width: 800px) {\n display: none;\n }\n }\n}\n/* stylelint-enable no-descending-specificity */\n","\n@import \"../../variables\";\n\n.chat-title {\n display: flex;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n\n --emoji-size: 14px;\n\n .username {\n max-width: 100%;\n text-overflow: ellipsis;\n white-space: nowrap;\n display: inline;\n word-wrap: break-word;\n overflow: hidden;\n }\n\n .avatar-container {\n align-self: center;\n line-height: 1;\n }\n\n .titlebar-avatar {\n margin-right: 0.5em;\n height: 1.5em;\n width: 1.5em;\n border-radius: $fallback--avatarAltRadius;\n border-radius: var(--avatarAltRadius, $fallback--avatarAltRadius);\n\n &.animated::before {\n display: none;\n }\n }\n}\n",".chat-list-item {\n display: flex;\n flex-direction: row;\n padding: 0.75em;\n height: 5em;\n overflow: hidden;\n box-sizing: border-box;\n cursor: pointer;\n\n :focus {\n outline: none;\n }\n\n &:hover {\n background-color: var(--selectedPost, $fallback--lightBg);\n box-shadow: 0 0 3px 1px rgb(0 0 0 / 10%);\n }\n\n .chat-list-item-left {\n margin-right: 1em;\n }\n\n .chat-list-item-center {\n width: 100%;\n box-sizing: border-box;\n overflow: hidden;\n word-wrap: break-word;\n }\n\n .heading {\n width: 100%;\n display: inline-flex;\n justify-content: space-between;\n line-height: 1em;\n }\n\n .heading-right {\n white-space: nowrap;\n }\n\n .name-and-account-name {\n text-overflow: ellipsis;\n white-space: nowrap;\n overflow: hidden;\n flex-shrink: 1;\n line-height: var(--post-line-height);\n }\n\n .chat-preview {\n display: inline-flex;\n overflow: hidden;\n white-space: nowrap;\n text-overflow: ellipsis;\n margin: 0.35em 0;\n color: $fallback--text;\n color: var(--faint, $fallback--text);\n width: 100%;\n }\n\n a {\n color: var(--faintLink, $fallback--link);\n text-decoration: none;\n pointer-events: none;\n }\n\n &:hover .animated.avatar {\n canvas {\n display: none;\n }\n\n img {\n visibility: visible;\n }\n }\n\n .Avatar {\n border-radius: $fallback--avatarAltRadius;\n border-radius: var(--avatarAltRadius, $fallback--avatarAltRadius);\n }\n\n .chat-preview-body {\n --emoji-size: 1.4em;\n\n padding-right: 1em;\n }\n\n .time-wrapper {\n line-height: var(--post-line-height);\n }\n}\n","\n.basic-user-card {\n display: flex;\n flex: 1 0;\n margin: 0;\n padding: 0.6em 1em;\n\n --emoji-size: 14px;\n\n &-collapsed-content {\n margin-left: 0.7em;\n text-align: left;\n flex: 1;\n min-width: 0;\n }\n\n &-user-name {\n img {\n object-fit: contain;\n height: 16px;\n width: 16px;\n vertical-align: middle;\n }\n }\n\n &-user-name-value,\n &-screen-name {\n display: inline-block;\n max-width: 100%;\n overflow: hidden;\n white-space: nowrap;\n text-overflow: ellipsis;\n }\n\n &-expanded-content {\n flex: 1;\n margin-left: 0.7em;\n min-width: 0;\n }\n}\n",".chat-new {\n .input-wrap {\n display: flex;\n margin: 0.7em 0.5em;\n\n input {\n width: 100%;\n }\n }\n\n .search-icon {\n margin-right: 0.3em;\n }\n\n .member-list {\n padding-bottom: 0.7rem;\n }\n\n .basic-user-card:hover {\n cursor: pointer;\n background-color: var(--selectedPost, $fallback--lightBg);\n }\n\n .go-back-button {\n text-align: center;\n line-height: 1;\n height: 100%;\n align-self: start;\n width: var(--__panel-heading-height-inner);\n }\n}\n","\n@import \"../../variables\";\n\n.chat-list {\n min-height: 25em;\n margin-bottom: 0;\n}\n\n.emtpy-chat-list-alert {\n padding: 3em;\n font-size: 1.2em;\n display: flex;\n justify-content: center;\n color: $fallback--text;\n color: var(--faint, $fallback--text);\n}\n\n","@import \"../../variables\";\n\n.chat-message-wrapper {\n &.hovered-message-chain {\n .animated.Avatar {\n canvas {\n display: none;\n }\n\n img {\n visibility: visible;\n }\n }\n }\n\n .chat-message-menu {\n transition: opacity 0.1s;\n opacity: 0;\n position: absolute;\n top: -0.8em;\n\n button {\n padding-top: 0.2em;\n padding-bottom: 0.2em;\n }\n }\n\n .menu-icon {\n cursor: pointer;\n\n &:hover,\n .extra-button-popover.open & {\n color: $fallback--text;\n color: var(--text, $fallback--text);\n }\n }\n\n .popover {\n width: 12em;\n }\n\n .chat-message {\n display: flex;\n padding-bottom: 0.5em;\n\n .status-body:hover {\n --_still-image-img-visibility: visible;\n --_still-image-canvas-visibility: hidden;\n --_still-image-label-visibility: hidden;\n }\n }\n\n .avatar-wrapper {\n margin-right: 0.72em;\n width: 32px;\n }\n\n .link-preview,\n .attachments {\n margin-bottom: 1em;\n }\n\n .status {\n border-radius: $fallback--chatMessageRadius;\n border-radius: var(--chatMessageRadius, $fallback--chatMessageRadius);\n display: flex;\n padding: 0.75em;\n }\n\n .created-at {\n position: relative;\n float: right;\n font-size: 0.8em;\n margin: -1em 0 -0.5em;\n font-style: italic;\n opacity: 0.8;\n }\n\n .without-attachment {\n .message-content {\n // TODO figure out how to do it properly\n .RichContent::after {\n margin-right: 5.4em;\n content: \" \";\n display: inline-block;\n }\n }\n }\n\n .pending {\n .status-content.media-body,\n .created-at {\n color: var(--faint);\n }\n }\n\n .error {\n .status-content.media-body,\n .created-at {\n color: $fallback--cRed;\n color: var(--badgeNotification, $fallback--cRed);\n }\n }\n\n .chat-message-inner {\n display: flex;\n flex-direction: column;\n align-items: flex-start;\n max-width: 80%;\n min-width: 10em;\n width: 100%;\n }\n\n .outgoing {\n display: flex;\n flex-flow: row wrap;\n align-content: end;\n justify-content: flex-end;\n\n a {\n color: var(--chatMessageOutgoingLink, $fallback--link);\n }\n\n .status {\n color: var(--chatMessageOutgoingText, $fallback--text);\n background-color: var(--chatMessageOutgoingBg, $fallback--lightBg);\n border: 1px solid var(--chatMessageOutgoingBorder, --lightBg);\n }\n\n .chat-message-inner {\n align-items: flex-end;\n }\n\n .chat-message-menu {\n right: 0.4rem;\n }\n }\n\n .incoming {\n a {\n color: var(--chatMessageIncomingLink, $fallback--link);\n }\n\n .status {\n color: var(--chatMessageIncomingText, $fallback--text);\n background-color: var(--chatMessageIncomingBg, $fallback--bg);\n border: 1px solid var(--chatMessageIncomingBorder, --border);\n }\n\n .created-at {\n a {\n color: var(--chatMessageIncomingText, $fallback--text);\n }\n }\n\n .chat-message-menu {\n left: 0.4rem;\n }\n }\n\n .chat-message-inner.with-media {\n width: 100%;\n\n .status {\n width: 100%;\n }\n }\n\n .visible {\n opacity: 1;\n }\n}\n\n.chat-message-date-separator {\n text-align: center;\n margin: 1.4em 0;\n font-size: 0.9em;\n user-select: none;\n color: $fallback--text;\n color: var(--faintedText, $fallback--text);\n}\n",".chat-view {\n display: flex;\n height: 100%;\n\n .chat-view-inner {\n height: auto;\n width: 100%;\n overflow: visible;\n display: flex;\n }\n\n .chat-view-body {\n box-sizing: border-box;\n background-color: var(--chatBg, $fallback--bg);\n display: flex;\n flex-direction: column;\n width: 100%;\n overflow: visible;\n min-height: calc(100vh - var(--navbar-height));\n margin: 0;\n border-radius: 10px 10px 0 0;\n border-radius: var(--panelRadius, 10px) var(--panelRadius, 10px) 0 0;\n\n &::after {\n border-radius: 0;\n }\n }\n\n .message-list {\n padding: 0 0.8em;\n height: 100%;\n display: flex;\n flex-direction: column;\n justify-content: end;\n }\n\n .footer {\n position: sticky;\n bottom: 0;\n background-color: $fallback--bg;\n background-color: var(--bg, $fallback--bg);\n z-index: 1;\n }\n\n .chat-view-heading {\n grid-template-columns: auto minmax(50%, 1fr);\n }\n\n .go-back-button {\n text-align: center;\n line-height: 1;\n height: 100%;\n align-self: start;\n width: var(--__panel-heading-height-inner);\n }\n\n .jump-to-bottom-button {\n width: 2.5em;\n height: 2.5em;\n border-radius: 100%;\n position: absolute;\n right: 1.3em;\n top: -3.2em;\n background-color: $fallback--fg;\n background-color: var(--btn, $fallback--fg);\n display: flex;\n justify-content: center;\n align-items: center;\n box-shadow: 0 1px 1px rgb(0 0 0 / 30%), 0 2px 4px rgb(0 0 0 / 30%);\n z-index: 10;\n transition: 0.35s all;\n transition-timing-function: cubic-bezier(0, 1, 0.5, 1);\n opacity: 0;\n visibility: hidden;\n cursor: pointer;\n\n &.visible {\n opacity: 1;\n visibility: visible;\n }\n\n i {\n font-size: 1em;\n color: $fallback--text;\n color: var(--text, $fallback--text);\n }\n\n .unread-message-count {\n font-size: 0.8em;\n left: 50%;\n margin-top: -1rem;\n padding: 0.1em;\n border-radius: 50px;\n position: absolute;\n }\n\n .chat-loading-error {\n width: 100%;\n display: flex;\n align-items: flex-end;\n height: 100%;\n\n .error {\n width: 100%;\n }\n }\n }\n}\n","\n.follow-card {\n &-content-container {\n flex-shrink: 0;\n display: flex;\n flex-flow: row wrap;\n justify-content: space-between;\n line-height: 1.5em;\n }\n\n &-button {\n margin-top: 0.5em;\n padding: 0 1.5em;\n margin-left: 1em;\n }\n\n &-follow-button {\n margin-top: 0.5em;\n margin-left: auto;\n width: 10em;\n }\n}\n","@import \"../../variables\";\n\n.with-load-more {\n &-footer {\n padding: 10px;\n text-align: center;\n border-top: 1px solid;\n border-top-color: $fallback--border;\n border-top-color: var(--border, $fallback--border);\n\n .error {\n font-size: 1rem;\n }\n\n a {\n cursor: pointer;\n }\n }\n}\n","\n@import \"../../variables\";\n\n.user-profile {\n flex: 2;\n flex-basis: 500px;\n\n // No sticky header on user profile\n --currentPanelStack: 1;\n\n .user-birthday {\n margin: 0 0.75em 0.5em;\n }\n\n .user-profile-fields {\n margin: 0 0.5em;\n\n img {\n object-fit: contain;\n vertical-align: middle;\n max-width: 100%;\n max-height: 400px;\n\n &.emoji {\n width: 18px;\n height: 18px;\n }\n }\n\n .user-profile-field {\n display: flex;\n margin: 0.25em;\n border: 1px solid var(--border, $fallback--border);\n border-radius: $fallback--inputRadius;\n border-radius: var(--inputRadius, $fallback--inputRadius);\n\n .user-profile-field-name {\n flex: 0 1 30%;\n font-weight: 500;\n text-align: right;\n color: var(--lightText);\n min-width: 120px;\n border-right: 1px solid var(--border, $fallback--border);\n }\n\n .user-profile-field-value {\n flex: 1 1 70%;\n color: var(--text);\n margin: 0 0 0 0.25em;\n }\n\n .user-profile-field-name,\n .user-profile-field-value {\n line-height: 1.3;\n text-overflow: ellipsis;\n white-space: nowrap;\n overflow: hidden;\n padding: 0.5em 1.5em;\n box-sizing: border-box;\n }\n }\n }\n\n .userlist-placeholder {\n display: flex;\n justify-content: center;\n align-items: middle;\n padding: 2em;\n }\n}\n\n.user-profile-placeholder {\n .panel-body {\n display: flex;\n justify-content: center;\n align-items: middle;\n padding: 7em;\n }\n}\n","\n@import \"../../variables\";\n\n.search-result-heading {\n color: $fallback--faint;\n color: var(--faint, $fallback--faint);\n padding: 0.75rem;\n text-align: center;\n}\n\n@media all and (max-width: 800px) {\n .search-nav-heading {\n .tab-switcher .tabs .tab-wrapper {\n display: block;\n justify-content: center;\n flex: 1 1 auto;\n text-align: center;\n }\n }\n}\n\n.search-result {\n box-sizing: border-box;\n border-bottom: 1px solid;\n border-color: $fallback--border;\n border-color: var(--border, $fallback--border);\n}\n\n.search-result-footer {\n border-width: 1px 0 0;\n border-style: solid;\n border-color: var(--border, $fallback--border);\n padding: 10px;\n background-color: $fallback--fg;\n background-color: var(--panel, $fallback--fg);\n}\n\n.search-input-container {\n padding: 0.8rem;\n display: flex;\n justify-content: center;\n\n .search-input {\n width: 100%;\n line-height: 1.125rem;\n font-size: 1rem;\n padding: 0.5rem;\n box-sizing: border-box;\n }\n\n .search-button {\n margin-left: 0.5em;\n }\n}\n\n.loading-icon {\n padding: 1em;\n}\n\n.trend {\n display: flex;\n align-items: center;\n\n .hashtag {\n flex: 1 1 auto;\n color: $fallback--text;\n color: var(--text, $fallback--text);\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n }\n\n .count {\n flex: 0 0 auto;\n width: 2rem;\n font-size: 1.5rem;\n line-height: 2.25rem;\n font-weight: 500;\n text-align: center;\n color: $fallback--text;\n color: var(--text, $fallback--text);\n }\n}\n\n.more-statuses-button {\n height: 3.5em;\n line-height: 3.5em;\n}\n\n","\n@import \"../../variables\";\n\n.interface-language-switcher {\n .language-select {\n margin-right: 1em;\n }\n}\n","\n@import \"../../variables\";\n$validations-cRed: #f04124;\n\n.registration-form {\n display: flex;\n flex-direction: column;\n margin: 0.6em;\n\n .container {\n display: flex;\n flex-direction: row;\n\n > * {\n min-width: 0;\n }\n }\n\n .terms-of-service {\n flex: 0 1 50%;\n margin: 0.8em;\n }\n\n .text-fields {\n margin-top: 0.6em;\n flex: 1 0;\n display: flex;\n flex-direction: column;\n }\n\n textarea {\n min-height: 100px;\n resize: vertical;\n }\n\n .form-group {\n display: flex;\n flex-direction: column;\n padding: 0.3em 0;\n line-height: 2;\n margin-bottom: 1em;\n }\n\n .form-group--error {\n animation-name: shakeError;\n animation-duration: 0.6s;\n animation-timing-function: ease-in-out;\n }\n\n .form-group--error .form--label {\n color: $validations-cRed;\n color: var(--cRed, $validations-cRed);\n }\n\n .form-error {\n margin-top: -0.7em;\n text-align: left;\n\n span {\n font-size: 0.85em;\n }\n }\n\n .form-error ul {\n list-style: none;\n padding: 0 0 0 5px;\n margin-top: 0;\n\n li::before {\n content: \"• \";\n }\n }\n\n form textarea {\n line-height: 16px;\n resize: vertical;\n }\n\n .captcha {\n max-width: 350px;\n margin-bottom: 0.4em;\n }\n\n .btn {\n margin-top: 0.6em;\n height: 2em;\n }\n\n .error {\n text-align: center;\n }\n}\n\n@media all and (max-width: 800px) {\n .registration-form .container {\n flex-direction: column-reverse;\n }\n}\n","\n@import \"../../variables\";\n\n.password-reset-form {\n display: flex;\n flex-direction: column;\n align-items: center;\n margin: 0.6em;\n\n .container {\n display: flex;\n flex: 1 0;\n flex-direction: column;\n margin-top: 0.6em;\n max-width: 18rem;\n\n > * {\n min-width: 0;\n }\n }\n\n .form-group {\n display: flex;\n flex-direction: column;\n margin-bottom: 1em;\n padding: 0.3em 0;\n line-height: 1.85em;\n }\n\n .error {\n text-align: center;\n animation-name: shakeError;\n animation-duration: 0.4s;\n animation-timing-function: ease-in-out;\n }\n\n .alert {\n padding: 0.5em;\n margin: 0.3em 0 1em;\n }\n\n .password-reset-required {\n background-color: var(--alertError, $fallback--alertError);\n padding: 10px 0;\n }\n\n .notice-dismissible {\n padding-right: 2rem;\n }\n\n .dismiss {\n cursor: pointer;\n }\n}\n\n","\n.follow-request-card-content-container {\n display: flex;\n flex-flow: row wrap;\n\n button {\n margin-top: 0.5em;\n margin-right: 0.5em;\n flex: 1 1;\n max-width: 12em;\n min-width: 8em;\n\n &:last-child {\n margin-right: 0;\n }\n }\n}\n","\n.tos-content {\n margin: 1em;\n}\n","\n.staff-group {\n padding-left: 1em;\n padding-top: 1em;\n\n .basic-user-card {\n padding-left: 0;\n }\n}\n\n",".mrf-section {\n margin: 1em;\n\n table {\n width: 100%;\n text-align: left;\n padding-left: 10px;\n padding-bottom: 20px;\n\n th,\n td {\n width: 180px;\n max-width: 360px;\n overflow: hidden;\n vertical-align: text-top;\n }\n\n th + th,\n td + td {\n width: auto;\n }\n }\n}\n","\n@import \"../../variables\";\n\n.list-card {\n display: flex;\n}\n\n.list-name {\n flex-grow: 1;\n}\n\n.list-name,\n.button-list-edit {\n margin: 0;\n padding: 1em;\n color: $fallback--link;\n color: var(--link, $fallback--link);\n\n &:hover {\n background-color: $fallback--lightBg;\n background-color: var(--selectedMenu, $fallback--lightBg);\n color: $fallback--link;\n color: var(--selectedMenuText, $fallback--link);\n\n --faint: var(--selectedMenuFaintText, $fallback--faint);\n --faintLink: var(--selectedMenuFaintLink, $fallback--faint);\n --lightText: var(--selectedMenuLightText, $fallback--lightText);\n }\n}\n","\n.Lists {\n .new-list-button {\n padding: 0 0.5em;\n }\n}\n","\n@import \"../../variables\";\n\n.ListsUserSearch {\n .input-wrap {\n display: flex;\n margin: 0.7em 0.5em;\n\n input {\n width: 100%;\n }\n }\n\n .search-icon {\n margin-right: 0.3em;\n }\n}\n\n","\n@import \"src/variables\";\n\n.panel-loading {\n display: flex;\n height: 100%;\n align-items: center;\n justify-content: center;\n font-size: 2em;\n color: $fallback--text;\n color: var(--text, $fallback--text);\n\n .loading-text svg {\n line-height: 0;\n vertical-align: middle;\n color: $fallback--text;\n color: var(--text, $fallback--text);\n }\n}\n","\n@import \"../../variables\";\n\n.ListEdit {\n --panel-body-padding: 0.5em;\n\n height: calc(100vh - var(--navbar-height));\n overflow: hidden;\n display: flex;\n flex-direction: column;\n\n .list-edit-heading {\n grid-template-columns: auto minmax(50%, 1fr);\n }\n\n .panel-body {\n display: flex;\n flex: 1;\n flex-direction: column;\n overflow: hidden;\n }\n\n .list-member-management {\n flex: 1 0 auto;\n }\n\n .search-icon {\n margin-right: 0.3em;\n }\n\n .users-list {\n padding-bottom: 0.7rem;\n overflow-y: auto;\n }\n\n & .search-list,\n & .members-list {\n overflow: hidden;\n flex-direction: column;\n min-height: 0;\n }\n\n .go-back-button {\n text-align: center;\n line-height: 1;\n height: 100%;\n align-self: start;\n width: var(--__panel-heading-height-inner);\n }\n\n .btn {\n margin: 0 0.5em;\n }\n\n .panel-footer {\n grid-template-columns: minmax(10%, 1fr);\n\n .footer-button {\n min-width: 9em;\n }\n }\n}\n","\n.announcement-editor {\n display: flex;\n align-items: stretch;\n flex-direction: column;\n\n .announcement-metadata {\n margin-top: 0.5em;\n }\n\n .post-textarea {\n resize: vertical;\n height: 10em;\n overflow: none;\n box-sizing: content-box;\n }\n}\n","\n@import \"../../variables\";\n\n.announcement {\n border-bottom: 1px solid var(--border, $fallback--border);\n border-radius: 0;\n padding: var(--status-margin, $status-margin);\n\n .heading,\n .body {\n margin-bottom: var(--status-margin, $status-margin);\n }\n\n .footer {\n display: flex;\n flex-direction: column;\n\n .times {\n display: flex;\n flex-direction: column;\n }\n }\n\n .footer .actions {\n display: flex;\n flex-direction: row;\n justify-content: space-evenly;\n\n .btn {\n flex: 1;\n margin: 1em;\n max-width: 10em;\n }\n }\n}\n","\n@import \"../../variables\";\n\n.announcements-page {\n .post-form {\n padding: var(--status-margin, $status-margin);\n\n .heading,\n .body {\n margin-bottom: var(--status-margin, $status-margin);\n }\n\n .post-button {\n min-width: 10em;\n }\n }\n}\n"],"names":[],"sourceRoot":""}
\ No newline at end of file
diff --git a/priv/static/static/js/1264.1e16af28a0b44d4d17d0.js b/priv/static/static/js/1264.1e16af28a0b44d4d17d0.js
deleted file mode 100644
index 009294aea1..0000000000
Binary files a/priv/static/static/js/1264.1e16af28a0b44d4d17d0.js and /dev/null differ
diff --git a/priv/static/static/js/1264.1e16af28a0b44d4d17d0.js.map b/priv/static/static/js/1264.1e16af28a0b44d4d17d0.js.map
deleted file mode 100644
index 800de87a75..0000000000
Binary files a/priv/static/static/js/1264.1e16af28a0b44d4d17d0.js.map and /dev/null differ
diff --git a/priv/static/static/js/1325.d1e5fcff4166acac7f06.js b/priv/static/static/js/1325.d1e5fcff4166acac7f06.js
deleted file mode 100644
index e3b9a8656f..0000000000
Binary files a/priv/static/static/js/1325.d1e5fcff4166acac7f06.js and /dev/null differ
diff --git a/priv/static/static/js/1325.d1e5fcff4166acac7f06.js.map b/priv/static/static/js/1325.d1e5fcff4166acac7f06.js.map
deleted file mode 100644
index 45c7ed8698..0000000000
Binary files a/priv/static/static/js/1325.d1e5fcff4166acac7f06.js.map and /dev/null differ
diff --git a/priv/static/static/js/159.903e90c9de8ef6c67077.js b/priv/static/static/js/159.903e90c9de8ef6c67077.js
new file mode 100644
index 0000000000..c910bd9872
Binary files /dev/null and b/priv/static/static/js/159.903e90c9de8ef6c67077.js differ
diff --git a/priv/static/static/js/159.903e90c9de8ef6c67077.js.map b/priv/static/static/js/159.903e90c9de8ef6c67077.js.map
new file mode 100644
index 0000000000..73a1c555c6
Binary files /dev/null and b/priv/static/static/js/159.903e90c9de8ef6c67077.js.map differ
diff --git a/priv/static/static/js/2677.45ff400a54f2f4c858f2.js b/priv/static/static/js/2677.45ff400a54f2f4c858f2.js
deleted file mode 100644
index e4434874cf..0000000000
Binary files a/priv/static/static/js/2677.45ff400a54f2f4c858f2.js and /dev/null differ
diff --git a/priv/static/static/js/2677.45ff400a54f2f4c858f2.js.map b/priv/static/static/js/2677.45ff400a54f2f4c858f2.js.map
deleted file mode 100644
index a56f5cc2e6..0000000000
Binary files a/priv/static/static/js/2677.45ff400a54f2f4c858f2.js.map and /dev/null differ
diff --git a/priv/static/static/js/3733.7060d1e6bca813125a0c.js b/priv/static/static/js/3733.7060d1e6bca813125a0c.js
new file mode 100644
index 0000000000..76ca488f01
Binary files /dev/null and b/priv/static/static/js/3733.7060d1e6bca813125a0c.js differ
diff --git a/priv/static/static/js/9169.335214f6ab57538eae0b.js.LICENSE.txt b/priv/static/static/js/3733.7060d1e6bca813125a0c.js.LICENSE.txt
similarity index 81%
rename from priv/static/static/js/9169.335214f6ab57538eae0b.js.LICENSE.txt
rename to priv/static/static/js/3733.7060d1e6bca813125a0c.js.LICENSE.txt
index b7325e5fc8..30288d49db 100644
--- a/priv/static/static/js/9169.335214f6ab57538eae0b.js.LICENSE.txt
+++ b/priv/static/static/js/3733.7060d1e6bca813125a0c.js.LICENSE.txt
@@ -33,12 +33,6 @@
/*! (c) Andrea Giammarchi - ISC */
-/*! https://mths.be/punycode v1.3.2 by @mathias */
-
/*! js-cookie v3.0.1 | MIT */
-/*! lozad.js - v1.16.0 - 2020-09-06
-* https://github.com/ApoorvSaxena/lozad.js
-* Copyright (c) 2020 Apoorv Saxena; Licensed MIT */
-
/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */
diff --git a/priv/static/static/js/3733.7060d1e6bca813125a0c.js.map b/priv/static/static/js/3733.7060d1e6bca813125a0c.js.map
new file mode 100644
index 0000000000..9d6635c58f
Binary files /dev/null and b/priv/static/static/js/3733.7060d1e6bca813125a0c.js.map differ
diff --git a/priv/static/static/js/48.b5ecdbc517423af07ca4.js b/priv/static/static/js/48.b5ecdbc517423af07ca4.js
new file mode 100644
index 0000000000..cfb9ae7d11
Binary files /dev/null and b/priv/static/static/js/48.b5ecdbc517423af07ca4.js differ
diff --git a/priv/static/static/js/2677.45ff400a54f2f4c858f2.js.LICENSE.txt b/priv/static/static/js/48.b5ecdbc517423af07ca4.js.LICENSE.txt
similarity index 77%
rename from priv/static/static/js/2677.45ff400a54f2f4c858f2.js.LICENSE.txt
rename to priv/static/static/js/48.b5ecdbc517423af07ca4.js.LICENSE.txt
index eebbec8f56..d6dc2a16c2 100644
--- a/priv/static/static/js/2677.45ff400a54f2f4c858f2.js.LICENSE.txt
+++ b/priv/static/static/js/48.b5ecdbc517423af07ca4.js.LICENSE.txt
@@ -1,11 +1,11 @@
/*!
- * Cropper.js v1.5.12
+ * Cropper.js v1.5.13
* https://fengyuanchen.github.io/cropperjs
*
* Copyright 2015-present Chen Fengyuan
* Released under the MIT license
*
- * Date: 2021-06-12T08:00:17.411Z
+ * Date: 2022-11-20T05:30:46.114Z
*/
/*! vue-qrcode v2.0.0 | (c) 2018-present Chen Fengyuan | MIT */
diff --git a/priv/static/static/js/48.b5ecdbc517423af07ca4.js.map b/priv/static/static/js/48.b5ecdbc517423af07ca4.js.map
new file mode 100644
index 0000000000..0693a5f082
Binary files /dev/null and b/priv/static/static/js/48.b5ecdbc517423af07ca4.js.map differ
diff --git a/priv/static/static/js/6464.2ababce187697ee8b1e9.js.map b/priv/static/static/js/6464.2ababce187697ee8b1e9.js.map
deleted file mode 100644
index 436b31e7d2..0000000000
Binary files a/priv/static/static/js/6464.2ababce187697ee8b1e9.js.map and /dev/null differ
diff --git a/priv/static/static/js/6464.2ababce187697ee8b1e9.js b/priv/static/static/js/6464.eb9c90a1c948cde554e9.js
similarity index 97%
rename from priv/static/static/js/6464.2ababce187697ee8b1e9.js
rename to priv/static/static/js/6464.eb9c90a1c948cde554e9.js
index 1224027165..28ca3ceb89 100644
Binary files a/priv/static/static/js/6464.2ababce187697ee8b1e9.js and b/priv/static/static/js/6464.eb9c90a1c948cde554e9.js differ
diff --git a/priv/static/static/js/6464.eb9c90a1c948cde554e9.js.map b/priv/static/static/js/6464.eb9c90a1c948cde554e9.js.map
new file mode 100644
index 0000000000..161864e863
Binary files /dev/null and b/priv/static/static/js/6464.eb9c90a1c948cde554e9.js.map differ
diff --git a/priv/static/static/js/7586.628f729b9c8b2e6f4e1f.js b/priv/static/static/js/7586.628f729b9c8b2e6f4e1f.js
new file mode 100644
index 0000000000..7755913b51
Binary files /dev/null and b/priv/static/static/js/7586.628f729b9c8b2e6f4e1f.js differ
diff --git a/priv/static/static/js/7586.628f729b9c8b2e6f4e1f.js.map b/priv/static/static/js/7586.628f729b9c8b2e6f4e1f.js.map
new file mode 100644
index 0000000000..d76dd91ac5
Binary files /dev/null and b/priv/static/static/js/7586.628f729b9c8b2e6f4e1f.js.map differ
diff --git a/priv/static/static/js/7962.e25d40b042f8ee7389c3.js b/priv/static/static/js/7962.e25d40b042f8ee7389c3.js
new file mode 100644
index 0000000000..aa740878bc
Binary files /dev/null and b/priv/static/static/js/7962.e25d40b042f8ee7389c3.js differ
diff --git a/priv/static/static/js/7962.e25d40b042f8ee7389c3.js.map b/priv/static/static/js/7962.e25d40b042f8ee7389c3.js.map
new file mode 100644
index 0000000000..cbe1b1bf38
Binary files /dev/null and b/priv/static/static/js/7962.e25d40b042f8ee7389c3.js.map differ
diff --git a/priv/static/static/js/8532.290194af65a2e3a4120e.js b/priv/static/static/js/8532.290194af65a2e3a4120e.js
deleted file mode 100644
index a79caf9859..0000000000
Binary files a/priv/static/static/js/8532.290194af65a2e3a4120e.js and /dev/null differ
diff --git a/priv/static/static/js/8532.290194af65a2e3a4120e.js.map b/priv/static/static/js/8532.290194af65a2e3a4120e.js.map
deleted file mode 100644
index f2a8fcc80f..0000000000
Binary files a/priv/static/static/js/8532.290194af65a2e3a4120e.js.map and /dev/null differ
diff --git a/priv/static/static/js/8859.c76b0a0c3a4b5acbef11.js b/priv/static/static/js/8859.c76b0a0c3a4b5acbef11.js
new file mode 100644
index 0000000000..d175c89eaf
Binary files /dev/null and b/priv/static/static/js/8859.c76b0a0c3a4b5acbef11.js differ
diff --git a/priv/static/static/js/8859.c76b0a0c3a4b5acbef11.js.map b/priv/static/static/js/8859.c76b0a0c3a4b5acbef11.js.map
new file mode 100644
index 0000000000..52283bef4b
Binary files /dev/null and b/priv/static/static/js/8859.c76b0a0c3a4b5acbef11.js.map differ
diff --git a/priv/static/static/js/9060.24271e167e0471a1a732.js b/priv/static/static/js/9060.24271e167e0471a1a732.js
new file mode 100644
index 0000000000..2113b7bcbb
Binary files /dev/null and b/priv/static/static/js/9060.24271e167e0471a1a732.js differ
diff --git a/priv/static/static/js/9060.24271e167e0471a1a732.js.map b/priv/static/static/js/9060.24271e167e0471a1a732.js.map
new file mode 100644
index 0000000000..86061615fe
Binary files /dev/null and b/priv/static/static/js/9060.24271e167e0471a1a732.js.map differ
diff --git a/priv/static/static/js/9169.335214f6ab57538eae0b.js b/priv/static/static/js/9169.335214f6ab57538eae0b.js
deleted file mode 100644
index 7bd000f282..0000000000
Binary files a/priv/static/static/js/9169.335214f6ab57538eae0b.js and /dev/null differ
diff --git a/priv/static/static/js/9169.335214f6ab57538eae0b.js.map b/priv/static/static/js/9169.335214f6ab57538eae0b.js.map
deleted file mode 100644
index 5f306b997f..0000000000
Binary files a/priv/static/static/js/9169.335214f6ab57538eae0b.js.map and /dev/null differ
diff --git a/priv/static/static/js/app.4c23e08cf351a54f4177.js b/priv/static/static/js/app.4c23e08cf351a54f4177.js
deleted file mode 100644
index a4227294fd..0000000000
Binary files a/priv/static/static/js/app.4c23e08cf351a54f4177.js and /dev/null differ
diff --git a/priv/static/static/js/app.4c23e08cf351a54f4177.js.map b/priv/static/static/js/app.4c23e08cf351a54f4177.js.map
deleted file mode 100644
index fd6d4c66f9..0000000000
Binary files a/priv/static/static/js/app.4c23e08cf351a54f4177.js.map and /dev/null differ
diff --git a/priv/static/static/js/app.d42ab31e1d50a3265a82.js b/priv/static/static/js/app.d42ab31e1d50a3265a82.js
new file mode 100644
index 0000000000..741e800711
Binary files /dev/null and b/priv/static/static/js/app.d42ab31e1d50a3265a82.js differ
diff --git a/priv/static/static/js/app.d42ab31e1d50a3265a82.js.map b/priv/static/static/js/app.d42ab31e1d50a3265a82.js.map
new file mode 100644
index 0000000000..935d96e9f2
Binary files /dev/null and b/priv/static/static/js/app.d42ab31e1d50a3265a82.js.map differ
diff --git a/priv/static/static/js/i18n/ar-json.4916f840147303aa65fe.js b/priv/static/static/js/i18n/ar-json.4916f840147303aa65fe.js
new file mode 100644
index 0000000000..d824f3dcd8
Binary files /dev/null and b/priv/static/static/js/i18n/ar-json.4916f840147303aa65fe.js differ
diff --git a/priv/static/static/js/i18n/ar-json.4916f840147303aa65fe.js.map b/priv/static/static/js/i18n/ar-json.4916f840147303aa65fe.js.map
new file mode 100644
index 0000000000..65712172a4
Binary files /dev/null and b/priv/static/static/js/i18n/ar-json.4916f840147303aa65fe.js.map differ
diff --git a/priv/static/static/js/i18n/ar-json.d09609af3224232857d6.js b/priv/static/static/js/i18n/ar-json.d09609af3224232857d6.js
deleted file mode 100644
index 2063421b1a..0000000000
Binary files a/priv/static/static/js/i18n/ar-json.d09609af3224232857d6.js and /dev/null differ
diff --git a/priv/static/static/js/i18n/ar-json.d09609af3224232857d6.js.map b/priv/static/static/js/i18n/ar-json.d09609af3224232857d6.js.map
deleted file mode 100644
index 3cfdba5bf5..0000000000
Binary files a/priv/static/static/js/i18n/ar-json.d09609af3224232857d6.js.map and /dev/null differ
diff --git a/priv/static/static/js/i18n/eo-json.6c62eef99e850912498b.js b/priv/static/static/js/i18n/eo-json.6c62eef99e850912498b.js
new file mode 100644
index 0000000000..faf8906d13
Binary files /dev/null and b/priv/static/static/js/i18n/eo-json.6c62eef99e850912498b.js differ
diff --git a/priv/static/static/js/i18n/eo-json.6c62eef99e850912498b.js.map b/priv/static/static/js/i18n/eo-json.6c62eef99e850912498b.js.map
new file mode 100644
index 0000000000..729878820c
Binary files /dev/null and b/priv/static/static/js/i18n/eo-json.6c62eef99e850912498b.js.map differ
diff --git a/priv/static/static/js/i18n/eo-json.8b17b5b5653ed558d931.js b/priv/static/static/js/i18n/eo-json.8b17b5b5653ed558d931.js
deleted file mode 100644
index a20dde2991..0000000000
Binary files a/priv/static/static/js/i18n/eo-json.8b17b5b5653ed558d931.js and /dev/null differ
diff --git a/priv/static/static/js/i18n/eo-json.8b17b5b5653ed558d931.js.map b/priv/static/static/js/i18n/eo-json.8b17b5b5653ed558d931.js.map
deleted file mode 100644
index ed404c5336..0000000000
Binary files a/priv/static/static/js/i18n/eo-json.8b17b5b5653ed558d931.js.map and /dev/null differ
diff --git a/priv/static/static/js/i18n/id-json.3e42564ce7a3a847ecb0.js b/priv/static/static/js/i18n/id-json.3e42564ce7a3a847ecb0.js
deleted file mode 100644
index 5f32c90488..0000000000
Binary files a/priv/static/static/js/i18n/id-json.3e42564ce7a3a847ecb0.js and /dev/null differ
diff --git a/priv/static/static/js/i18n/id-json.3e42564ce7a3a847ecb0.js.map b/priv/static/static/js/i18n/id-json.3e42564ce7a3a847ecb0.js.map
deleted file mode 100644
index 93f938a5d2..0000000000
Binary files a/priv/static/static/js/i18n/id-json.3e42564ce7a3a847ecb0.js.map and /dev/null differ
diff --git a/priv/static/static/js/i18n/id-json.e5c9ee768155f88128b9.js b/priv/static/static/js/i18n/id-json.e5c9ee768155f88128b9.js
new file mode 100644
index 0000000000..19fd2c9810
Binary files /dev/null and b/priv/static/static/js/i18n/id-json.e5c9ee768155f88128b9.js differ
diff --git a/priv/static/static/js/i18n/id-json.e5c9ee768155f88128b9.js.map b/priv/static/static/js/i18n/id-json.e5c9ee768155f88128b9.js.map
new file mode 100644
index 0000000000..8aae964953
Binary files /dev/null and b/priv/static/static/js/i18n/id-json.e5c9ee768155f88128b9.js.map differ
diff --git a/priv/static/static/js/i18n/ja_easy-json.1d5ea7e755b066ac2cdd.js b/priv/static/static/js/i18n/ja_easy-json.1d5ea7e755b066ac2cdd.js
new file mode 100644
index 0000000000..1c2d180992
Binary files /dev/null and b/priv/static/static/js/i18n/ja_easy-json.1d5ea7e755b066ac2cdd.js differ
diff --git a/priv/static/static/js/i18n/ja_easy-json.1d5ea7e755b066ac2cdd.js.map b/priv/static/static/js/i18n/ja_easy-json.1d5ea7e755b066ac2cdd.js.map
new file mode 100644
index 0000000000..d2ba609ba6
Binary files /dev/null and b/priv/static/static/js/i18n/ja_easy-json.1d5ea7e755b066ac2cdd.js.map differ
diff --git a/priv/static/static/js/i18n/ja_easy-json.79705c1ec254307d2224.js b/priv/static/static/js/i18n/ja_easy-json.79705c1ec254307d2224.js
deleted file mode 100644
index d821b20d9f..0000000000
Binary files a/priv/static/static/js/i18n/ja_easy-json.79705c1ec254307d2224.js and /dev/null differ
diff --git a/priv/static/static/js/i18n/ja_easy-json.79705c1ec254307d2224.js.map b/priv/static/static/js/i18n/ja_easy-json.79705c1ec254307d2224.js.map
deleted file mode 100644
index 0a427e44cb..0000000000
Binary files a/priv/static/static/js/i18n/ja_easy-json.79705c1ec254307d2224.js.map and /dev/null differ
diff --git a/priv/static/static/js/i18n/ko-json.4bd28b26a7390a09afc2.js b/priv/static/static/js/i18n/ko-json.4bd28b26a7390a09afc2.js
deleted file mode 100644
index 9828286f14..0000000000
Binary files a/priv/static/static/js/i18n/ko-json.4bd28b26a7390a09afc2.js and /dev/null differ
diff --git a/priv/static/static/js/i18n/ko-json.4bd28b26a7390a09afc2.js.map b/priv/static/static/js/i18n/ko-json.4bd28b26a7390a09afc2.js.map
deleted file mode 100644
index d533234dd8..0000000000
Binary files a/priv/static/static/js/i18n/ko-json.4bd28b26a7390a09afc2.js.map and /dev/null differ
diff --git a/priv/static/static/js/i18n/ko-json.9029d09084bb22d8b705.js b/priv/static/static/js/i18n/ko-json.9029d09084bb22d8b705.js
new file mode 100644
index 0000000000..0fa397271a
Binary files /dev/null and b/priv/static/static/js/i18n/ko-json.9029d09084bb22d8b705.js differ
diff --git a/priv/static/static/js/i18n/ko-json.9029d09084bb22d8b705.js.map b/priv/static/static/js/i18n/ko-json.9029d09084bb22d8b705.js.map
new file mode 100644
index 0000000000..3d37b94b41
Binary files /dev/null and b/priv/static/static/js/i18n/ko-json.9029d09084bb22d8b705.js.map differ
diff --git a/priv/static/static/js/i18n/nan-TW-json.7f2789d8a461e86d1734.js b/priv/static/static/js/i18n/nan-TW-json.7f2789d8a461e86d1734.js
new file mode 100644
index 0000000000..658a3e71f1
Binary files /dev/null and b/priv/static/static/js/i18n/nan-TW-json.7f2789d8a461e86d1734.js differ
diff --git a/priv/static/static/js/i18n/nan-TW-json.7f2789d8a461e86d1734.js.map b/priv/static/static/js/i18n/nan-TW-json.7f2789d8a461e86d1734.js.map
new file mode 100644
index 0000000000..fa8649aa7d
Binary files /dev/null and b/priv/static/static/js/i18n/nan-TW-json.7f2789d8a461e86d1734.js.map differ
diff --git a/priv/static/static/js/i18n/uk-json.003908af9b15becdd382.js b/priv/static/static/js/i18n/uk-json.003908af9b15becdd382.js
new file mode 100644
index 0000000000..54a7b0409a
Binary files /dev/null and b/priv/static/static/js/i18n/uk-json.003908af9b15becdd382.js differ
diff --git a/priv/static/static/js/i18n/uk-json.003908af9b15becdd382.js.map b/priv/static/static/js/i18n/uk-json.003908af9b15becdd382.js.map
new file mode 100644
index 0000000000..0bc7136649
Binary files /dev/null and b/priv/static/static/js/i18n/uk-json.003908af9b15becdd382.js.map differ
diff --git a/priv/static/static/js/i18n/uk-json.c33e4c72a2dfe9a9d143.js b/priv/static/static/js/i18n/uk-json.c33e4c72a2dfe9a9d143.js
deleted file mode 100644
index 60220c36d8..0000000000
Binary files a/priv/static/static/js/i18n/uk-json.c33e4c72a2dfe9a9d143.js and /dev/null differ
diff --git a/priv/static/static/js/i18n/uk-json.c33e4c72a2dfe9a9d143.js.map b/priv/static/static/js/i18n/uk-json.c33e4c72a2dfe9a9d143.js.map
deleted file mode 100644
index a63875955c..0000000000
Binary files a/priv/static/static/js/i18n/uk-json.c33e4c72a2dfe9a9d143.js.map and /dev/null differ
diff --git a/priv/static/static/js/i18n/zh-json.a0a26f6d62ddbe0b49cc.js b/priv/static/static/js/i18n/zh-json.a0a26f6d62ddbe0b49cc.js
new file mode 100644
index 0000000000..0733dd25c1
Binary files /dev/null and b/priv/static/static/js/i18n/zh-json.a0a26f6d62ddbe0b49cc.js differ
diff --git a/priv/static/static/js/i18n/zh-json.a0a26f6d62ddbe0b49cc.js.map b/priv/static/static/js/i18n/zh-json.a0a26f6d62ddbe0b49cc.js.map
new file mode 100644
index 0000000000..1a62ad4939
Binary files /dev/null and b/priv/static/static/js/i18n/zh-json.a0a26f6d62ddbe0b49cc.js.map differ
diff --git a/priv/static/static/js/i18n/zh-json.de02aa4e82fcb1ec557c.js b/priv/static/static/js/i18n/zh-json.de02aa4e82fcb1ec557c.js
deleted file mode 100644
index bb35c1ef8a..0000000000
Binary files a/priv/static/static/js/i18n/zh-json.de02aa4e82fcb1ec557c.js and /dev/null differ
diff --git a/priv/static/static/js/i18n/zh-json.de02aa4e82fcb1ec557c.js.map b/priv/static/static/js/i18n/zh-json.de02aa4e82fcb1ec557c.js.map
deleted file mode 100644
index 9f140cf953..0000000000
Binary files a/priv/static/static/js/i18n/zh-json.de02aa4e82fcb1ec557c.js.map and /dev/null differ
diff --git a/priv/static/static/js/i18n/zh_Hant-json.eedcc6a7effd11514fe4.js b/priv/static/static/js/i18n/zh_Hant-json.eedcc6a7effd11514fe4.js
deleted file mode 100644
index 2697cd20d3..0000000000
Binary files a/priv/static/static/js/i18n/zh_Hant-json.eedcc6a7effd11514fe4.js and /dev/null differ
diff --git a/priv/static/static/js/i18n/zh_Hant-json.eedcc6a7effd11514fe4.js.map b/priv/static/static/js/i18n/zh_Hant-json.eedcc6a7effd11514fe4.js.map
deleted file mode 100644
index 995904e2f8..0000000000
Binary files a/priv/static/static/js/i18n/zh_Hant-json.eedcc6a7effd11514fe4.js.map and /dev/null differ
diff --git a/priv/static/static/js/i18n/zh_Hant-json.f7e1d0f4b873c60d6396.js b/priv/static/static/js/i18n/zh_Hant-json.f7e1d0f4b873c60d6396.js
new file mode 100644
index 0000000000..00f6850b5d
Binary files /dev/null and b/priv/static/static/js/i18n/zh_Hant-json.f7e1d0f4b873c60d6396.js differ
diff --git a/priv/static/static/js/i18n/zh_Hant-json.f7e1d0f4b873c60d6396.js.map b/priv/static/static/js/i18n/zh_Hant-json.f7e1d0f4b873c60d6396.js.map
new file mode 100644
index 0000000000..b8ca3f4151
Binary files /dev/null and b/priv/static/static/js/i18n/zh_Hant-json.f7e1d0f4b873c60d6396.js.map differ
diff --git a/priv/static/sw-pleroma.js b/priv/static/sw-pleroma.js
index e56f8076e8..ed9257cd29 100644
Binary files a/priv/static/sw-pleroma.js and b/priv/static/sw-pleroma.js differ
diff --git a/priv/static/sw-pleroma.js.LICENSE.txt b/priv/static/sw-pleroma.js.LICENSE.txt
index 9b9ab65b23..63c4ca54c9 100644
--- a/priv/static/sw-pleroma.js.LICENSE.txt
+++ b/priv/static/sw-pleroma.js.LICENSE.txt
@@ -25,6 +25,4 @@
* MIT Licensed
*/
-/*! https://mths.be/punycode v1.3.2 by @mathias */
-
/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */
diff --git a/priv/static/sw-pleroma.js.map b/priv/static/sw-pleroma.js.map
index 5472fccce5..8170d0ecc1 100644
Binary files a/priv/static/sw-pleroma.js.map and b/priv/static/sw-pleroma.js.map differ
diff --git a/rel/files/bin/pleroma_ctl b/rel/files/bin/pleroma_ctl
index 87c4865140..6f0dba3a8f 100755
--- a/rel/files/bin/pleroma_ctl
+++ b/rel/files/bin/pleroma_ctl
@@ -134,7 +134,7 @@ if [ -z "$1" ] || [ "$1" = "help" ]; then
"
else
- SCRIPT=$(readlink -f "$0")
+ SCRIPT=$(realpath "$0")
SCRIPTPATH=$(dirname "$SCRIPT")
FULL_ARGS="$*"
diff --git a/rel/files/installation/init.d/pleroma b/rel/files/installation/init.d/pleroma
index dea1db26c8..ca5b842e11 100755
--- a/rel/files/installation/init.d/pleroma
+++ b/rel/files/installation/init.d/pleroma
@@ -9,6 +9,7 @@ command=/opt/pleroma/bin/pleroma
command_args="start"
command_user=pleroma
command_background=1
+no_new_privs="yes"
# Ask process to terminate within 30 seconds, otherwise kill it
retry="SIGTERM/30/SIGKILL/5"
diff --git a/supplemental/search/fastembed-api/Dockerfile b/supplemental/search/fastembed-api/Dockerfile
new file mode 100644
index 0000000000..c1e0ef51f3
--- /dev/null
+++ b/supplemental/search/fastembed-api/Dockerfile
@@ -0,0 +1,9 @@
+FROM python:3.9
+
+WORKDIR /code
+COPY fastembed-server.py /workdir/fastembed-server.py
+COPY requirements.txt /workdir/requirements.txt
+
+RUN pip install -r /workdir/requirements.txt
+
+CMD ["python", "/workdir/fastembed-server.py"]
diff --git a/supplemental/search/fastembed-api/README.md b/supplemental/search/fastembed-api/README.md
new file mode 100644
index 0000000000..63a037207d
--- /dev/null
+++ b/supplemental/search/fastembed-api/README.md
@@ -0,0 +1,6 @@
+# About
+This is a minimal implementation of the [OpenAI Embeddings API](https://platform.openai.com/docs/guides/embeddings/what-are-embeddings) meant to be used with the QdrantSearch backend.
+
+# Usage
+
+The easiest way to run it is to just use docker compose with `docker compose up`. This starts the server on the default configured port. Different models can be used, for a full list of supported models, check the [fastembed documentation](https://qdrant.github.io/fastembed/examples/Supported_Models/). The first time a model is requested it will be downloaded, which can take a few seconds.
diff --git a/supplemental/search/fastembed-api/compose.yml b/supplemental/search/fastembed-api/compose.yml
new file mode 100644
index 0000000000..d4cb31722f
--- /dev/null
+++ b/supplemental/search/fastembed-api/compose.yml
@@ -0,0 +1,5 @@
+services:
+ web:
+ build: .
+ ports:
+ - "11345:11345"
diff --git a/supplemental/search/fastembed-api/fastembed-server.py b/supplemental/search/fastembed-api/fastembed-server.py
new file mode 100644
index 0000000000..02da69db26
--- /dev/null
+++ b/supplemental/search/fastembed-api/fastembed-server.py
@@ -0,0 +1,27 @@
+from fastembed import TextEmbedding
+from fastapi import FastAPI
+from pydantic import BaseModel
+
+models = {}
+
+app = FastAPI()
+
+class EmbeddingRequest(BaseModel):
+ model: str
+ input: str
+
+@app.post("/v1/embeddings")
+def embeddings(request: EmbeddingRequest):
+ model = models.get(request.model) or TextEmbedding(request.model)
+ models[request.model] = model
+ embeddings = next(model.embed(request.input)).tolist()
+ return {"data": [{"embedding": embeddings}]}
+
+@app.get("/health")
+def health():
+ return {"status": "ok"}
+
+if __name__ == "__main__":
+ import uvicorn
+
+ uvicorn.run(app, host="0.0.0.0", port=11345)
diff --git a/supplemental/search/fastembed-api/requirements.txt b/supplemental/search/fastembed-api/requirements.txt
new file mode 100644
index 0000000000..db67a84022
--- /dev/null
+++ b/supplemental/search/fastembed-api/requirements.txt
@@ -0,0 +1,4 @@
+fastapi==0.111.0
+fastembed==0.2.7
+pydantic==1.10.15
+uvicorn==0.29.0
diff --git a/test/fixtures/ccworld-ap-bridge_note.json b/test/fixtures/ccworld-ap-bridge_note.json
new file mode 100644
index 0000000000..4b13b4bc16
--- /dev/null
+++ b/test/fixtures/ccworld-ap-bridge_note.json
@@ -0,0 +1 @@
+{"@context":"https://www.w3.org/ns/activitystreams","type":"Note","id":"https://cc.mkdir.uk/ap/note/e5d1d0a1-1ab3-4498-9949-588e3fdea286","attributedTo":"https://cc.mkdir.uk/ap/acct/hiira","inReplyTo":"","quoteUrl":"","content":"おはコンー","published":"2024-01-19T22:08:05Z","to":["https://www.w3.org/ns/activitystreams#Public"],"tag":null,"attachment":[],"object":null}
diff --git a/test/fixtures/custom-emoji-reaction.json b/test/fixtures/custom-emoji-reaction.json
new file mode 100644
index 0000000000..003de0511e
--- /dev/null
+++ b/test/fixtures/custom-emoji-reaction.json
@@ -0,0 +1,28 @@
+{
+ "@context": [
+ "https://www.w3.org/ns/activitystreams",
+ "https://w3id.org/security/v1",
+ {
+ "Hashtag": "as:Hashtag"
+ }
+ ],
+ "type": "Like",
+ "id": "https://misskey.local.live/likes/917ocsybgp",
+ "actor": "https://misskey.local.live/users/8x8yep20u2",
+ "object": "https://pleroma.local.live/objects/89937a53-2692-4631-bb62-770091267391",
+ "content": ":hanapog:",
+ "_misskey_reaction": ":hanapog:",
+ "tag": [
+ {
+ "id": "https://misskey.local.live/emojis/hanapog",
+ "type": "Emoji",
+ "name": ":hanapog:",
+ "updated": "2022-06-07T12:00:05.773Z",
+ "icon": {
+ "type": "Image",
+ "mediaType": "image/png",
+ "url": "https://misskey.local.live/files/webpublic-8f8a9768-7264-4171-88d6-2356aabeadcd"
+ }
+ }
+ ]
+}
diff --git a/test/fixtures/fep-e232.json b/test/fixtures/fep-e232.json
new file mode 100644
index 0000000000..e9d12ae357
--- /dev/null
+++ b/test/fixtures/fep-e232.json
@@ -0,0 +1,31 @@
+{
+ "@context": "https://www.w3.org/ns/activitystreams",
+ "type": "Create",
+ "actor": "https://example.org/users/alice",
+ "object": {
+ "id": "https://example.org/objects/10",
+ "type": "Note",
+ "attributedTo": "https://example.org/users/alice",
+ "content": "test https://example.org/objects/9
",
+ "published": "2022-10-01T21:30:05.211215Z",
+ "tag": [
+ {
+ "name": "@bob@example.net",
+ "type": "Mention",
+ "href": "https://example.net/users/bob"
+ },
+ {
+ "name": "https://example.org/objects/9",
+ "type": "Link",
+ "href": "https://example.org/objects/9",
+ "mediaType": "application/ld+json; profile=\"https://www.w3.org/ns/activitystreams\""
+ }
+ ],
+ "to": [
+ "https://www.w3.org/ns/activitystreams#Public"
+ ],
+ "cc": [
+ "https://example.org/users/alice/followers"
+ ]
+ }
+}
diff --git a/test/fixtures/hubzilla-actor.json b/test/fixtures/hubzilla-actor.json
new file mode 100644
index 0000000000..445d6413c9
--- /dev/null
+++ b/test/fixtures/hubzilla-actor.json
@@ -0,0 +1 @@
+{"@context":["https://www.w3.org/ns/activitystreams","https://w3id.org/security/v1","https://hub.somaton.com/apschema/v1.9"],"type":"Person","id":"https://hub.somaton.com/channel/testc6","preferredUsername":"testc6","name":"testc6 lala","updated":"2021-08-29T10:07:23Z","icon":{"type":"Image","mediaType":"image/png","updated":"2021-10-09T04:54:35Z","url":"https://hub.somaton.com/photo/profile/l/33","height":300,"width":300},"url":"https://hub.somaton.com/channel/testc6","publicKey":{"id":"https://hub.somaton.com/channel/testc6","owner":"https://hub.somaton.com/channel/testc6","publicKeyPem":"-----BEGIN PUBLIC KEY-----\nMIICIjANBgkqhkiG9w0BAQEFAAOCAg8AMIICCgKCAgEAq5ep+6MhhaAiqZSd8nXe\nUAokXNgqTr/DjUic5VDudjQgvetchaiBUieBnqpJSPNNAvvf6Qs4eDW4w2JQeA6y\nqEplKrmb8l1EyhwXeFLDUGQdf0f6hg++x5mIrO6uX0tlQGU6nutvhItn6JMZc5GU\nv3C/UW0OfHCCdHSGZ/1nIqq1P98FqF0+PA1pvTHCkLr4kcKzfpmkLjsccUSq0FGh\nQF+paW9FU89o4hkaH/X3E/Ac7DL8zgcyt29KSj4eUIvjBIEPAMdRno345fiZ+QYr\nlYQYaBC2gvozjxtxl9MyfqjBRzfl9VDHzoDvMn5+LD5dCRB1zOESv/b3EpiHYqXl\nwiPzP9az8e8cw6D72n/Mlrf27yIuVAdwaGdbAwekjIQZHIDoP0XNnA5i31RLpEMI\nbNpH47ChtjxeilQZ3va6qIShYfGlndpy/rx4i4Yt4xIG+BbGb/dWo3AbtHi64fPZ\nMoLuR71sEBe7uAvalJ+lopxuQ2qLJpCInukQ13p/G/n9tVDwbfGyumzr5hHk7JoY\nN+JqH737MCZqb9dRDof+fju58GY1VzFjBph38sHYJh0ykA+2BzYU2+nT7CDXfKWA\nsmHhizp7haoPjl/yclZG5FJwg3oqHTD14dASUs+OI4K+Q//74wfb4/6E3CDyOkW3\nUj+8TPZooKulxtQ9ezergr0CAwEAAQ==\n-----END PUBLIC KEY-----\n"},"outbox":"https://hub.somaton.com/outbox/testc6","inbox":"https://hub.somaton.com/inbox/testc6","followers":"https://hub.somaton.com/followers/testc6","following":"https://hub.somaton.com/following/testc6","endpoints":{"sharedInbox":"https://hub.somaton.com/inbox"},"discoverable":false,"signature":{"@context":["https://www.w3.org/ns/activitystreams","https://w3id.org/security/v1"],"type":"RsaSignature2017","nonce":"8d6dea03f04cbb7faaf43958a4cf39a115ff1c61c7febaa6154c463eab9a42c8","creator":"https://hub.somaton.com/channel/testc6","created":"2021-10-13T18:21:48Z","signatureValue":"N4CJBO2K/8v7KI97REyJXaSYOlLWscuEDlODDnjNYD1fbVQFO3s2JtqPcN2lVJvNTlW5HUze+owaAYNcvZe3mNm1iz05Xru3s8yRA8bNCdKBuWd/3zb3/JQVkbSb09D2PloeuoKBQmPIn+dNiTyFR0jxLsxCXXTomGKigWPtTOUIt52Dv9MFJ3jRZmfoykT9bHrAIVCASHoiluhTkPAzc6pt0lSyZd0D3X4J1K4/sLXa8HRoooMFu2dHWfqV4tyLU9WzofAhvnYg9tEbKCH42DIAbwDfjAeC4qL8xkqAlYWLvXYVGH76cZLdp9Zuv1p3NHqaPEJ85MbuaUkfnU75Bx/Fcfoi0pEieWRdFvMx5b/UFwGbJd6iSAO1zRbGYTPEMPWHzh0AEAaLeyY+g3ZmpNu88ujrIr8iJ1U4EkjOBn8ooxA5LaI2fXDiYC2NwRiAbY+xVtgJgvHDi9tXCdvzjZWfU/cgiwF/cYMbsB2BCyPRd+XZhudfXSOysFC4WYnawhiRVevba9lQ6rEP4FMepOGq4ZOSGzxgw2xNIXpu0IkrxX5mEv/ahEhDy1KGRIFc0GnPJrv3kMVxJrZ7SF8PNAGqftQBLkqQR+SEygs3XB4cd2DQ2lPeiMd8+Xv+lBjtzZtZAM/Y4CZCOdV9DHXDGNSKKFDzzna4QcUzQ+KRc8w="}}
\ No newline at end of file
diff --git a/test/fixtures/hubzilla-create-image.json b/test/fixtures/hubzilla-create-image.json
new file mode 100644
index 0000000000..9f0669bb7c
--- /dev/null
+++ b/test/fixtures/hubzilla-create-image.json
@@ -0,0 +1 @@
+{"@context":["https://www.w3.org/ns/activitystreams","https://w3id.org/security/v1","https://hub.somaton.com/apschema/v1.9"],"type":"Create","id":"https://hub.somaton.com/activity/452583b2-7e1f-4ac3-8334-ff666f134afe","diaspora:guid":"452583b2-7e1f-4ac3-8334-ff666f134afe","name":"daf82c18ef92a84cda72(1).jpg","published":"2021-10-12T21:28:26Z","actor":"https://hub.somaton.com/channel/testc6","object":{"type":"Image","name":"daf82c18ef92a84cda72(1).jpg","published":"2021-10-12T21:28:23Z","updated":"2021-10-12T21:28:23Z","attributedTo":"https://hub.somaton.com/channel/testc6","id":"https://hub.somaton.com/photo/452583b2-7e1f-4ac3-8334-ff666f134afe","url":[{"type":"Link","mediaType":"image/jpeg","href":"https://hub.somaton.com/photo/452583b2-7e1f-4ac3-8334-ff666f134afe-0.jpg","width":2200,"height":2200},{"type":"Link","mediaType":"image/jpeg","href":"https://hub.somaton.com/photo/452583b2-7e1f-4ac3-8334-ff666f134afe-1.jpg","width":1024,"height":1024},{"type":"Link","mediaType":"image/jpeg","href":"https://hub.somaton.com/photo/452583b2-7e1f-4ac3-8334-ff666f134afe-2.jpg","width":640,"height":640},{"type":"Link","mediaType":"image/jpeg","href":"https://hub.somaton.com/photo/452583b2-7e1f-4ac3-8334-ff666f134afe-3.jpg","width":320,"height":320},{"type":"Link","mediaType":"text/html","href":"https://hub.somaton.com/photos/testc6/image/452583b2-7e1f-4ac3-8334-ff666f134afe"}],"source":{"content":"[footer][zrl=https://hub.somaton.com/channel/testc6]testc6 lala[/zrl] posted [zrl=https://hub.somaton.com/photos/testc6/image/452583b2-7e1f-4ac3-8334-ff666f134afe]a new photo[/zrl] to [zrl=https://hub.somaton.com/photos/testc6/album/1e9b0d74-633e-4bd0-b37f-694bb0ed0145]test[/zrl][/footer]","mediaType":"text/bbcode"},"content":"","to":["https://www.w3.org/ns/activitystreams#Public"],"cc":["https://hub.somaton.com/followers/testc6"]},"target":{"type":"orderedCollection","name":"test","id":"https://hub.somaton.com/album/testc6/test"},"to":["https://www.w3.org/ns/activitystreams#Public"],"cc":["https://hub.somaton.com/followers/testc6"],"signature":{"@context":["https://www.w3.org/ns/activitystreams","https://w3id.org/security/v1"],"type":"RsaSignature2017","nonce":"e0d077edccf262f02ed59ff67e91a5324ccaffc3d2b3f23793b4bd24cdbe70bb","creator":"https://hub.somaton.com/channel/testc6","created":"2021-10-13T18:39:05Z","signatureValue":"YYU0/17PqqUmLCn4oVS2N62rV1G9WQ+wLax2cI+EpMw/WOWKuVvtGrvhzciQ5ITXoh3scrZRYH8Bke1jDWkjL9YtjVD6TjMsv6f3OoO1vvMNgEfQfgZJ78QQt5MoLrT2mkRa35lSmVHkTDROKJPrwIAnpN6bDb577wZ63BsuBjqW7ca/E6oXSIr+meCXv3kqkyYDSz0ImYvVmki+OfX97xbYkQlzM06EgK1LZTHfuf4sk09hVfDDqVB9tHO4ObYQCYNiOWRHjA5S1Cw8WX1OQJ+GCQ8yxHmtiU3tJsxeYhxGs7VEmTLUvf/QZ0VTPumkd1CewdxzNGvAP3f9JCakuV7eyk88oqF+p7xxfxmBjLYbMTuhrcZIdUdMcjW9pENOYBbt+a+FhPsjbm8zVU3iKPqe/8UAvo01hGW7jiKJUm4qdcX3H3MExTLEFuz0NTeqxl4djlyGTT9KBqNouD+/oSSgwm6qeRZ5y3RsC27N0HRbg74qNXhhWQZVWQtHdSCHjAfHVPOSpjxpSPs7qkMLQ0vPsVsCsukZz8JCoXRo+JoKuaiaRgfiIRGNBO/XEicKMyu2JCU+UmkroiDJHy+4IfZRevnlneRa1jmu5KA/4xk5KU8l0I0Inap7TSPhv14Ex2sF89LkT8MbcDM3S3QL4urYsQj37zOKRDTFzE96TmI="}}
\ No newline at end of file
diff --git a/test/fixtures/image_with_imagedescription_and_caption-abstract_and_stray_data_after.png b/test/fixtures/image_with_imagedescription_and_caption-abstract_and_stray_data_after.png
new file mode 100644
index 0000000000..7ce8640fa0
Binary files /dev/null and b/test/fixtures/image_with_imagedescription_and_caption-abstract_and_stray_data_after.png differ
diff --git a/test/fixtures/image_with_stray_data_after.png b/test/fixtures/image_with_stray_data_after.png
new file mode 100755
index 0000000000..a280e43777
Binary files /dev/null and b/test/fixtures/image_with_stray_data_after.png differ
diff --git a/test/fixtures/mastodon-nodeinfo20.json b/test/fixtures/mastodon-nodeinfo20.json
new file mode 100644
index 0000000000..35010fdf01
--- /dev/null
+++ b/test/fixtures/mastodon-nodeinfo20.json
@@ -0,0 +1 @@
+{"version":"2.0","software":{"name":"mastodon","version":"4.1.0"},"protocols":["activitypub"],"services":{"outbound":[],"inbound":[]},"usage":{"users":{"total":971090,"activeMonth":167218,"activeHalfyear":384808},"localPosts":52071541},"openRegistrations":true,"metadata":{}}
\ No newline at end of file
diff --git a/test/fixtures/mastodon-well-known-nodeinfo.json b/test/fixtures/mastodon-well-known-nodeinfo.json
new file mode 100644
index 0000000000..237d5462ab
--- /dev/null
+++ b/test/fixtures/mastodon-well-known-nodeinfo.json
@@ -0,0 +1 @@
+{"links":[{"rel":"http://nodeinfo.diaspora.software/ns/schema/2.0","href":"https://mastodon.example.org/nodeinfo/2.0"}]}
\ No newline at end of file
diff --git a/test/fixtures/minds-invalid-mention-post.json b/test/fixtures/minds-invalid-mention-post.json
new file mode 100644
index 0000000000..ea2cb27390
--- /dev/null
+++ b/test/fixtures/minds-invalid-mention-post.json
@@ -0,0 +1 @@
+{"@context":"https://www.w3.org/ns/activitystreams","type":"Note","id":"https://www.minds.com/api/activitypub/users/1198929502760083472/entities/urn:comment:1600926863310458883:0:0:0:1600932467852709903","attributedTo":"https://www.minds.com/api/activitypub/users/1198929502760083472","content":"\u003Ca class=\u0022u-url mention\u0022 href=\u0022https://www.minds.com/lain\u0022 target=\u0022_blank\u0022\u003E@lain\u003C/a\u003E corn syrup.","to":["https://www.w3.org/ns/activitystreams#Public"],"cc":["https://www.minds.com/api/activitypub/users/1198929502760083472/followers","https://lain.com/users/lain"],"tag":[{"type":"Mention","href":"https://www.minds.com/api/activitypub/users/464237775479123984","name":"@lain"}],"url":"https://www.minds.com/newsfeed/1600926863310458883?focusedCommentUrn=urn:comment:1600926863310458883:0:0:0:1600932467852709903","published":"2024-02-04T17:34:03+00:00","inReplyTo":"https://lain.com/objects/36254095-c839-4167-bcc2-b361d5de9198","source":{"content":"@lain corn syrup.","mediaType":"text/plain"}}
\ No newline at end of file
diff --git a/test/fixtures/minds-pleroma-mentioned-post.json b/test/fixtures/minds-pleroma-mentioned-post.json
new file mode 100644
index 0000000000..9dfa42c909
--- /dev/null
+++ b/test/fixtures/minds-pleroma-mentioned-post.json
@@ -0,0 +1 @@
+{"@context":["https://www.w3.org/ns/activitystreams","https://lain.com/schemas/litepub-0.1.jsonld",{"@language":"und"}],"actor":"https://lain.com/users/lain","attachment":[],"attributedTo":"https://lain.com/users/lain","cc":["https://lain.com/users/lain/followers"],"content":"which diet is the best for cognitive dissonance","context":"https://lain.com/contexts/98c8a130-e813-4797-8973-600e80114317","conversation":"https://lain.com/contexts/98c8a130-e813-4797-8973-600e80114317","id":"https://lain.com/objects/36254095-c839-4167-bcc2-b361d5de9198","published":"2024-02-04T17:11:23.931890Z","repliesCount":11,"sensitive":null,"source":{"content":"which diet is the best for cognitive dissonance","mediaType":"text/plain"},"summary":"","tag":[],"to":["https://www.w3.org/ns/activitystreams#Public"],"type":"Note"}
\ No newline at end of file
diff --git a/test/fixtures/png_with_transparency.png b/test/fixtures/png_with_transparency.png
new file mode 100644
index 0000000000..7963149dbe
Binary files /dev/null and b/test/fixtures/png_with_transparency.png differ
diff --git a/test/fixtures/quote_post/fedibird_quote_mismatched.json b/test/fixtures/quote_post/fedibird_quote_mismatched.json
new file mode 100644
index 0000000000..8dee5daffb
--- /dev/null
+++ b/test/fixtures/quote_post/fedibird_quote_mismatched.json
@@ -0,0 +1,54 @@
+{
+ "@context": [
+ "https://www.w3.org/ns/activitystreams",
+ {
+ "ostatus": "http://ostatus.org#",
+ "atomUri": "ostatus:atomUri",
+ "inReplyToAtomUri": "ostatus:inReplyToAtomUri",
+ "conversation": "ostatus:conversation",
+ "sensitive": "as:sensitive",
+ "toot": "http://joinmastodon.org/ns#",
+ "votersCount": "toot:votersCount",
+ "fedibird": "http://fedibird.com/ns#",
+ "quoteUri": "fedibird:quoteUri",
+ "expiry": "fedibird:expiry"
+ }
+ ],
+ "id": "https://fedibird.com/users/noellabo/statuses/107712183700212249",
+ "type": "Note",
+ "summary": null,
+ "inReplyTo": null,
+ "published": "2022-01-30T15:44:50Z",
+ "url": "https://fedibird.com/@noellabo/107712183700212249",
+ "attributedTo": "https://fedibird.com/users/noellabo",
+ "to": [
+ "https://www.w3.org/ns/activitystreams#Public"
+ ],
+ "cc": [
+ "https://fedibird.com/users/noellabo/followers"
+ ],
+ "sensitive": false,
+ "atomUri": "https://fedibird.com/users/noellabo/statuses/107712183700212249",
+ "inReplyToAtomUri": null,
+ "conversation": "tag:fedibird.com,2022-01-30:objectId=107712183700170473:objectType=Conversation",
+ "context": "https://fedibird.com/contexts/107712183700170473",
+ "quoteUri": "https://unnerv.jp/users/UN_NERV/statuses/107712176849067434",
+ "_misskey_quote": "https://unnerv.jp/users/UN_NERV/statuses/107712176849067434",
+ "_misskey_content": "揺れていたようだ",
+ "content": "揺れていたようだ QT: https:// unnerv.jp/@UN_NERV/10771217684 9067434
",
+ "contentMap": {
+ "ja": "揺れていたようだ QT: https:// unnerv.jp/@UN_NERV/10771217684 9067434
"
+ },
+ "attachment": [],
+ "tag": [],
+ "replies": {
+ "id": "https://fedibird.com/users/noellabo/statuses/107712183700212249/replies",
+ "type": "Collection",
+ "first": {
+ "type": "CollectionPage",
+ "next": "https://fedibird.com/users/noellabo/statuses/107712183700212249/replies?only_other_accounts=true&page=true",
+ "partOf": "https://fedibird.com/users/noellabo/statuses/107712183700212249/replies",
+ "items": []
+ }
+ }
+}
diff --git a/test/fixtures/quote_post/fedibird_quote_post.json b/test/fixtures/quote_post/fedibird_quote_post.json
new file mode 100644
index 0000000000..ebf3833569
--- /dev/null
+++ b/test/fixtures/quote_post/fedibird_quote_post.json
@@ -0,0 +1,52 @@
+{
+ "@context": [
+ "https://www.w3.org/ns/activitystreams",
+ {
+ "ostatus": "http://ostatus.org#",
+ "atomUri": "ostatus:atomUri",
+ "inReplyToAtomUri": "ostatus:inReplyToAtomUri",
+ "conversation": "ostatus:conversation",
+ "sensitive": "as:sensitive",
+ "toot": "http://joinmastodon.org/ns#",
+ "votersCount": "toot:votersCount",
+ "expiry": "toot:expiry"
+ }
+ ],
+ "id": "https://fedibird.com/users/noellabo/statuses/107663670404015196",
+ "type": "Note",
+ "summary": null,
+ "inReplyTo": null,
+ "published": "2022-01-22T02:07:16Z",
+ "url": "https://fedibird.com/@noellabo/107663670404015196",
+ "attributedTo": "https://fedibird.com/users/noellabo",
+ "to": [
+ "https://www.w3.org/ns/activitystreams#Public"
+ ],
+ "cc": [
+ "https://fedibird.com/users/noellabo/followers"
+ ],
+ "sensitive": false,
+ "atomUri": "https://fedibird.com/users/noellabo/statuses/107663670404015196",
+ "inReplyToAtomUri": null,
+ "conversation": "tag:fedibird.com,2022-01-22:objectId=107663670404038002:objectType=Conversation",
+ "context": "https://fedibird.com/contexts/107663670404038002",
+ "quoteURL": "https://misskey.io/notes/8vsn2izjwh",
+ "_misskey_quote": "https://misskey.io/notes/8vsn2izjwh",
+ "_misskey_content": "いつの生まれだシトリン",
+ "content": "いつの生まれだシトリン QT: https:// misskey.io/notes/8vsn2izjwh
",
+ "contentMap": {
+ "ja": "いつの生まれだシトリン QT: https:// misskey.io/notes/8vsn2izjwh
"
+ },
+ "attachment": [],
+ "tag": [],
+ "replies": {
+ "id": "https://fedibird.com/users/noellabo/statuses/107663670404015196/replies",
+ "type": "Collection",
+ "first": {
+ "type": "CollectionPage",
+ "next": "https://fedibird.com/users/noellabo/statuses/107663670404015196/replies?only_other_accounts=true&page=true",
+ "partOf": "https://fedibird.com/users/noellabo/statuses/107663670404015196/replies",
+ "items": []
+ }
+ }
+}
diff --git a/test/fixtures/quote_post/fedibird_quote_uri.json b/test/fixtures/quote_post/fedibird_quote_uri.json
new file mode 100644
index 0000000000..7c328fdb92
--- /dev/null
+++ b/test/fixtures/quote_post/fedibird_quote_uri.json
@@ -0,0 +1,54 @@
+{
+ "@context": [
+ "https://www.w3.org/ns/activitystreams",
+ {
+ "ostatus": "http://ostatus.org#",
+ "atomUri": "ostatus:atomUri",
+ "inReplyToAtomUri": "ostatus:inReplyToAtomUri",
+ "conversation": "ostatus:conversation",
+ "sensitive": "as:sensitive",
+ "toot": "http://joinmastodon.org/ns#",
+ "votersCount": "toot:votersCount",
+ "fedibird": "http://fedibird.com/ns#",
+ "quoteUri": "fedibird:quoteUri",
+ "expiry": "fedibird:expiry"
+ }
+ ],
+ "id": "https://fedibird.com/users/noellabo/statuses/107699335988346142",
+ "type": "Note",
+ "summary": null,
+ "inReplyTo": null,
+ "published": "2022-01-28T09:17:30Z",
+ "url": "https://fedibird.com/@noellabo/107699335988346142",
+ "attributedTo": "https://fedibird.com/users/noellabo",
+ "to": [
+ "https://www.w3.org/ns/activitystreams#Public"
+ ],
+ "cc": [
+ "https://fedibird.com/users/noellabo/followers"
+ ],
+ "sensitive": false,
+ "atomUri": "https://fedibird.com/users/noellabo/statuses/107699335988346142",
+ "inReplyToAtomUri": null,
+ "conversation": "tag:fedibird.com,2022-01-28:objectId=107699335988345290:objectType=Conversation",
+ "context": "https://fedibird.com/contexts/107699335988345290",
+ "quoteUri": "https://fedibird.com/users/yamako/statuses/107699333438289729",
+ "_misskey_quote": "https://fedibird.com/users/yamako/statuses/107699333438289729",
+ "_misskey_content": "美味しそう",
+ "content": "美味しそう QT: https:// fedibird.com/@yamako/107699333 438289729
",
+ "contentMap": {
+ "ja": "美味しそう QT: https:// fedibird.com/@yamako/107699333 438289729
"
+ },
+ "attachment": [],
+ "tag": [],
+ "replies": {
+ "id": "https://fedibird.com/users/noellabo/statuses/107699335988346142/replies",
+ "type": "Collection",
+ "first": {
+ "type": "CollectionPage",
+ "next": "https://fedibird.com/users/noellabo/statuses/107699335988346142/replies?only_other_accounts=true&page=true",
+ "partOf": "https://fedibird.com/users/noellabo/statuses/107699335988346142/replies",
+ "items": []
+ }
+ }
+}
diff --git a/test/fixtures/quote_post/fep-e232-tag-example.json b/test/fixtures/quote_post/fep-e232-tag-example.json
new file mode 100644
index 0000000000..23c7fb5ac0
--- /dev/null
+++ b/test/fixtures/quote_post/fep-e232-tag-example.json
@@ -0,0 +1,17 @@
+{
+ "@context": "https://www.w3.org/ns/activitystreams",
+ "type": "Note",
+ "content": "This is a quote: RE: https://server.example/objects/123",
+ "tag": [
+ {
+ "type": "Link",
+ "mediaType": "application/ld+json; profile=\"https://www.w3.org/ns/activitystreams\"",
+ "href": "https://server.example/objects/123",
+ "name": "RE: https://server.example/objects/123"
+ }
+ ],
+ "id": "https://server.example/objects/1",
+ "to": "https://server.example/users/1",
+ "attributedTo": "https://server.example/users/1",
+ "actor": "https://server.example/users/1"
+}
diff --git a/test/fixtures/quote_post/misskey_quote_post.json b/test/fixtures/quote_post/misskey_quote_post.json
new file mode 100644
index 0000000000..59f677ca93
--- /dev/null
+++ b/test/fixtures/quote_post/misskey_quote_post.json
@@ -0,0 +1,46 @@
+{
+ "@context": [
+ "https://www.w3.org/ns/activitystreams",
+ "https://w3id.org/security/v1",
+ {
+ "manuallyApprovesFollowers": "as:manuallyApprovesFollowers",
+ "sensitive": "as:sensitive",
+ "Hashtag": "as:Hashtag",
+ "quoteUrl": "as:quoteUrl",
+ "toot": "http://joinmastodon.org/ns#",
+ "Emoji": "toot:Emoji",
+ "featured": "toot:featured",
+ "discoverable": "toot:discoverable",
+ "schema": "http://schema.org#",
+ "PropertyValue": "schema:PropertyValue",
+ "value": "schema:value",
+ "misskey": "https://misskey.io/ns#",
+ "_misskey_content": "misskey:_misskey_content",
+ "_misskey_quote": "misskey:_misskey_quote",
+ "_misskey_reaction": "misskey:_misskey_reaction",
+ "_misskey_votes": "misskey:_misskey_votes",
+ "_misskey_talk": "misskey:_misskey_talk",
+ "isCat": "misskey:isCat",
+ "vcard": "http://www.w3.org/2006/vcard/ns#"
+ }
+ ],
+ "id": "https://misskey.io/notes/8vs6ylpfez",
+ "type": "Note",
+ "attributedTo": "https://misskey.io/users/7rkrarq81i",
+ "summary": null,
+ "content": "投稿者の設定によるね Fanboxについても投稿者によっては過去の投稿は高額なプランに移動してることがある RE: https://misskey.io/notes/8vs6wxufd0
",
+ "_misskey_content": "投稿者の設定によるね\nFanboxについても投稿者によっては過去の投稿は高額なプランに移動してることがある",
+ "_misskey_quote": "https://misskey.io/notes/8vs6wxufd0",
+ "quoteUrl": "https://misskey.io/notes/8vs6wxufd0",
+ "published": "2022-01-21T16:38:30.243Z",
+ "to": [
+ "https://www.w3.org/ns/activitystreams#Public"
+ ],
+ "cc": [
+ "https://misskey.io/users/7rkrarq81i/followers"
+ ],
+ "inReplyTo": null,
+ "attachment": [],
+ "sensitive": false,
+ "tag": []
+}
diff --git a/test/fixtures/rich_media/google.html b/test/fixtures/rich_media/google.html
new file mode 100644
index 0000000000..c068397a5f
--- /dev/null
+++ b/test/fixtures/rich_media/google.html
@@ -0,0 +1,12 @@
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/test/fixtures/rich_media/oembed.html b/test/fixtures/rich_media/oembed.html
index 55f17004bc..5429630d0c 100644
--- a/test/fixtures/rich_media/oembed.html
+++ b/test/fixtures/rich_media/oembed.html
@@ -1,3 +1,3 @@
diff --git a/test/fixtures/rich_media/reddit.html b/test/fixtures/rich_media/reddit.html
new file mode 100644
index 0000000000..a99bb6884f
--- /dev/null
+++ b/test/fixtures/rich_media/reddit.html
@@ -0,0 +1,392 @@
+Twitter/X is getting weirder; where now for security news and analysis? : cybersecurity this post was submitted on 20 Sep 2023
241 points (92% upvoted)
shortlink:
join leave 688,076 readers 592 users here now
a community for 11 years
π Rendered by PID 29 on reddit-service-r2-slowlane-65c5c76ff5-v258h at 2024-02-19 03:13:22.575220+00:00 running 5b0a0b2 country code: US.
\ No newline at end of file
diff --git a/test/fixtures/rich_media/yahoo.html b/test/fixtures/rich_media/yahoo.html
new file mode 100644
index 0000000000..41d8c5cd96
--- /dev/null
+++ b/test/fixtures/rich_media/yahoo.html
@@ -0,0 +1,12 @@
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/test/fixtures/tesla_mock/aimu@misskey.io.json b/test/fixtures/tesla_mock/aimu@misskey.io.json
new file mode 100644
index 0000000000..9ff4cb6d0e
--- /dev/null
+++ b/test/fixtures/tesla_mock/aimu@misskey.io.json
@@ -0,0 +1,64 @@
+{
+ "@context": [
+ "https://www.w3.org/ns/activitystreams",
+ "https://w3id.org/security/v1",
+ {
+ "manuallyApprovesFollowers": "as:manuallyApprovesFollowers",
+ "sensitive": "as:sensitive",
+ "Hashtag": "as:Hashtag",
+ "quoteUrl": "as:quoteUrl",
+ "toot": "http://joinmastodon.org/ns#",
+ "Emoji": "toot:Emoji",
+ "featured": "toot:featured",
+ "discoverable": "toot:discoverable",
+ "schema": "http://schema.org#",
+ "PropertyValue": "schema:PropertyValue",
+ "value": "schema:value",
+ "misskey": "https://misskey.io/ns#",
+ "_misskey_content": "misskey:_misskey_content",
+ "_misskey_quote": "misskey:_misskey_quote",
+ "_misskey_reaction": "misskey:_misskey_reaction",
+ "_misskey_votes": "misskey:_misskey_votes",
+ "_misskey_talk": "misskey:_misskey_talk",
+ "isCat": "misskey:isCat",
+ "vcard": "http://www.w3.org/2006/vcard/ns#"
+ }
+ ],
+ "type": "Person",
+ "id": "https://misskey.io/users/83ssedkv53",
+ "inbox": "https://misskey.io/users/83ssedkv53/inbox",
+ "outbox": "https://misskey.io/users/83ssedkv53/outbox",
+ "followers": "https://misskey.io/users/83ssedkv53/followers",
+ "following": "https://misskey.io/users/83ssedkv53/following",
+ "sharedInbox": "https://misskey.io/inbox",
+ "endpoints": {
+ "sharedInbox": "https://misskey.io/inbox"
+ },
+ "url": "https://misskey.io/@aimu",
+ "preferredUsername": "aimu",
+ "name": "あいむ",
+ "summary": "わずかな作曲要素 巣穴で独り言 Twitter https://twitter.com/aimu_53 Soundcloud https://soundcloud.com/aimu-53
",
+ "icon": {
+ "type": "Image",
+ "url": "https://s3.arkjp.net/misskey/webpublic-3f7e93c0-34f5-443c-acc0-f415cb2342b4.jpg",
+ "sensitive": false,
+ "name": null
+ },
+ "image": {
+ "type": "Image",
+ "url": "https://s3.arkjp.net/misskey/webpublic-2db63d1d-490b-488b-ab62-c93c285f26b6.png",
+ "sensitive": false,
+ "name": null
+ },
+ "tag": [],
+ "manuallyApprovesFollowers": false,
+ "discoverable": true,
+ "publicKey": {
+ "id": "https://misskey.io/users/83ssedkv53#main-key",
+ "type": "Key",
+ "owner": "https://misskey.io/users/83ssedkv53",
+ "publicKeyPem": "-----BEGIN PUBLIC KEY-----\nMIICIjANBgkqhkiG9w0BAQEFAAOCAg8AMIICCgKCAgEA1ylhePJ6qGHmwHSBP17b\nIosxGaiFKvgDBgZdm8vzvKeRSqJV9uLHfZL3pO/Zt02EwaZd2GohZAtBZEF8DbMA\n3s93WAesvyGF9mjGrYYKlhp/glwyrrrbf+RdD0DLtyDwRRlrxp3pS2lLmv5Tp1Zl\npH+UKpOnNrpQqjHI5P+lEc9bnflzbRrX+UiyLNsVAP80v4wt7SZfT/telrU6mDru\n998UdfhUo7bDKeDsHG1PfLpyhhtfdoZub4kBpkyacHiwAd+CdCjR54Eu7FDwVK3p\nY3JcrT2q5stgMqN1m4QgSL4XAADIotWwDYttTJejM1n9dr+6VWv5bs0F2Q/6gxOp\nu5DQZLk4Q+64U4LWNox6jCMOq3fYe0g7QalJIHnanYQQo+XjoH6S1Aw64gQ3Ip2Y\nZBmZREAOR7GMFVDPFnVnsbCHnIAv16TdgtLgQBAihkWEUuPqITLi8PMu6kMr3uyq\nYkObEfH0TNTcqaiVpoXv791GZLEUV5ROl0FSUANLNkHZZv29xZ5JDOBOR1rNBLyH\ngVtW8rpszYqOXwzX23hh4WsVXfB7YgNvIijwjiaWbzsecleaENGEnLNMiVKVumTj\nmtyTeFJpH0+OaSrUYpemRRJizmqIjklKsNwUEwUb2WcUUg92o56T2obrBkooabZe\nwgSXSKTOcjsR/ju7+AuIyvkCAwEAAQ==\n-----END PUBLIC KEY-----\n"
+ },
+ "isCat": true,
+ "vcard:bday": "5353-05-03"
+}
diff --git a/test/fixtures/tesla_mock/gleasonator.com_host_meta b/test/fixtures/tesla_mock/gleasonator.com_host_meta
new file mode 100644
index 0000000000..c1a432519d
--- /dev/null
+++ b/test/fixtures/tesla_mock/gleasonator.com_host_meta
@@ -0,0 +1,4 @@
+
+
+
+
\ No newline at end of file
diff --git a/test/fixtures/tesla_mock/misskey.io_8vs6wxufd0.json b/test/fixtures/tesla_mock/misskey.io_8vs6wxufd0.json
new file mode 100644
index 0000000000..323ca10ed3
--- /dev/null
+++ b/test/fixtures/tesla_mock/misskey.io_8vs6wxufd0.json
@@ -0,0 +1,44 @@
+{
+ "@context": [
+ "https://www.w3.org/ns/activitystreams",
+ "https://w3id.org/security/v1",
+ {
+ "manuallyApprovesFollowers": "as:manuallyApprovesFollowers",
+ "sensitive": "as:sensitive",
+ "Hashtag": "as:Hashtag",
+ "quoteUrl": "as:quoteUrl",
+ "toot": "http://joinmastodon.org/ns#",
+ "Emoji": "toot:Emoji",
+ "featured": "toot:featured",
+ "discoverable": "toot:discoverable",
+ "schema": "http://schema.org#",
+ "PropertyValue": "schema:PropertyValue",
+ "value": "schema:value",
+ "misskey": "https://misskey.io/ns#",
+ "_misskey_content": "misskey:_misskey_content",
+ "_misskey_quote": "misskey:_misskey_quote",
+ "_misskey_reaction": "misskey:_misskey_reaction",
+ "_misskey_votes": "misskey:_misskey_votes",
+ "_misskey_talk": "misskey:_misskey_talk",
+ "isCat": "misskey:isCat",
+ "vcard": "http://www.w3.org/2006/vcard/ns#"
+ }
+ ],
+ "id": "https://misskey.io/notes/8vs6wxufd0",
+ "type": "Note",
+ "attributedTo": "https://misskey.io/users/83ssedkv53",
+ "summary": null,
+ "content": "Fantiaこれできないように過去のやつは従量課金だった気がする
",
+ "_misskey_content": "Fantiaこれできないように過去のやつは従量課金だった気がする",
+ "published": "2022-01-21T16:37:12.663Z",
+ "to": [
+ "https://www.w3.org/ns/activitystreams#Public"
+ ],
+ "cc": [
+ "https://misskey.io/users/83ssedkv53/followers"
+ ],
+ "inReplyTo": null,
+ "attachment": [],
+ "sensitive": false,
+ "tag": []
+}
diff --git a/test/fixtures/tesla_mock/smithereen_non_anonymous_poll.json b/test/fixtures/tesla_mock/smithereen_non_anonymous_poll.json
new file mode 100644
index 0000000000..2b343ea642
--- /dev/null
+++ b/test/fixtures/tesla_mock/smithereen_non_anonymous_poll.json
@@ -0,0 +1 @@
+{"type":"Question","id":"https://friends.grishka.me/posts/54642","attributedTo":"https://friends.grishka.me/users/1","content":"здесь тоже можно что-то написать отдельно от опроса
","published":"2021-09-04T00:22:16Z","url":"https://friends.grishka.me/posts/54642","to":["https://www.w3.org/ns/activitystreams#Public"],"cc":["https://friends.grishka.me/users/1/followers"],"replies":{"type":"Collection","id":"https://friends.grishka.me/posts/54642/replies","first":{"type":"CollectionPage","items":[],"partOf":"https://friends.grishka.me/posts/54642/replies","next":"https://friends.grishka.me/posts/54642/replies?page=1"}},"sensitive":false,"likes":"https://friends.grishka.me/posts/54642/likes","name":"тестовый опрос","oneOf":[{"type":"Note","id":"https://friends.grishka.me/posts/54642#options/76","name":"тестовый ответ 1","replies":{"type":"Collection","id":"https://friends.grishka.me/activitypub/objects/polls/24/options/76/votes","totalItems":4,"items":[]}},{"type":"Note","id":"https://friends.grishka.me/posts/54642#options/77","name":"тестовый ответ 2","replies":{"type":"Collection","id":"https://friends.grishka.me/activitypub/objects/polls/24/options/77/votes","totalItems":4,"items":[]}},{"type":"Note","id":"https://friends.grishka.me/posts/54642#options/78","name":"тестовый ответ 3","replies":{"type":"Collection","id":"https://friends.grishka.me/activitypub/objects/polls/24/options/78/votes","totalItems":6,"items":[]}}],"votersCount":14,"nonAnonymous":true,"@context":["https://www.w3.org/ns/activitystreams",{"sensitive":"as:sensitive","toot":"http://joinmastodon.org/ns#","sm":"http://smithereen.software/ns#","votersCount":"toot:votersCount","nonAnonymous":"sm:nonAnonymous"}]}
\ No newline at end of file
diff --git a/test/fixtures/tesla_mock/smithereen_user.json b/test/fixtures/tesla_mock/smithereen_user.json
new file mode 100644
index 0000000000..6468fc519f
--- /dev/null
+++ b/test/fixtures/tesla_mock/smithereen_user.json
@@ -0,0 +1 @@
+{"type":"Person","id":"https://friends.grishka.me/users/1","name":"Григорий Клюшников","icon":{"type":"Image","image":{"type":"Image","url":"https://friends.grishka.me/i/6QLsOws97AWp5N_osd74C1IC1ijnFopyCBD9MSEeXNQ/q:93/bG9jYWw6Ly8vcy91cGxvYWRzL2F2YXRhcnMvNTYzODRhODEwODk5ZTRjMzI4YmY4YmQwM2Q2MWM3NmMud2VicA.jpg","mediaType":"image/jpeg","width":1280,"height":960},"width":573,"height":572,"cropRegion":[0.26422762870788574,0.3766937553882599,0.7113820910453796,0.9728997349739075],"url":"https://friends.grishka.me/i/ql_49PQcETAWgY_nC-Qj63H_Oa6FyOAEoWFkUSSkUvQ/c:573:572:nowe:338:362/q:93/bG9jYWw6Ly8vcy91cGxvYWRzL2F2YXRhcnMvNTYzODRhODEwODk5ZTRjMzI4YmY4YmQwM2Q2MWM3NmMud2VicA.jpg","mediaType":"image/jpeg"},"summary":"Делаю эту хрень, пытаюсь вырвать социальные сети из жадных лап корпораций
\n
\n
\n
\n
\n
\n
\n
\nThis server does NOT support direct messages. Please write me on Telegram or Matrix .
","url":"https://friends.grishka.me/grishka","preferredUsername":"grishka","inbox":"https://friends.grishka.me/users/1/inbox","outbox":"https://friends.grishka.me/users/1/outbox","followers":"https://friends.grishka.me/users/1/followers","following":"https://friends.grishka.me/users/1/following","endpoints":{"sharedInbox":"https://friends.grishka.me/activitypub/sharedInbox","collectionSimpleQuery":"https://friends.grishka.me/users/1/collectionQuery"},"publicKey":{"id":"https://friends.grishka.me/users/1#main-key","owner":"https://friends.grishka.me/users/1","publicKeyPem":"-----BEGIN PUBLIC KEY-----\nMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAjlakm+i/d9ER/hIeR7KfiFW+SdLZj2SkKIeM8cmR+YFJuh9ghFqXrkFEjcaqUnAFqe5gYDNSQACnDLA8y4DnzjfGNIohKAnRoa9x6GORmfKQvcnjaTZ53S1NvUiPPyc0Pv/vfCtY/Ab0CEXe5BLqL38oZn817Jf7pBrPRTYH7m012kvwAUTT6k0Y8lPITBEG7nzYbbuGcrN9Y/RDdwE08jmBXlZ45bahRH3VNXVpQE17dCzJB+7k+iJ1R7YCoI+DuMlBYGXGE2KVk46NZTuLnOjFV9SyXfWX4/SrJM4oxev+SX2N75tQgmNZmVVHeqg2ZcbC0WCfNjJOi2HHS9MujwIDAQAB\n-----END PUBLIC KEY-----\n"},"wall":"https://friends.grishka.me/users/1/wall","firstName":"Григорий","lastName":"Клюшников","middleName":"Александрович","vcard:bday":"1993-01-22","gender":"http://schema.org#Male","supportsFriendRequests":true,"friends":"https://friends.grishka.me/users/1/friends","groups":"https://friends.grishka.me/users/1/groups","capabilities":{"supportsFriendRequests":true},"@context":["https://www.w3.org/ns/activitystreams",{"sm":"http://smithereen.software/ns#","cropRegion":{"@id":"sm:cropRegion","@container":"@list"},"wall":{"@id":"sm:wall","@type":"@id"},"collectionSimpleQuery":"sm:collectionSimpleQuery","sc":"http://schema.org#","firstName":"sc:givenName","lastName":"sc:familyName","middleName":"sc:additionalName","gender":{"@id":"sc:gender","@type":"sc:GenderType"},"maidenName":"sm:maidenName","friends":{"@id":"sm:friends","@type":"@id"},"groups":{"@id":"sm:groups","@type":"@id"},"vcard":"http://www.w3.org/2006/vcard/ns#","capabilities":"litepub:capabilities","supportsFriendRequests":"sm:supportsFriendRequests","litepub":"http://litepub.social/ns#"},"https://w3id.org/security/v1"]}
\ No newline at end of file
diff --git a/test/fixtures/tesla_mock/webfinger_spoof.json b/test/fixtures/tesla_mock/webfinger_spoof.json
new file mode 100644
index 0000000000..7c2a11f69b
--- /dev/null
+++ b/test/fixtures/tesla_mock/webfinger_spoof.json
@@ -0,0 +1,28 @@
+{
+ "aliases": [
+ "https://gleasonator.com/users/alex",
+ "https://mitra.social/users/alex"
+ ],
+ "links": [
+ {
+ "href": "https://gleasonator.com/users/alex",
+ "rel": "http://webfinger.net/rel/profile-page",
+ "type": "text/html"
+ },
+ {
+ "href": "https://gleasonator.com/users/alex",
+ "rel": "self",
+ "type": "application/activity+json"
+ },
+ {
+ "href": "https://gleasonator.com/users/alex",
+ "rel": "self",
+ "type": "application/ld+json; profile=\"https://www.w3.org/ns/activitystreams\""
+ },
+ {
+ "rel": "http://ostatus.org/schema/1.0/subscribe",
+ "template": "https://gleasonator.com/ostatus_subscribe?acct={uri}"
+ }
+ ],
+ "subject": "acct:trump@whitehouse.gov"
+}
diff --git a/test/fixtures/webfinger/graf-imposter-webfinger.json b/test/fixtures/webfinger/graf-imposter-webfinger.json
new file mode 100644
index 0000000000..e7010f606d
--- /dev/null
+++ b/test/fixtures/webfinger/graf-imposter-webfinger.json
@@ -0,0 +1,41 @@
+{
+ "subject": "acct:graf@poa.st",
+ "aliases": [
+ "https://fba.ryona.agenc/webfingertest"
+ ],
+ "links": [
+ {
+ "rel": "http://webfinger.net/rel/profile-page",
+ "type": "text/html",
+ "href": "https://fba.ryona.agenc/webfingertest"
+ },
+ {
+ "rel": "self",
+ "type": "application/activity+json",
+ "href": "https://fba.ryona.agenc/webfingertest"
+ },
+ {
+ "rel": "http://ostatus.org/schema/1.0/subscribe",
+ "template": "https://fba.ryona.agenc/contact/follow?url={uri}"
+ },
+ {
+ "rel": "http://schemas.google.com/g/2010#updates-from",
+ "type": "application/atom+xml",
+ "href": ""
+ },
+ {
+ "rel": "salmon",
+ "href": "https://fba.ryona.agenc/salmon/friendica"
+ },
+ {
+ "rel": "http://microformats.org/profile/hcard",
+ "type": "text/html",
+ "href": "https://fba.ryona.agenc/hcard/friendica"
+ },
+ {
+ "rel": "http://joindiaspora.com/seed_location",
+ "type": "text/html",
+ "href": "https://fba.ryona.agenc"
+ }
+ ]
+}
diff --git a/test/fixtures/wildebeest-nodeinfo21.json b/test/fixtures/wildebeest-nodeinfo21.json
new file mode 100644
index 0000000000..c6af474bff
--- /dev/null
+++ b/test/fixtures/wildebeest-nodeinfo21.json
@@ -0,0 +1 @@
+{"version":"2.1","software":{"name":"wildebeest","version":"0.0.1","repository":"https://github.com/cloudflare/wildebeest"},"protocols":["activitypub"],"usage":{"users":{"total":1,"activeMonth":1,"activeHalfyear":1}},"openRegistrations":false,"metadata":{"upstream":{"name":"mastodon","version":"3.5.1"}}}
\ No newline at end of file
diff --git a/test/fixtures/wildebeest-well-known-nodeinfo.json b/test/fixtures/wildebeest-well-known-nodeinfo.json
new file mode 100644
index 0000000000..c7ddb43aff
--- /dev/null
+++ b/test/fixtures/wildebeest-well-known-nodeinfo.json
@@ -0,0 +1 @@
+{"links":[{"rel":"http://nodeinfo.diaspora.software/ns/schema/2.0","href":"https://wildebeest.example.org/nodeinfo/2.0"},{"rel":"http://nodeinfo.diaspora.software/ns/schema/2.1","href":"https://wildebeest.example.org/nodeinfo/2.1"}]}
\ No newline at end of file
diff --git a/test/fixtures/xml_billion_laughs.xml b/test/fixtures/xml_billion_laughs.xml
new file mode 100644
index 0000000000..75fb24cae3
--- /dev/null
+++ b/test/fixtures/xml_billion_laughs.xml
@@ -0,0 +1,15 @@
+
+
+
+
+
+
+
+
+
+
+
+
+]>
+&lol9;
diff --git a/test/fixtures/xml_external_entities.xml b/test/fixtures/xml_external_entities.xml
new file mode 100644
index 0000000000..d5ff871347
--- /dev/null
+++ b/test/fixtures/xml_external_entities.xml
@@ -0,0 +1,3 @@
+
+ ]>
+&xxe;
diff --git a/test/mix/pleroma_test.exs b/test/mix/pleroma_test.exs
index c981ee9b9c..e362223b23 100644
--- a/test/mix/pleroma_test.exs
+++ b/test/mix/pleroma_test.exs
@@ -39,7 +39,7 @@ test "with defval" do
describe "get_option/3" do
test "get from options" do
- assert get_option([domain: "some-domain.com"], :domain, "Promt") == "some-domain.com"
+ assert get_option([domain: "some-domain.com"], :domain, "Prompt") == "some-domain.com"
end
test "get from prompt" do
diff --git a/test/mix/tasks/pleroma/config_test.exs b/test/mix/tasks/pleroma/config_test.exs
index cf6d749078..7b21341290 100644
--- a/test/mix/tasks/pleroma/config_test.exs
+++ b/test/mix/tasks/pleroma/config_test.exs
@@ -140,7 +140,6 @@ test "load a settings with large values and pass to file", %{temp_file: temp_fil
federating: true,
federation_incoming_replies_max_depth: 100,
federation_reachability_timeout_days: 7,
- federation_publisher_modules: [Pleroma.Web.ActivityPub.Publisher],
allow_relay: true,
public: true,
quarantined_instances: [],
@@ -183,8 +182,8 @@ test "load a settings with large values and pass to file", %{temp_file: temp_fil
assert File.exists?(temp_file)
{:ok, file} = File.read(temp_file)
- assert file ==
- "import Config\n\nconfig :pleroma, :instance,\n name: \"Pleroma\",\n email: \"example@example.com\",\n notify_email: \"noreply@example.com\",\n description: \"A Pleroma instance, an alternative fediverse server\",\n limit: 5000,\n chat_limit: 5000,\n remote_limit: 100_000,\n upload_limit: 16_000_000,\n avatar_upload_limit: 2_000_000,\n background_upload_limit: 4_000_000,\n banner_upload_limit: 4_000_000,\n poll_limits: %{\n max_expiration: 31_536_000,\n max_option_chars: 200,\n max_options: 20,\n min_expiration: 0\n },\n registrations_open: true,\n federating: true,\n federation_incoming_replies_max_depth: 100,\n federation_reachability_timeout_days: 7,\n federation_publisher_modules: [Pleroma.Web.ActivityPub.Publisher],\n allow_relay: true,\n public: true,\n quarantined_instances: [],\n managed_config: true,\n static_dir: \"instance/static/\",\n allowed_post_formats: [\"text/plain\", \"text/html\", \"text/markdown\", \"text/bbcode\"],\n autofollowed_nicknames: [],\n max_pinned_statuses: 1,\n attachment_links: false,\n max_report_comment_size: 1000,\n safe_dm_mentions: false,\n healthcheck: false,\n remote_post_retention_days: 90,\n skip_thread_containment: true,\n limit_to_local_content: :unauthenticated,\n user_bio_length: 5000,\n user_name_length: 100,\n max_account_fields: 10,\n max_remote_account_fields: 20,\n account_field_name_length: 512,\n account_field_value_length: 2048,\n external_user_synchronization: true,\n extended_nickname_format: true,\n multi_factor_authentication: [\n totp: [digits: 6, period: 30],\n backup_codes: [number: 2, length: 6]\n ]\n"
+ assert file =~ "import Config\n"
+ assert file =~ "A Pleroma instance, an alternative fediverse server"
end
end
diff --git a/test/mix/tasks/pleroma/digest_test.exs b/test/mix/tasks/pleroma/digest_test.exs
index d2a8606c7d..08482aadb6 100644
--- a/test/mix/tasks/pleroma/digest_test.exs
+++ b/test/mix/tasks/pleroma/digest_test.exs
@@ -23,6 +23,11 @@ defmodule Mix.Tasks.Pleroma.DigestTest do
setup do: clear_config([Pleroma.Emails.Mailer, :enabled], true)
+ setup do
+ Mox.stub_with(Pleroma.UnstubbedConfigMock, Pleroma.Config)
+ :ok
+ end
+
describe "pleroma.digest test" do
test "Sends digest to the given user" do
user1 = insert(:user)
diff --git a/test/mix/tasks/pleroma/ecto/migrate_test.exs b/test/mix/tasks/pleroma/ecto/migrate_test.exs
index 912471f608..936e5382a0 100644
--- a/test/mix/tasks/pleroma/ecto/migrate_test.exs
+++ b/test/mix/tasks/pleroma/ecto/migrate_test.exs
@@ -9,7 +9,7 @@ defmodule Mix.Tasks.Pleroma.Ecto.MigrateTest do
test "ecto.migrate info message" do
level = Logger.level()
- Logger.configure(level: :warn)
+ Logger.configure(level: :warning)
assert capture_log(fn ->
Mix.Tasks.Pleroma.Ecto.Migrate.run()
diff --git a/test/mix/tasks/pleroma/ecto/rollback_test.exs b/test/mix/tasks/pleroma/ecto/rollback_test.exs
index 9d1a02ae2c..4036b2da6c 100644
--- a/test/mix/tasks/pleroma/ecto/rollback_test.exs
+++ b/test/mix/tasks/pleroma/ecto/rollback_test.exs
@@ -9,11 +9,11 @@ defmodule Mix.Tasks.Pleroma.Ecto.RollbackTest do
test "ecto.rollback info message" do
level = Logger.level()
- Logger.configure(level: :warn)
+ Logger.configure(level: :warning)
assert capture_log(fn ->
Mix.Tasks.Pleroma.Ecto.Rollback.run(["--env", "test"])
- end) =~ "[info] Rollback succesfully"
+ end) =~ "[info] Rollback successfully"
Logger.configure(level: level)
end
diff --git a/test/mix/tasks/pleroma/openapi_spec_test.exs b/test/mix/tasks/pleroma/openapi_spec_test.exs
new file mode 100644
index 0000000000..01437187a0
--- /dev/null
+++ b/test/mix/tasks/pleroma/openapi_spec_test.exs
@@ -0,0 +1,62 @@
+# Pleroma: A lightweight social networking server
+# Copyright © 2017-2022 Pleroma Authors
+# SPDX-License-Identifier: AGPL-3.0-only
+
+defmodule Mix.Tasks.Pleroma.OpenapiSpecTest do
+ use Pleroma.DataCase, async: true
+
+ alias Mix.Tasks.Pleroma.OpenapiSpec
+
+ @spec_base %{
+ "paths" => %{
+ "/cofe" => %{
+ "get" => %{
+ "operationId" => "Some.operation",
+ "tags" => []
+ }
+ },
+ "/mew" => %{
+ "post" => %{
+ "operationId" => "Another.operation",
+ "tags" => ["mew mew"]
+ }
+ }
+ },
+ "x-tagGroups" => [
+ %{
+ "name" => "mew",
+ "tags" => ["mew mew", "abc"]
+ },
+ %{
+ "name" => "lol",
+ "tags" => ["lol lol", "xyz"]
+ }
+ ]
+ }
+
+ describe "check_specs/1" do
+ test "Every operation must have a tag" do
+ assert {:error, ["Some.operation (get /cofe): No tags specified"]} ==
+ OpenapiSpec.check_specs(@spec_base)
+ end
+
+ test "Every tag must be in tag groups" do
+ spec =
+ @spec_base
+ |> put_in(["paths", "/cofe", "get", "tags"], ["abc", "def", "not specified"])
+
+ assert {:error,
+ [
+ "Some.operation (get /cofe): Tags #{inspect(["def", "not specified"])} not available. Please add it in \"x-tagGroups\" in Pleroma.Web.ApiSpec"
+ ]} == OpenapiSpec.check_specs(spec)
+ end
+
+ test "No errors if ok" do
+ spec =
+ @spec_base
+ |> put_in(["paths", "/cofe", "get", "tags"], ["abc", "mew mew"])
+
+ assert :ok == OpenapiSpec.check_specs(spec)
+ end
+ end
+end
diff --git a/test/mix/tasks/pleroma/robots_txt_test.exs b/test/mix/tasks/pleroma/robots_txt_test.exs
index 4426fe5262..dd6ca9fc83 100644
--- a/test/mix/tasks/pleroma/robots_txt_test.exs
+++ b/test/mix/tasks/pleroma/robots_txt_test.exs
@@ -26,7 +26,7 @@ test "creates new dir" do
assert file == "User-Agent: *\nDisallow: /\n"
end
- test "to existance folder" do
+ test "to existing folder" do
path = "test/fixtures/"
file_path = path <> "robots.txt"
clear_config([:instance, :static_dir], path)
diff --git a/test/mix/tasks/pleroma/user_test.exs b/test/mix/tasks/pleroma/user_test.exs
index 4fdf6912b7..c9bcf29513 100644
--- a/test/mix/tasks/pleroma/user_test.exs
+++ b/test/mix/tasks/pleroma/user_test.exs
@@ -20,6 +20,11 @@ defmodule Mix.Tasks.Pleroma.UserTest do
import Mock
import Pleroma.Factory
+ setup do
+ Mox.stub_with(Pleroma.UnstubbedConfigMock, Pleroma.Config)
+ :ok
+ end
+
setup_all do
Mix.shell(Mix.Shell.Process)
diff --git a/test/pleroma/activity/ir/topics_test.exs b/test/pleroma/activity/ir/topics_test.exs
index d299fea633..36a6ca0265 100644
--- a/test/pleroma/activity/ir/topics_test.exs
+++ b/test/pleroma/activity/ir/topics_test.exs
@@ -3,7 +3,7 @@
# SPDX-License-Identifier: AGPL-3.0-only
defmodule Pleroma.Activity.Ir.TopicsTest do
- use Pleroma.DataCase, async: true
+ use Pleroma.DataCase
alias Pleroma.Activity
alias Pleroma.Activity.Ir.Topics
diff --git a/test/pleroma/activity_test.exs b/test/pleroma/activity_test.exs
index a48a688379..67943d879e 100644
--- a/test/pleroma/activity_test.exs
+++ b/test/pleroma/activity_test.exs
@@ -145,7 +145,7 @@ test "when association is not loaded" do
setup do: clear_config([:instance, :limit_to_local_content])
- @tag :skip_on_mac
+ @tag :skip_darwin
test "finds utf8 text in statuses", %{
japanese_activity: japanese_activity,
user: user
diff --git a/test/pleroma/bbs/handler_test.exs b/test/pleroma/bbs/handler_test.exs
deleted file mode 100644
index aea3b6ead4..0000000000
--- a/test/pleroma/bbs/handler_test.exs
+++ /dev/null
@@ -1,89 +0,0 @@
-# Pleroma: A lightweight social networking server
-# Copyright © 2017-2022 Pleroma Authors
-# SPDX-License-Identifier: AGPL-3.0-only
-
-defmodule Pleroma.BBS.HandlerTest do
- use Pleroma.DataCase, async: true
- alias Pleroma.Activity
- alias Pleroma.BBS.Handler
- alias Pleroma.Object
- alias Pleroma.Repo
- alias Pleroma.User
- alias Pleroma.Web.CommonAPI
-
- import ExUnit.CaptureIO
- import Pleroma.Factory
- import Ecto.Query
-
- test "getting the home timeline" do
- user = insert(:user)
- followed = insert(:user)
-
- {:ok, user, followed} = User.follow(user, followed)
-
- {:ok, _first} = CommonAPI.post(user, %{status: "hey"})
- {:ok, _second} = CommonAPI.post(followed, %{status: "hello"})
-
- output =
- capture_io(fn ->
- Handler.handle_command(%{user: user}, "home")
- end)
-
- assert output =~ user.nickname
- assert output =~ followed.nickname
-
- assert output =~ "hey"
- assert output =~ "hello"
- end
-
- test "posting" do
- user = insert(:user)
-
- output =
- capture_io(fn ->
- Handler.handle_command(%{user: user}, "p this is a test post")
- end)
-
- assert output =~ "Posted"
-
- activity =
- Repo.one(
- from(a in Activity,
- where: fragment("?->>'type' = ?", a.data, "Create")
- )
- )
-
- assert activity.actor == user.ap_id
- object = Object.normalize(activity, fetch: false)
- assert object.data["content"] == "this is a test post"
- end
-
- test "replying" do
- user = insert(:user)
- another_user = insert(:user)
-
- {:ok, activity} = CommonAPI.post(another_user, %{status: "this is a test post"})
- activity_object = Object.normalize(activity, fetch: false)
-
- output =
- capture_io(fn ->
- Handler.handle_command(%{user: user}, "r #{activity.id} this is a reply")
- end)
-
- assert output =~ "Replied"
-
- reply =
- Repo.one(
- from(a in Activity,
- where: fragment("?->>'type' = ?", a.data, "Create"),
- where: a.actor == ^user.ap_id
- )
- )
-
- assert reply.actor == user.ap_id
-
- reply_object_data = Object.normalize(reply, fetch: false).data
- assert reply_object_data["content"] == "this is a reply"
- assert reply_object_data["inReplyTo"] == activity_object.data["id"]
- end
-end
diff --git a/test/pleroma/bookmark_folder_test.exs b/test/pleroma/bookmark_folder_test.exs
new file mode 100644
index 0000000000..c45129b0e7
--- /dev/null
+++ b/test/pleroma/bookmark_folder_test.exs
@@ -0,0 +1,60 @@
+# Pleroma: A lightweight social networking server
+# Copyright © 2017-2024 Pleroma Authors
+# SPDX-License-Identifier: AGPL-3.0-only
+
+defmodule Pleroma.BookmarkFolderTest do
+ use Pleroma.DataCase, async: true
+ import Pleroma.Factory
+ alias Pleroma.BookmarkFolder
+
+ describe "create/3" do
+ test "with valid params" do
+ user = insert(:user)
+ {:ok, folder} = BookmarkFolder.create(user.id, "Read later", "🕓")
+ assert folder.user_id == user.id
+ assert folder.name == "Read later"
+ assert folder.emoji == "🕓"
+ end
+
+ test "with invalid params" do
+ {:error, changeset} = BookmarkFolder.create(nil, "", "not an emoji")
+ refute changeset.valid?
+
+ assert changeset.errors == [
+ emoji: {"Invalid emoji", []},
+ user_id: {"can't be blank", [validation: :required]},
+ name: {"can't be blank", [validation: :required]}
+ ]
+ end
+ end
+
+ test "update/3" do
+ user = insert(:user)
+ {:ok, folder} = BookmarkFolder.create(user.id, "Read ltaer")
+ {:ok, folder} = BookmarkFolder.update(folder.id, "Read later")
+ assert folder.name == "Read later"
+ end
+
+ test "for_user/1" do
+ user = insert(:user)
+ other_user = insert(:user)
+
+ {:ok, _} = BookmarkFolder.create(user.id, "Folder 1")
+ {:ok, _} = BookmarkFolder.create(user.id, "Folder 2")
+ {:ok, _} = BookmarkFolder.create(other_user.id, "Folder 3")
+
+ folders = BookmarkFolder.for_user(user.id)
+
+ assert length(folders) == 2
+ end
+
+ test "belongs_to_user?/2" do
+ user = insert(:user)
+ other_user = insert(:user)
+
+ {:ok, folder} = BookmarkFolder.create(user.id, "Folder")
+
+ assert true == BookmarkFolder.belongs_to_user?(folder.id, user.id)
+ assert false == BookmarkFolder.belongs_to_user?(folder.id, other_user.id)
+ end
+end
diff --git a/test/pleroma/bookmark_test.exs b/test/pleroma/bookmark_test.exs
index 57144ded39..a2ed24c268 100644
--- a/test/pleroma/bookmark_test.exs
+++ b/test/pleroma/bookmark_test.exs
@@ -6,15 +6,17 @@ defmodule Pleroma.BookmarkTest do
use Pleroma.DataCase, async: true
import Pleroma.Factory
alias Pleroma.Bookmark
+ alias Pleroma.BookmarkFolder
alias Pleroma.Web.CommonAPI
- describe "create/2" do
+ describe "create/3" do
test "with valid params" do
user = insert(:user)
{:ok, activity} = CommonAPI.post(user, %{status: "Some cool information"})
{:ok, bookmark} = Bookmark.create(user.id, activity.id)
assert bookmark.user_id == user.id
assert bookmark.activity_id == activity.id
+ assert bookmark.folder_id == nil
end
test "with invalid params" do
@@ -26,6 +28,19 @@ test "with invalid params" do
activity_id: {"can't be blank", [validation: :required]}
]
end
+
+ test "update existing bookmark folder" do
+ user = insert(:user)
+ {:ok, activity} = CommonAPI.post(user, %{status: "Some cool information"})
+
+ {:ok, bookmark} = Bookmark.create(user.id, activity.id)
+ assert bookmark.folder_id == nil
+
+ {:ok, bookmark_folder} = BookmarkFolder.create(user.id, "Read later")
+
+ {:ok, bookmark} = Bookmark.create(user.id, activity.id, bookmark_folder.id)
+ assert bookmark.folder_id == bookmark_folder.id
+ end
end
describe "destroy/2" do
diff --git a/test/pleroma/config/deprecation_warnings_test.exs b/test/pleroma/config/deprecation_warnings_test.exs
index f3453ddb09..fca2324ff2 100644
--- a/test/pleroma/config/deprecation_warnings_test.exs
+++ b/test/pleroma/config/deprecation_warnings_test.exs
@@ -125,13 +125,12 @@ test "transforms config to tuples" do
media_removal: ["some.removal", {"some.other.instance", "Some reason"}]
)
- expected_config = [
+ expected_config =
{:media_removal, [{"some.removal", ""}, {"some.other.instance", "Some reason"}]}
- ]
capture_log(fn -> DeprecationWarnings.warn() end)
- assert Config.get([:mrf_simple]) == expected_config
+ assert expected_config in Config.get([:mrf_simple])
end
test "doesn't give a warning with correct config" do
@@ -215,7 +214,7 @@ test "gives warning when there are still strings" do
```
config :pleroma, :mrf,
- transparency_exclusions: [{"instance.tld", "Reason to exlude transparency"}]
+ transparency_exclusions: [{"instance.tld", "Reason to exclude transparency"}]
```
"""
end
@@ -327,11 +326,11 @@ test "check_activity_expiration_config/0" do
end) =~ "Your config is using old namespace for activity expiration configuration."
end
- test "check_uploders_s3_public_endpoint/0" do
+ test "check_uploaders_s3_public_endpoint/0" do
clear_config([Pleroma.Uploaders.S3], public_endpoint: "https://fake.amazonaws.com/bucket/")
assert capture_log(fn ->
- DeprecationWarnings.check_uploders_s3_public_endpoint()
+ DeprecationWarnings.check_uploaders_s3_public_endpoint()
end) =~
"Your config is using the old setting for controlling the URL of media uploaded to your S3 bucket."
end
diff --git a/test/pleroma/config/release_runtime_provider_test.exs b/test/pleroma/config/release_runtime_provider_test.exs
index 4e0d4c838a..8d2a93d6c0 100644
--- a/test/pleroma/config/release_runtime_provider_test.exs
+++ b/test/pleroma/config/release_runtime_provider_test.exs
@@ -10,13 +10,15 @@ defmodule Pleroma.Config.ReleaseRuntimeProviderTest do
describe "load/2" do
test "loads release defaults config and warns about non-existent runtime config" do
ExUnit.CaptureIO.capture_io(fn ->
- merged = ReleaseRuntimeProvider.load([], [])
+ merged = ReleaseRuntimeProvider.load([], config_path: "/var/empty/config.exs")
assert merged == Pleroma.Config.Holder.release_defaults()
end) =~
"!!! Config path is not declared! Please ensure it exists and that PLEROMA_CONFIG_PATH is unset or points to an existing file"
end
test "merged runtime config" do
+ assert :ok == File.chmod!("test/fixtures/config/temp.secret.exs", 0o640)
+
merged =
ReleaseRuntimeProvider.load([], config_path: "test/fixtures/config/temp.secret.exs")
@@ -25,6 +27,8 @@ test "merged runtime config" do
end
test "merged exported config" do
+ assert :ok == File.chmod!("test/fixtures/config/temp.exported_from_db.secret.exs", 0o640)
+
ExUnit.CaptureIO.capture_io(fn ->
merged =
ReleaseRuntimeProvider.load([],
@@ -37,6 +41,9 @@ test "merged exported config" do
end
test "runtime config is merged with exported config" do
+ assert :ok == File.chmod!("test/fixtures/config/temp.secret.exs", 0o640)
+ assert :ok == File.chmod!("test/fixtures/config/temp.exported_from_db.secret.exs", 0o640)
+
merged =
ReleaseRuntimeProvider.load([],
config_path: "test/fixtures/config/temp.secret.exs",
diff --git a/test/pleroma/config_db_test.exs b/test/pleroma/config_db_test.exs
index 8eb0ab4cfc..e20da15748 100644
--- a/test/pleroma/config_db_test.exs
+++ b/test/pleroma/config_db_test.exs
@@ -321,7 +321,7 @@ test "proxy tuple with ip" do
}) == {:proxy_url, {:socks5, {127, 0, 0, 1}, 1234}}
end
- test "tuple with n childs" do
+ test "tuple with n children" do
assert ConfigDB.to_elixir_types(%{
"tuple" => [
"v1",
@@ -399,7 +399,7 @@ test "trandformed keyword" do
assert ConfigDB.to_elixir_types(a: 1, b: 2, c: "string") == [a: 1, b: 2, c: "string"]
end
- test "complex keyword with nested mixed childs" do
+ test "complex keyword with nested mixed children" do
assert ConfigDB.to_elixir_types([
%{"tuple" => [":uploader", "Pleroma.Uploaders.Local"]},
%{"tuple" => [":filters", ["Pleroma.Upload.Filter.Dedupe"]]},
@@ -443,13 +443,13 @@ test "complex keyword with nested mixed childs" do
test "common keyword" do
assert ConfigDB.to_elixir_types([
- %{"tuple" => [":level", ":warn"]},
+ %{"tuple" => [":level", ":warning"]},
%{"tuple" => [":meta", [":all"]]},
%{"tuple" => [":path", ""]},
%{"tuple" => [":val", nil]},
%{"tuple" => [":webhook_url", "https://hooks.slack.com/services/YOUR-KEY-HERE"]}
]) == [
- level: :warn,
+ level: :warning,
meta: [:all],
path: "",
val: nil,
diff --git a/test/pleroma/conversation/participation_test.exs b/test/pleroma/conversation/participation_test.exs
index a84437677d..697bdb7f97 100644
--- a/test/pleroma/conversation/participation_test.exs
+++ b/test/pleroma/conversation/participation_test.exs
@@ -57,7 +57,7 @@ test "for a new conversation or a reply, it doesn't mark the author's participat
assert Participation.unread_count(other_user) == 0
end
- test "for a new conversation, it sets the recipents of the participation" do
+ test "for a new conversation, it sets the recipients of the participation" do
user = insert(:user)
other_user = insert(:user)
third_user = insert(:user)
diff --git a/test/pleroma/conversation_test.exs b/test/pleroma/conversation_test.exs
index 94897e7eab..809c1951ad 100644
--- a/test/pleroma/conversation_test.exs
+++ b/test/pleroma/conversation_test.exs
@@ -13,6 +13,11 @@ defmodule Pleroma.ConversationTest do
setup_all do: clear_config([:instance, :federating], true)
+ setup do
+ Mox.stub_with(Pleroma.UnstubbedConfigMock, Pleroma.Config)
+ :ok
+ end
+
test "it goes through old direct conversations" do
user = insert(:user)
other_user = insert(:user)
diff --git a/test/pleroma/ecto_type/activity_pub/object_validators/bare_uri_test.exs b/test/pleroma/ecto_type/activity_pub/object_validators/bare_uri_test.exs
new file mode 100644
index 0000000000..760ecb4658
--- /dev/null
+++ b/test/pleroma/ecto_type/activity_pub/object_validators/bare_uri_test.exs
@@ -0,0 +1,25 @@
+# Pleroma: A lightweight social networking server
+# Copyright © 2017-2023 Pleroma Authors
+# SPDX-License-Identifier: AGPL-3.0-only
+
+defmodule Pleroma.EctoType.ActivityPub.ObjectValidators.BareUriTest do
+ use Pleroma.DataCase, async: true
+
+ alias Pleroma.EctoType.ActivityPub.ObjectValidators.BareUri
+
+ test "diaspora://" do
+ text = "diaspora://alice@fediverse.example/post/deadbeefdeadbeefdeadbeefdeadbeef"
+ assert {:ok, ^text} = BareUri.cast(text)
+ end
+
+ test "nostr:" do
+ text = "nostr:note1gwdeadbeefdeadbeefdeadbeefdeadbeefdeadbeefdeadbeefdeadbeef"
+ assert {:ok, ^text} = BareUri.cast(text)
+ end
+
+ test "errors for non-URIs" do
+ assert :error == BareUri.cast(1)
+ assert :error == BareUri.cast("foo")
+ assert :error == BareUri.cast("foo bar")
+ end
+end
diff --git a/test/pleroma/emoji/loader_test.exs b/test/pleroma/emoji/loader_test.exs
index 717424fc86..22ee4e8d1b 100644
--- a/test/pleroma/emoji/loader_test.exs
+++ b/test/pleroma/emoji/loader_test.exs
@@ -72,7 +72,7 @@ test "config for special file", %{groups: groups} do
assert group == "special file"
end
- test "no mathing returns nil", %{groups: groups} do
+ test "no matching returns nil", %{groups: groups} do
group =
groups
|> Loader.match_extra("/emoji/some_undefined.png")
diff --git a/test/pleroma/emoji/pack_test.exs b/test/pleroma/emoji/pack_test.exs
index 18b99da75b..00001abfcd 100644
--- a/test/pleroma/emoji/pack_test.exs
+++ b/test/pleroma/emoji/pack_test.exs
@@ -90,4 +90,8 @@ test "add emoji file", %{pack: pack} do
assert updated_pack.files_count == 1
end
+
+ test "load_pack/1 ignores path traversal in a forged pack name", %{pack: pack} do
+ assert {:ok, ^pack} = Pack.load_pack("../../../../../dump_pack")
+ end
end
diff --git a/test/pleroma/emoji_test.exs b/test/pleroma/emoji_test.exs
index 18063c2232..85f4e8bbf9 100644
--- a/test/pleroma/emoji_test.exs
+++ b/test/pleroma/emoji_test.exs
@@ -6,26 +6,26 @@ defmodule Pleroma.EmojiTest do
use ExUnit.Case, async: true
alias Pleroma.Emoji
- describe "is_unicode_emoji?/1" do
+ describe "unicode?/1" do
test "tells if a string is an unicode emoji" do
- refute Emoji.is_unicode_emoji?("X")
- refute Emoji.is_unicode_emoji?("ね")
+ refute Emoji.unicode?("X")
+ refute Emoji.unicode?("ね")
# Only accept fully-qualified (RGI) emoji
# See http://www.unicode.org/reports/tr51/
- refute Emoji.is_unicode_emoji?("❤")
- refute Emoji.is_unicode_emoji?("☂")
+ refute Emoji.unicode?("❤")
+ refute Emoji.unicode?("☂")
- assert Emoji.is_unicode_emoji?("🥺")
- assert Emoji.is_unicode_emoji?("🤰")
- assert Emoji.is_unicode_emoji?("❤️")
- assert Emoji.is_unicode_emoji?("🏳️⚧️")
- assert Emoji.is_unicode_emoji?("🫵")
+ assert Emoji.unicode?("🥺")
+ assert Emoji.unicode?("🤰")
+ assert Emoji.unicode?("❤️")
+ assert Emoji.unicode?("🏳️⚧️")
+ assert Emoji.unicode?("🫵")
# Additionally, we accept regional indicators.
- assert Emoji.is_unicode_emoji?("🇵")
- assert Emoji.is_unicode_emoji?("🇴")
- assert Emoji.is_unicode_emoji?("🇬")
+ assert Emoji.unicode?("🇵")
+ assert Emoji.unicode?("🇴")
+ assert Emoji.unicode?("🇬")
end
end
diff --git a/test/pleroma/formatter_test.exs b/test/pleroma/formatter_test.exs
index 5e431f6c9a..46bb1db673 100644
--- a/test/pleroma/formatter_test.exs
+++ b/test/pleroma/formatter_test.exs
@@ -324,7 +324,7 @@ test "parses tags in html" do
assert {_text, [], ^expected_tags} = Formatter.linkify(text)
end
- test "parses mulitple tags in html" do
+ test "parses multiple tags in html" do
text = "#tag1 #tag2 #tag3 #tag4
"
expected_tags = [
@@ -347,7 +347,7 @@ test "parses tags on the last line of html" do
assert {_text, [], ^expected_tags} = Formatter.linkify(text)
end
- test "parses mulitple tags on mulitple lines in html" do
+ test "parses multiple tags on multiple lines in html" do
text =
"testing...
#tag1 #tag2 #tag3 #tag4
paragraph
#tag5 #tag6 #tag7 #tag8
"
diff --git a/test/pleroma/healthcheck_test.exs b/test/pleroma/healthcheck_test.exs
index dc540c9be0..a8ab865aca 100644
--- a/test/pleroma/healthcheck_test.exs
+++ b/test/pleroma/healthcheck_test.exs
@@ -9,14 +9,16 @@ defmodule Pleroma.HealthcheckTest do
test "system_info/0" do
result = Healthcheck.system_info() |> Map.from_struct()
- assert Map.keys(result) == [
+ keys = Map.keys(result)
+
+ assert Keyword.equal?(keys, [
:active,
:healthy,
:idle,
:job_queue_stats,
:memory_used,
:pool_size
- ]
+ ])
end
describe "check_health/1" do
@@ -25,7 +27,7 @@ test "pool size equals active connections" do
refute result.healthy
end
- test "chech_health/1" do
+ test "check_health/1" do
result = Healthcheck.check_health(%Healthcheck{pool_size: 10, active: 9})
assert result.healthy
end
diff --git a/test/pleroma/html_test.exs b/test/pleroma/html_test.exs
index b99689903e..1be1619711 100644
--- a/test/pleroma/html_test.exs
+++ b/test/pleroma/html_test.exs
@@ -202,7 +202,7 @@ test "extracts the url" do
})
object = Object.normalize(activity, fetch: false)
- {:ok, url} = HTML.extract_first_external_url_from_object(object)
+ url = HTML.extract_first_external_url_from_object(object)
assert url == "https://github.com/komeiji-satori/Dress"
end
@@ -217,7 +217,7 @@ test "skips mentions" do
})
object = Object.normalize(activity, fetch: false)
- {:ok, url} = HTML.extract_first_external_url_from_object(object)
+ url = HTML.extract_first_external_url_from_object(object)
assert url == "https://github.com/syuilo/misskey/blob/develop/docs/setup.en.md"
@@ -233,7 +233,7 @@ test "skips hashtags" do
})
object = Object.normalize(activity, fetch: false)
- {:ok, url} = HTML.extract_first_external_url_from_object(object)
+ url = HTML.extract_first_external_url_from_object(object)
assert url == "https://www.pixiv.net/member_illust.php?mode=medium&illust_id=72255140"
end
@@ -249,7 +249,7 @@ test "skips microformats hashtags" do
})
object = Object.normalize(activity, fetch: false)
- {:ok, url} = HTML.extract_first_external_url_from_object(object)
+ url = HTML.extract_first_external_url_from_object(object)
assert url == "https://www.pixiv.net/member_illust.php?mode=medium&illust_id=72255140"
end
@@ -261,7 +261,7 @@ test "does not crash when there is an HTML entity in a link" do
object = Object.normalize(activity, fetch: false)
- assert {:ok, nil} = HTML.extract_first_external_url_from_object(object)
+ assert nil == HTML.extract_first_external_url_from_object(object)
end
test "skips attachment links" do
@@ -275,7 +275,7 @@ test "skips attachment links" do
object = Object.normalize(activity, fetch: false)
- assert {:ok, nil} = HTML.extract_first_external_url_from_object(object)
+ assert nil == HTML.extract_first_external_url_from_object(object)
end
end
end
diff --git a/test/pleroma/http/adapter_helper/gun_test.exs b/test/pleroma/http/adapter_helper/gun_test.exs
index 7515f4e799..d567bc844b 100644
--- a/test/pleroma/http/adapter_helper/gun_test.exs
+++ b/test/pleroma/http/adapter_helper/gun_test.exs
@@ -36,7 +36,7 @@ test "https ipv6 with default port" do
assert opts[:certificates_verification]
end
- test "https url with non standart port" do
+ test "https url with non-standard port" do
uri = URI.parse("https://example.com:115")
opts = Gun.options([receive_conn: false], uri)
@@ -44,7 +44,7 @@ test "https url with non standart port" do
assert opts[:certificates_verification]
end
- test "merges with defaul http adapter config" do
+ test "merges with default http adapter config" do
defaults = Gun.options([receive_conn: false], URI.parse("https://example.com"))
assert Keyword.has_key?(defaults, :a)
assert Keyword.has_key?(defaults, :b)
diff --git a/test/pleroma/http/adapter_helper/hackney_test.exs b/test/pleroma/http/adapter_helper/hackney_test.exs
index 35d6c49a9a..57ce4728c3 100644
--- a/test/pleroma/http/adapter_helper/hackney_test.exs
+++ b/test/pleroma/http/adapter_helper/hackney_test.exs
@@ -3,7 +3,7 @@
# SPDX-License-Identifier: AGPL-3.0-only
defmodule Pleroma.HTTP.AdapterHelper.HackneyTest do
- use ExUnit.Case, async: true
+ use ExUnit.Case
use Pleroma.Tests.Helpers
alias Pleroma.HTTP.AdapterHelper.Hackney
diff --git a/test/pleroma/http/web_push_test.exs b/test/pleroma/http/web_push_test.exs
new file mode 100644
index 0000000000..dd8e45e6a4
--- /dev/null
+++ b/test/pleroma/http/web_push_test.exs
@@ -0,0 +1,45 @@
+# Pleroma: A lightweight social networking server
+# Copyright © 2017-2022 Pleroma Authors
+# SPDX-License-Identifier: AGPL-3.0-only
+
+defmodule Pleroma.HTTP.WebPushTest do
+ use ExUnit.Case
+
+ import Tesla.Mock
+ alias Pleroma.HTTP
+
+ @push_url "https://some-push-server/"
+
+ setup do
+ mock(fn
+ %{
+ method: :post,
+ url: @push_url,
+ headers: headers
+ } ->
+ if {"content-type", "octet-stream"} in headers do
+ %Tesla.Env{
+ status: 200
+ }
+ else
+ %Tesla.Env{
+ status: 403
+ }
+ end
+ end)
+
+ :ok
+ end
+
+ test "post" do
+ response =
+ HTTP.WebPush.post(
+ @push_url,
+ "encrypted payload",
+ %{"authorization" => "WebPush"},
+ []
+ )
+
+ assert {:ok, %{status: 200}} = response
+ end
+end
diff --git a/test/pleroma/instances/instance_test.exs b/test/pleroma/instances/instance_test.exs
index 861519bcea..6a718be21c 100644
--- a/test/pleroma/instances/instance_test.exs
+++ b/test/pleroma/instances/instance_test.exs
@@ -31,14 +31,6 @@ test "keeps nil `unreachable_since` of existing matching Instance record having
assert {:ok, instance} = Instance.set_reachable(instance.host)
refute instance.unreachable_since
end
-
- test "does NOT create an Instance record in case of no existing matching record" do
- host = "domain.org"
- assert nil == Instance.set_reachable(host)
-
- assert [] = Repo.all(Ecto.Query.from(i in Instance))
- assert Instance.reachable?(host)
- end
end
describe "set_unreachable/1" do
@@ -161,6 +153,66 @@ test "Doesn't scrapes unreachable instances" do
end
end
+ describe "get_or_update_metadata/1" do
+ test "Scrapes Wildebeest NodeInfo" do
+ Tesla.Mock.mock(fn
+ %{url: "https://wildebeest.example.org/.well-known/nodeinfo"} ->
+ %Tesla.Env{
+ status: 200,
+ body: File.read!("test/fixtures/wildebeest-well-known-nodeinfo.json")
+ }
+
+ %{url: "https://wildebeest.example.org/nodeinfo/2.1"} ->
+ %Tesla.Env{
+ status: 200,
+ body: File.read!("test/fixtures/wildebeest-nodeinfo21.json")
+ }
+ end)
+
+ expected = %{
+ software_name: "wildebeest",
+ software_repository: "https://github.com/cloudflare/wildebeest",
+ software_version: "0.0.1"
+ }
+
+ assert expected ==
+ Instance.get_or_update_metadata(URI.parse("https://wildebeest.example.org/"))
+
+ expected = %Pleroma.Instances.Instance.Pleroma.Instances.Metadata{
+ software_name: "wildebeest",
+ software_repository: "https://github.com/cloudflare/wildebeest",
+ software_version: "0.0.1"
+ }
+
+ assert expected ==
+ Repo.get_by(Pleroma.Instances.Instance, %{host: "wildebeest.example.org"}).metadata
+ end
+
+ test "Scrapes Mastodon NodeInfo" do
+ Tesla.Mock.mock(fn
+ %{url: "https://mastodon.example.org/.well-known/nodeinfo"} ->
+ %Tesla.Env{
+ status: 200,
+ body: File.read!("test/fixtures/mastodon-well-known-nodeinfo.json")
+ }
+
+ %{url: "https://mastodon.example.org/nodeinfo/2.0"} ->
+ %Tesla.Env{
+ status: 200,
+ body: File.read!("test/fixtures/mastodon-nodeinfo20.json")
+ }
+ end)
+
+ expected = %{
+ software_name: "mastodon",
+ software_version: "4.1.0"
+ }
+
+ assert expected ==
+ Instance.get_or_update_metadata(URI.parse("https://mastodon.example.org/"))
+ end
+ end
+
test "delete_users_and_activities/1 deletes remote instance users and activities" do
[mario, luigi, _peach, wario] =
users = [
diff --git a/test/pleroma/integration/mastodon_websocket_test.exs b/test/pleroma/integration/mastodon_websocket_test.exs
index 9be0445c0e..a0ffddf8d0 100644
--- a/test/pleroma/integration/mastodon_websocket_test.exs
+++ b/test/pleroma/integration/mastodon_websocket_test.exs
@@ -31,9 +31,22 @@ def start_socket(qs \\ nil, headers \\ []) do
WebsocketClient.start_link(self(), path, headers)
end
+ defp decode_json(json) do
+ with {:ok, %{"event" => event, "payload" => payload_text}} <- Jason.decode(json),
+ {:ok, payload} <- Jason.decode(payload_text) do
+ {:ok, %{"event" => event, "payload" => payload}}
+ end
+ end
+
+ # Turns atom keys to strings
+ defp atom_key_to_string(json) do
+ json
+ |> Jason.encode!()
+ |> Jason.decode!()
+ end
+
test "refuses invalid requests" do
capture_log(fn ->
- assert {:error, %WebSockex.RequestError{code: 404}} = start_socket()
assert {:error, %WebSockex.RequestError{code: 404}} = start_socket("?stream=ncjdk")
Process.sleep(30)
end)
@@ -49,6 +62,10 @@ test "requires authentication and a valid token for protected streams" do
end)
end
+ test "allows unified stream" do
+ assert {:ok, _} = start_socket()
+ end
+
test "allows public streams without authentication" do
assert {:ok, _} = start_socket("?stream=public")
assert {:ok, _} = start_socket("?stream=public:local")
@@ -70,12 +87,143 @@ test "receives well formatted events" do
view_json =
Pleroma.Web.MastodonAPI.StatusView.render("show.json", activity: activity, for: nil)
- |> Jason.encode!()
- |> Jason.decode!()
+ |> atom_key_to_string()
assert json == view_json
end
+ describe "subscribing via WebSocket" do
+ test "can subscribe" do
+ user = insert(:user)
+ {:ok, pid} = start_socket()
+ WebsocketClient.send_text(pid, %{type: "subscribe", stream: "public"} |> Jason.encode!())
+ assert_receive {:text, raw_json}, 1_000
+
+ assert {:ok,
+ %{
+ "event" => "pleroma:respond",
+ "payload" => %{"type" => "subscribe", "result" => "success"}
+ }} = decode_json(raw_json)
+
+ {:ok, activity} = CommonAPI.post(user, %{status: "nice echo chamber"})
+
+ assert_receive {:text, raw_json}, 1_000
+ assert {:ok, json} = Jason.decode(raw_json)
+
+ assert "update" == json["event"]
+ assert json["payload"]
+ assert {:ok, json} = Jason.decode(json["payload"])
+
+ view_json =
+ Pleroma.Web.MastodonAPI.StatusView.render("show.json", activity: activity, for: nil)
+ |> Jason.encode!()
+ |> Jason.decode!()
+
+ assert json == view_json
+ end
+
+ test "can subscribe to multiple streams" do
+ user = insert(:user)
+ {:ok, pid} = start_socket()
+ WebsocketClient.send_text(pid, %{type: "subscribe", stream: "public"} |> Jason.encode!())
+ assert_receive {:text, raw_json}, 1_000
+
+ assert {:ok,
+ %{
+ "event" => "pleroma:respond",
+ "payload" => %{"type" => "subscribe", "result" => "success"}
+ }} = decode_json(raw_json)
+
+ WebsocketClient.send_text(
+ pid,
+ %{type: "subscribe", stream: "hashtag", tag: "mew"} |> Jason.encode!()
+ )
+
+ assert_receive {:text, raw_json}, 1_000
+
+ assert {:ok,
+ %{
+ "event" => "pleroma:respond",
+ "payload" => %{"type" => "subscribe", "result" => "success"}
+ }} = decode_json(raw_json)
+
+ {:ok, _activity} = CommonAPI.post(user, %{status: "nice echo chamber #mew"})
+
+ assert_receive {:text, raw_json}, 1_000
+ assert {:ok, %{"stream" => stream1}} = Jason.decode(raw_json)
+ assert_receive {:text, raw_json}, 1_000
+ assert {:ok, %{"stream" => stream2}} = Jason.decode(raw_json)
+
+ streams = [stream1, stream2]
+ assert ["hashtag", "mew"] in streams
+ assert ["public"] in streams
+ end
+
+ test "won't double subscribe" do
+ user = insert(:user)
+ {:ok, pid} = start_socket()
+ WebsocketClient.send_text(pid, %{type: "subscribe", stream: "public"} |> Jason.encode!())
+ assert_receive {:text, raw_json}, 1_000
+
+ assert {:ok,
+ %{
+ "event" => "pleroma:respond",
+ "payload" => %{"type" => "subscribe", "result" => "success"}
+ }} = decode_json(raw_json)
+
+ WebsocketClient.send_text(pid, %{type: "subscribe", stream: "public"} |> Jason.encode!())
+ assert_receive {:text, raw_json}, 1_000
+
+ assert {:ok,
+ %{
+ "event" => "pleroma:respond",
+ "payload" => %{"type" => "subscribe", "result" => "ignored"}
+ }} = decode_json(raw_json)
+
+ {:ok, _activity} = CommonAPI.post(user, %{status: "nice echo chamber"})
+
+ assert_receive {:text, _}, 1_000
+ refute_receive {:text, _}, 1_000
+ end
+
+ test "rejects invalid streams" do
+ {:ok, pid} = start_socket()
+ WebsocketClient.send_text(pid, %{type: "subscribe", stream: "nonsense"} |> Jason.encode!())
+ assert_receive {:text, raw_json}, 1_000
+
+ assert {:ok,
+ %{
+ "event" => "pleroma:respond",
+ "payload" => %{"type" => "subscribe", "result" => "error", "error" => "bad_topic"}
+ }} = decode_json(raw_json)
+ end
+
+ test "can unsubscribe" do
+ user = insert(:user)
+ {:ok, pid} = start_socket()
+ WebsocketClient.send_text(pid, %{type: "subscribe", stream: "public"} |> Jason.encode!())
+ assert_receive {:text, raw_json}, 1_000
+
+ assert {:ok,
+ %{
+ "event" => "pleroma:respond",
+ "payload" => %{"type" => "subscribe", "result" => "success"}
+ }} = decode_json(raw_json)
+
+ WebsocketClient.send_text(pid, %{type: "unsubscribe", stream: "public"} |> Jason.encode!())
+ assert_receive {:text, raw_json}, 1_000
+
+ assert {:ok,
+ %{
+ "event" => "pleroma:respond",
+ "payload" => %{"type" => "unsubscribe", "result" => "success"}
+ }} = decode_json(raw_json)
+
+ {:ok, _activity} = CommonAPI.post(user, %{status: "nice echo chamber"})
+ refute_receive {:text, _}, 1_000
+ end
+ end
+
describe "with a valid user token" do
setup do
{:ok, app} =
@@ -120,15 +268,122 @@ test "accepts the 'user:notification' stream", %{token: token} = _state do
end)
end
- test "accepts valid token on Sec-WebSocket-Protocol header", %{token: token} do
- assert {:ok, _} = start_socket("?stream=user", [{"Sec-WebSocket-Protocol", token.token}])
+ test "accepts valid token on client-sent event", %{token: token} do
+ assert {:ok, pid} = start_socket()
- capture_log(fn ->
- assert {:error, %WebSockex.RequestError{code: 401}} =
- start_socket("?stream=user", [{"Sec-WebSocket-Protocol", "I am a friend"}])
+ WebsocketClient.send_text(
+ pid,
+ %{type: "pleroma:authenticate", token: token.token} |> Jason.encode!()
+ )
- Process.sleep(30)
- end)
+ assert_receive {:text, raw_json}, 1_000
+
+ assert {:ok,
+ %{
+ "event" => "pleroma:respond",
+ "payload" => %{"type" => "pleroma:authenticate", "result" => "success"}
+ }} = decode_json(raw_json)
+
+ WebsocketClient.send_text(pid, %{type: "subscribe", stream: "user"} |> Jason.encode!())
+ assert_receive {:text, raw_json}, 1_000
+
+ assert {:ok,
+ %{
+ "event" => "pleroma:respond",
+ "payload" => %{"type" => "subscribe", "result" => "success"}
+ }} = decode_json(raw_json)
+ end
+
+ test "rejects invalid token on client-sent event" do
+ assert {:ok, pid} = start_socket()
+
+ WebsocketClient.send_text(
+ pid,
+ %{type: "pleroma:authenticate", token: "Something else"} |> Jason.encode!()
+ )
+
+ assert_receive {:text, raw_json}, 1_000
+
+ assert {:ok,
+ %{
+ "event" => "pleroma:respond",
+ "payload" => %{
+ "type" => "pleroma:authenticate",
+ "result" => "error",
+ "error" => "unauthorized"
+ }
+ }} = decode_json(raw_json)
+ end
+
+ test "rejects new authenticate request if already logged-in", %{token: token} do
+ assert {:ok, pid} = start_socket()
+
+ WebsocketClient.send_text(
+ pid,
+ %{type: "pleroma:authenticate", token: token.token} |> Jason.encode!()
+ )
+
+ assert_receive {:text, raw_json}, 1_000
+
+ assert {:ok,
+ %{
+ "event" => "pleroma:respond",
+ "payload" => %{"type" => "pleroma:authenticate", "result" => "success"}
+ }} = decode_json(raw_json)
+
+ WebsocketClient.send_text(
+ pid,
+ %{type: "pleroma:authenticate", token: "Something else"} |> Jason.encode!()
+ )
+
+ assert_receive {:text, raw_json}, 1_000
+
+ assert {:ok,
+ %{
+ "event" => "pleroma:respond",
+ "payload" => %{
+ "type" => "pleroma:authenticate",
+ "result" => "error",
+ "error" => "already_authenticated"
+ }
+ }} = decode_json(raw_json)
+ end
+
+ test "accepts the 'list' stream", %{token: token, user: user} do
+ posting_user = insert(:user)
+
+ {:ok, list} = Pleroma.List.create("test", user)
+ Pleroma.List.follow(list, posting_user)
+
+ assert {:ok, _} = start_socket("?stream=list&access_token=#{token.token}&list=#{list.id}")
+
+ assert {:ok, pid} = start_socket("?access_token=#{token.token}")
+
+ WebsocketClient.send_text(
+ pid,
+ %{type: "subscribe", stream: "list", list: list.id} |> Jason.encode!()
+ )
+
+ assert_receive {:text, raw_json}, 1_000
+
+ assert {:ok,
+ %{
+ "event" => "pleroma:respond",
+ "payload" => %{"type" => "subscribe", "result" => "success"}
+ }} = decode_json(raw_json)
+
+ WebsocketClient.send_text(
+ pid,
+ %{type: "subscribe", stream: "list", list: to_string(list.id)} |> Jason.encode!()
+ )
+
+ assert_receive {:text, raw_json}, 1_000
+
+ assert {:ok,
+ %{
+ "event" => "pleroma:respond",
+ "payload" => %{"type" => "subscribe", "result" => "ignored"}
+ }} = decode_json(raw_json)
end
test "disconnect when token is revoked", %{app: app, user: user, token: token} do
@@ -146,5 +401,85 @@ test "disconnect when token is revoked", %{app: app, user: user, token: token} d
assert_receive {:close, _}
refute_receive {:close, _}
end
+
+ test "receives private statuses", %{user: reading_user, token: token} do
+ user = insert(:user)
+ CommonAPI.follow(reading_user, user)
+
+ {:ok, _} = start_socket("?stream=user&access_token=#{token.token}")
+
+ {:ok, activity} =
+ CommonAPI.post(user, %{status: "nice echo chamber", visibility: "private"})
+
+ assert_receive {:text, raw_json}, 1_000
+ assert {:ok, json} = Jason.decode(raw_json)
+
+ assert "update" == json["event"]
+ assert json["payload"]
+ assert {:ok, json} = Jason.decode(json["payload"])
+
+ view_json =
+ Pleroma.Web.MastodonAPI.StatusView.render("show.json",
+ activity: activity,
+ for: reading_user
+ )
+ |> Jason.encode!()
+ |> Jason.decode!()
+
+ assert json == view_json
+ end
+
+ test "receives edits", %{user: reading_user, token: token} do
+ user = insert(:user)
+ CommonAPI.follow(reading_user, user)
+
+ {:ok, _} = start_socket("?stream=user&access_token=#{token.token}")
+
+ {:ok, activity} =
+ CommonAPI.post(user, %{status: "nice echo chamber", visibility: "private"})
+
+ assert_receive {:text, _raw_json}, 1_000
+
+ {:ok, _} = CommonAPI.update(user, activity, %{status: "mew mew", visibility: "private"})
+
+ assert_receive {:text, raw_json}, 1_000
+
+ activity = Pleroma.Activity.normalize(activity)
+
+ view_json =
+ Pleroma.Web.MastodonAPI.StatusView.render("show.json",
+ activity: activity,
+ for: reading_user
+ )
+ |> Jason.encode!()
+ |> Jason.decode!()
+
+ assert {:ok, %{"event" => "status.update", "payload" => ^view_json}} = decode_json(raw_json)
+ end
+
+ test "receives notifications", %{user: reading_user, token: token} do
+ user = insert(:user)
+ CommonAPI.follow(reading_user, user)
+
+ {:ok, _} = start_socket("?stream=user:notification&access_token=#{token.token}")
+
+ {:ok, %Pleroma.Activity{id: activity_id} = _activity} =
+ CommonAPI.post(user, %{
+ status: "nice echo chamber @#{reading_user.nickname}",
+ visibility: "private"
+ })
+
+ assert_receive {:text, raw_json}, 1_000
+
+ assert {:ok,
+ %{
+ "event" => "notification",
+ "payload" => %{
+ "status" => %{
+ "id" => ^activity_id
+ }
+ }
+ }} = decode_json(raw_json)
+ end
end
end
diff --git a/test/pleroma/maps_test.exs b/test/pleroma/maps_test.exs
new file mode 100644
index 0000000000..05f1b18b2a
--- /dev/null
+++ b/test/pleroma/maps_test.exs
@@ -0,0 +1,22 @@
+# Pleroma: A lightweight social networking server
+# Copyright © 2024 Pleroma Authors
+# SPDX-License-Identifier: AGPL-3.0-only
+
+defmodule Pleroma.MapsTest do
+ use Pleroma.DataCase, async: true
+
+ alias Pleroma.Maps
+
+ describe "filter_empty_values/1" do
+ assert %{"bar" => "b", "ray" => ["foo"], "objs" => %{"a" => "b"}} ==
+ Maps.filter_empty_values(%{
+ "foo" => nil,
+ "fooz" => "",
+ "bar" => "b",
+ "rei" => [],
+ "ray" => ["foo"],
+ "obj" => %{},
+ "objs" => %{"a" => "b"}
+ })
+ end
+end
diff --git a/test/pleroma/mfa/totp_test.exs b/test/pleroma/mfa/totp_test.exs
index 56e4f48ed2..f291ed14b9 100644
--- a/test/pleroma/mfa/totp_test.exs
+++ b/test/pleroma/mfa/totp_test.exs
@@ -7,6 +7,8 @@ defmodule Pleroma.MFA.TOTPTest do
alias Pleroma.MFA.TOTP
+ import Pleroma.Tests.Helpers, only: [uri_equal?: 2]
+
test "create provisioning_uri to generate qrcode" do
uri =
TOTP.provisioning_uri("test-secrcet", "test@example.com",
@@ -15,7 +17,9 @@ test "create provisioning_uri to generate qrcode" do
period: 60
)
- assert uri ==
+ assert uri_equal?(
+ uri,
"otpauth://totp/test@example.com?digits=8&issuer=Plerome-42&period=60&secret=test-secrcet"
+ )
end
end
diff --git a/test/pleroma/notification_test.exs b/test/pleroma/notification_test.exs
index 255097ed0e..2c582c708e 100644
--- a/test/pleroma/notification_test.exs
+++ b/test/pleroma/notification_test.exs
@@ -6,7 +6,6 @@ defmodule Pleroma.NotificationTest do
use Pleroma.DataCase, async: false
import Pleroma.Factory
- import Mock
alias Pleroma.FollowingRelationship
alias Pleroma.Notification
@@ -18,8 +17,11 @@ defmodule Pleroma.NotificationTest do
alias Pleroma.Web.ActivityPub.Transmogrifier
alias Pleroma.Web.CommonAPI
alias Pleroma.Web.MastodonAPI.NotificationView
- alias Pleroma.Web.Push
- alias Pleroma.Web.Streamer
+
+ setup do
+ Mox.stub_with(Pleroma.UnstubbedConfigMock, Pleroma.Config)
+ :ok
+ end
describe "create_notifications" do
test "never returns nil" do
@@ -110,6 +112,7 @@ test "it creates a notification for subscribed users" do
{:ok, [notification]} = Notification.create_notifications(status)
assert notification.user_id == subscriber.id
+ assert notification.type == "status"
end
test "does not create a notification for subscribed users if status is a reply" do
@@ -134,6 +137,21 @@ test "does not create a notification for subscribed users if status is a reply"
assert Enum.empty?(subscriber_notifications)
end
+ test "does not create subscriber notification if mentioned" do
+ user = insert(:user)
+ subscriber = insert(:user)
+
+ User.subscribe(subscriber, user)
+
+ {:ok, status} = CommonAPI.post(user, %{status: "mentioning @#{subscriber.nickname}"})
+ {:ok, [notification] = notifications} = Notification.create_notifications(status)
+
+ assert length(notifications) == 1
+
+ assert notification.user_id == subscriber.id
+ assert notification.type == "mention"
+ end
+
test "it sends edited notifications to those who repeated a status" do
user = insert(:user)
repeated_user = insert(:user)
@@ -170,158 +188,7 @@ test "create_poll_notifications/1" do
assert [user2.id, user3.id, user1.id] == Enum.map(notifications, & &1.user_id)
end
- describe "CommonApi.post/2 notification-related functionality" do
- test_with_mock "creates but does NOT send notification to blocker user",
- Push,
- [:passthrough],
- [] do
- user = insert(:user)
- blocker = insert(:user)
- {:ok, _user_relationship} = User.block(blocker, user)
-
- {:ok, _activity} = CommonAPI.post(user, %{status: "hey @#{blocker.nickname}!"})
-
- blocker_id = blocker.id
- assert [%Notification{user_id: ^blocker_id}] = Repo.all(Notification)
- refute called(Push.send(:_))
- end
-
- test_with_mock "creates but does NOT send notification to notification-muter user",
- Push,
- [:passthrough],
- [] do
- user = insert(:user)
- muter = insert(:user)
- {:ok, _user_relationships} = User.mute(muter, user)
-
- {:ok, _activity} = CommonAPI.post(user, %{status: "hey @#{muter.nickname}!"})
-
- muter_id = muter.id
- assert [%Notification{user_id: ^muter_id}] = Repo.all(Notification)
- refute called(Push.send(:_))
- end
-
- test_with_mock "creates but does NOT send notification to thread-muter user",
- Push,
- [:passthrough],
- [] do
- user = insert(:user)
- thread_muter = insert(:user)
-
- {:ok, activity} = CommonAPI.post(user, %{status: "hey @#{thread_muter.nickname}!"})
-
- {:ok, _} = CommonAPI.add_mute(thread_muter, activity)
-
- {:ok, _same_context_activity} =
- CommonAPI.post(user, %{
- status: "hey-hey-hey @#{thread_muter.nickname}!",
- in_reply_to_status_id: activity.id
- })
-
- [pre_mute_notification, post_mute_notification] =
- Repo.all(from(n in Notification, where: n.user_id == ^thread_muter.id, order_by: n.id))
-
- pre_mute_notification_id = pre_mute_notification.id
- post_mute_notification_id = post_mute_notification.id
-
- assert called(
- Push.send(
- :meck.is(fn
- %Notification{id: ^pre_mute_notification_id} -> true
- _ -> false
- end)
- )
- )
-
- refute called(
- Push.send(
- :meck.is(fn
- %Notification{id: ^post_mute_notification_id} -> true
- _ -> false
- end)
- )
- )
- end
- end
-
describe "create_notification" do
- @tag needs_streamer: true
- test "it creates a notification for user and send to the 'user' and the 'user:notification' stream" do
- %{user: user, token: oauth_token} = oauth_access(["read"])
-
- task =
- Task.async(fn ->
- {:ok, _topic} = Streamer.get_topic_and_add_socket("user", user, oauth_token)
- assert_receive {:render_with_user, _, _, _}, 4_000
- end)
-
- task_user_notification =
- Task.async(fn ->
- {:ok, _topic} =
- Streamer.get_topic_and_add_socket("user:notification", user, oauth_token)
-
- assert_receive {:render_with_user, _, _, _}, 4_000
- end)
-
- activity = insert(:note_activity)
-
- notify = Notification.create_notification(activity, user)
- assert notify.user_id == user.id
- Task.await(task)
- Task.await(task_user_notification)
- end
-
- test "it creates a notification for user if the user blocks the activity author" do
- activity = insert(:note_activity)
- author = User.get_cached_by_ap_id(activity.data["actor"])
- user = insert(:user)
- {:ok, _user_relationship} = User.block(user, author)
-
- assert Notification.create_notification(activity, user)
- end
-
- test "it creates a notification for the user if the user mutes the activity author" do
- muter = insert(:user)
- muted = insert(:user)
- {:ok, _} = User.mute(muter, muted)
- muter = Repo.get(User, muter.id)
- {:ok, activity} = CommonAPI.post(muted, %{status: "Hi @#{muter.nickname}"})
-
- notification = Notification.create_notification(activity, muter)
-
- assert notification.id
- assert notification.seen
- end
-
- test "notification created if user is muted without notifications" do
- muter = insert(:user)
- muted = insert(:user)
-
- {:ok, _user_relationships} = User.mute(muter, muted, %{notifications: false})
-
- {:ok, activity} = CommonAPI.post(muted, %{status: "Hi @#{muter.nickname}"})
-
- assert Notification.create_notification(activity, muter)
- end
-
- test "it creates a notification for an activity from a muted thread" do
- muter = insert(:user)
- other_user = insert(:user)
- {:ok, activity} = CommonAPI.post(muter, %{status: "hey"})
- CommonAPI.add_mute(muter, activity)
-
- {:ok, activity} =
- CommonAPI.post(other_user, %{
- status: "Hi @#{muter.nickname}",
- in_reply_to_status_id: activity.id
- })
-
- notification = Notification.create_notification(activity, muter)
-
- assert notification.id
- assert notification.seen
- end
-
test "it disables notifications from strangers" do
follower = insert(:user)
@@ -334,6 +201,32 @@ test "it disables notifications from strangers" do
refute Notification.create_notification(activity, followed)
end
+ test "it disables notifications from non-followees" do
+ follower = insert(:user)
+
+ followed =
+ insert(:user,
+ notification_settings: %Pleroma.User.NotificationSetting{block_from_strangers: true}
+ )
+
+ CommonAPI.follow(follower, followed)
+ {:ok, activity} = CommonAPI.post(follower, %{status: "hey @#{followed.nickname}"})
+ refute Notification.create_notification(activity, followed)
+ end
+
+ test "it allows notifications from followees" do
+ poster = insert(:user)
+
+ receiver =
+ insert(:user,
+ notification_settings: %Pleroma.User.NotificationSetting{block_from_strangers: true}
+ )
+
+ CommonAPI.follow(receiver, poster)
+ {:ok, activity} = CommonAPI.post(poster, %{status: "hey @#{receiver.nickname}"})
+ assert Notification.create_notification(activity, receiver)
+ end
+
test "it doesn't create a notification for user if he is the activity author" do
activity = insert(:note_activity)
author = User.get_cached_by_ap_id(activity.data["actor"])
@@ -572,9 +465,7 @@ test "it sets all notifications as read up to a specified notification ID" do
status: "hey yet again @#{other_user.nickname}!"
})
- [_, read_notification] = Notification.set_read_up_to(other_user, n2.id)
-
- assert read_notification.activity.object
+ Notification.set_read_up_to(other_user, n2.id)
[n3, n2, n1] = Notification.for_user(other_user)
@@ -649,7 +540,7 @@ test "it sends notifications to addressed users in new messages" do
status: "hey @#{other_user.nickname}!"
})
- {enabled_receivers, _disabled_receivers} = Notification.get_notified_from_activity(activity)
+ enabled_receivers = Notification.get_notified_from_activity(activity)
assert other_user in enabled_receivers
end
@@ -681,7 +572,7 @@ test "it sends notifications to mentioned users in new messages" do
{:ok, activity} = Transmogrifier.handle_incoming(create_activity)
- {enabled_receivers, _disabled_receivers} = Notification.get_notified_from_activity(activity)
+ enabled_receivers = Notification.get_notified_from_activity(activity)
assert other_user in enabled_receivers
end
@@ -708,7 +599,7 @@ test "it does not send notifications to users who are only cc in new messages" d
{:ok, activity} = Transmogrifier.handle_incoming(create_activity)
- {enabled_receivers, _disabled_receivers} = Notification.get_notified_from_activity(activity)
+ enabled_receivers = Notification.get_notified_from_activity(activity)
assert other_user not in enabled_receivers
end
@@ -725,8 +616,7 @@ test "it does not send notification to mentioned users in likes" do
{:ok, activity_two} = CommonAPI.favorite(third_user, activity_one.id)
- {enabled_receivers, _disabled_receivers} =
- Notification.get_notified_from_activity(activity_two)
+ enabled_receivers = Notification.get_notified_from_activity(activity_two)
assert other_user not in enabled_receivers
end
@@ -748,7 +638,7 @@ test "it only notifies the post's author in likes" do
|> Map.put("to", [other_user.ap_id | like_data["to"]])
|> ActivityPub.persist(local: true)
- {enabled_receivers, _disabled_receivers} = Notification.get_notified_from_activity(like)
+ enabled_receivers = Notification.get_notified_from_activity(like)
assert other_user not in enabled_receivers
end
@@ -765,39 +655,36 @@ test "it does not send notification to mentioned users in announces" do
{:ok, activity_two} = CommonAPI.repeat(activity_one.id, third_user)
- {enabled_receivers, _disabled_receivers} =
- Notification.get_notified_from_activity(activity_two)
+ enabled_receivers = Notification.get_notified_from_activity(activity_two)
assert other_user not in enabled_receivers
end
- test "it returns blocking recipient in disabled recipients list" do
+ test "it does not return blocking recipient in recipients list" do
user = insert(:user)
other_user = insert(:user)
{:ok, _user_relationship} = User.block(other_user, user)
{:ok, activity} = CommonAPI.post(user, %{status: "hey @#{other_user.nickname}!"})
- {enabled_receivers, disabled_receivers} = Notification.get_notified_from_activity(activity)
+ enabled_receivers = Notification.get_notified_from_activity(activity)
assert [] == enabled_receivers
- assert [other_user] == disabled_receivers
end
- test "it returns notification-muting recipient in disabled recipients list" do
+ test "it does not return notification-muting recipient in recipients list" do
user = insert(:user)
other_user = insert(:user)
{:ok, _user_relationships} = User.mute(other_user, user)
{:ok, activity} = CommonAPI.post(user, %{status: "hey @#{other_user.nickname}!"})
- {enabled_receivers, disabled_receivers} = Notification.get_notified_from_activity(activity)
+ enabled_receivers = Notification.get_notified_from_activity(activity)
assert [] == enabled_receivers
- assert [other_user] == disabled_receivers
end
- test "it returns thread-muting recipient in disabled recipients list" do
+ test "it does not return thread-muting recipient in recipients list" do
user = insert(:user)
other_user = insert(:user)
@@ -811,14 +698,12 @@ test "it returns thread-muting recipient in disabled recipients list" do
in_reply_to_status_id: activity.id
})
- {enabled_receivers, disabled_receivers} =
- Notification.get_notified_from_activity(same_context_activity)
+ enabled_receivers = Notification.get_notified_from_activity(same_context_activity)
- assert [other_user] == disabled_receivers
refute other_user in enabled_receivers
end
- test "it returns non-following domain-blocking recipient in disabled recipients list" do
+ test "it does not return non-following domain-blocking recipient in recipients list" do
blocked_domain = "blocked.domain"
user = insert(:user, %{ap_id: "https://#{blocked_domain}/@actor"})
other_user = insert(:user)
@@ -827,10 +712,9 @@ test "it returns non-following domain-blocking recipient in disabled recipients
{:ok, activity} = CommonAPI.post(user, %{status: "hey @#{other_user.nickname}!"})
- {enabled_receivers, disabled_receivers} = Notification.get_notified_from_activity(activity)
+ enabled_receivers = Notification.get_notified_from_activity(activity)
assert [] == enabled_receivers
- assert [other_user] == disabled_receivers
end
test "it returns following domain-blocking recipient in enabled recipients list" do
@@ -843,10 +727,9 @@ test "it returns following domain-blocking recipient in enabled recipients list"
{:ok, activity} = CommonAPI.post(user, %{status: "hey @#{other_user.nickname}!"})
- {enabled_receivers, disabled_receivers} = Notification.get_notified_from_activity(activity)
+ enabled_receivers = Notification.get_notified_from_activity(activity)
assert [other_user] == enabled_receivers
- assert [] == disabled_receivers
end
test "it sends edited notifications to those who repeated a status" do
@@ -866,11 +749,10 @@ test "it sends edited notifications to those who repeated a status" do
status: "hey @#{other_user.nickname}! mew mew"
})
- {enabled_receivers, _disabled_receivers} =
- Notification.get_notified_from_activity(edit_activity)
+ enabled_receivers = Notification.get_notified_from_activity(edit_activity)
assert repeated_user in enabled_receivers
- assert other_user not in enabled_receivers
+ refute other_user in enabled_receivers
end
end
@@ -977,22 +859,6 @@ test "repeating an activity which is already deleted does not generate a notific
assert Enum.empty?(Notification.for_user(user))
end
- test "replying to a deleted post without tagging does not generate a notification" do
- user = insert(:user)
- other_user = insert(:user)
-
- {:ok, activity} = CommonAPI.post(user, %{status: "test post"})
- {:ok, _deletion_activity} = CommonAPI.delete(activity.id, user)
-
- {:ok, _reply_activity} =
- CommonAPI.post(other_user, %{
- status: "test reply",
- in_reply_to_status_id: activity.id
- })
-
- assert Enum.empty?(Notification.for_user(user))
- end
-
test "notifications are deleted if a local user is deleted" do
user = insert(:user)
other_user = insert(:user)
@@ -1158,13 +1024,13 @@ test "it doesn't return notifications for muted thread", %{user: user} do
assert Notification.for_user(user) == []
end
- test "it returns notifications from a muted user when with_muted is set", %{user: user} do
+ test "it doesn't return notifications from a muted user when with_muted is set", %{user: user} do
muted = insert(:user)
{:ok, _user_relationships} = User.mute(user, muted)
{:ok, _activity} = CommonAPI.post(muted, %{status: "hey @#{user.nickname}"})
- assert length(Notification.for_user(user, %{with_muted: true})) == 1
+ assert Enum.empty?(Notification.for_user(user, %{with_muted: true}))
end
test "it doesn't return notifications from a blocked user when with_muted is set", %{
@@ -1225,5 +1091,32 @@ test "it returns notifications about favorites with filtered word", %{user: user
assert length(Notification.for_user(user)) == 1
end
+
+ test "it returns notifications when related object is without content and filters are defined",
+ %{user: user} do
+ followed_user = insert(:user, is_locked: true)
+
+ insert(:filter, user: followed_user, phrase: "test", hide: true)
+
+ {:ok, _, _, _activity} = CommonAPI.follow(user, followed_user)
+ refute FollowingRelationship.following?(user, followed_user)
+ assert [notification] = Notification.for_user(followed_user)
+
+ assert %{type: "follow_request"} =
+ NotificationView.render("show.json", %{
+ notification: notification,
+ for: followed_user
+ })
+
+ assert {:ok, _} = CommonAPI.accept_follow_request(user, followed_user)
+
+ assert [notification] = Notification.for_user(followed_user)
+
+ assert %{type: "follow"} =
+ NotificationView.render("show.json", %{
+ notification: notification,
+ for: followed_user
+ })
+ end
end
end
diff --git a/test/pleroma/object/fetcher_test.exs b/test/pleroma/object/fetcher_test.exs
index c8ad66ddb4..6f21452a7d 100644
--- a/test/pleroma/object/fetcher_test.exs
+++ b/test/pleroma/object/fetcher_test.exs
@@ -9,8 +9,12 @@ defmodule Pleroma.Object.FetcherTest do
alias Pleroma.Instances
alias Pleroma.Object
alias Pleroma.Object.Fetcher
+ alias Pleroma.Web.ActivityPub.ObjectValidator
+
+ require Pleroma.Constants
import Mock
+ import Pleroma.Factory
import Tesla.Mock
setup do
@@ -97,8 +101,7 @@ test "it works when fetching the OP actor errors out" do
test "it returns thread depth exceeded error if thread depth is exceeded" do
clear_config([:instance, :federation_incoming_replies_max_depth], 0)
- assert {:error, "Max thread distance exceeded."} =
- Fetcher.fetch_object_from_id(@ap_id, depth: 1)
+ assert {:error, :allowed_depth} = Fetcher.fetch_object_from_id(@ap_id, depth: 1)
end
test "it fetches object if max thread depth is restricted to 0 and depth is not specified" do
@@ -216,14 +219,14 @@ test "all objects with fake directions are rejected by the object fetcher" do
end
test "handle HTTP 410 Gone response" do
- assert {:error, "Object has been deleted"} ==
+ assert {:error, :not_found} ==
Fetcher.fetch_and_contain_remote_object_from_id(
"https://mastodon.example.org/users/userisgone"
)
end
test "handle HTTP 404 response" do
- assert {:error, "Object has been deleted"} ==
+ assert {:error, :not_found} ==
Fetcher.fetch_and_contain_remote_object_from_id(
"https://mastodon.example.org/users/userisgone404"
)
@@ -284,6 +287,8 @@ test "it can refetch pruned objects" do
describe "refetching" do
setup do
+ insert(:user, ap_id: "https://mastodon.social/users/emelie")
+
object1 = %{
"id" => "https://mastodon.social/1",
"actor" => "https://mastodon.social/users/emelie",
@@ -293,10 +298,14 @@ test "it can refetch pruned objects" do
"bcc" => [],
"bto" => [],
"cc" => [],
- "to" => [],
- "summary" => ""
+ "to" => [Pleroma.Constants.as_public()],
+ "summary" => "",
+ "published" => "2023-05-08 23:43:20Z",
+ "updated" => "2023-05-09 23:43:20Z"
}
+ {:ok, local_object1, _} = ObjectValidator.validate(object1, [])
+
object2 = %{
"id" => "https://mastodon.social/2",
"actor" => "https://mastodon.social/users/emelie",
@@ -306,8 +315,10 @@ test "it can refetch pruned objects" do
"bcc" => [],
"bto" => [],
"cc" => [],
- "to" => [],
+ "to" => [Pleroma.Constants.as_public()],
"summary" => "",
+ "published" => "2023-05-08 23:43:20Z",
+ "updated" => "2023-05-09 23:43:25Z",
"formerRepresentations" => %{
"type" => "OrderedCollection",
"orderedItems" => [
@@ -319,14 +330,18 @@ test "it can refetch pruned objects" do
"bcc" => [],
"bto" => [],
"cc" => [],
- "to" => [],
- "summary" => ""
+ "to" => [Pleroma.Constants.as_public()],
+ "summary" => "",
+ "published" => "2023-05-08 23:43:20Z",
+ "updated" => "2023-05-09 23:43:21Z"
}
],
"totalItems" => 1
}
}
+ {:ok, local_object2, _} = ObjectValidator.validate(object2, [])
+
mock(fn
%{
method: :get,
@@ -335,7 +350,7 @@ test "it can refetch pruned objects" do
%Tesla.Env{
status: 200,
headers: [{"content-type", "application/activity+json"}],
- body: Jason.encode!(object1)
+ body: Jason.encode!(object1 |> Map.put("updated", "2023-05-09 23:44:20Z"))
}
%{
@@ -345,7 +360,7 @@ test "it can refetch pruned objects" do
%Tesla.Env{
status: 200,
headers: [{"content-type", "application/activity+json"}],
- body: Jason.encode!(object2)
+ body: Jason.encode!(object2 |> Map.put("updated", "2023-05-09 23:44:20Z"))
}
%{
@@ -370,7 +385,7 @@ test "it can refetch pruned objects" do
apply(HttpRequestMock, :request, [env])
end)
- %{object1: object1, object2: object2}
+ %{object1: local_object1, object2: local_object2}
end
test "it keeps formerRepresentations if remote does not have this attr", %{object1: object1} do
@@ -388,8 +403,9 @@ test "it keeps formerRepresentations if remote does not have this attr", %{objec
"bcc" => [],
"bto" => [],
"cc" => [],
- "to" => [],
- "summary" => ""
+ "to" => [Pleroma.Constants.as_public()],
+ "summary" => "",
+ "published" => "2023-05-08 23:43:20Z"
}
],
"totalItems" => 1
@@ -467,6 +483,53 @@ test "it adds to formerRepresentations if the remote does not have one and the o
}
} = refetched.data
end
+
+ test "it keeps the history intact if only updated time has changed",
+ %{object1: object1} do
+ full_object1 =
+ object1
+ |> Map.merge(%{
+ "updated" => "2023-05-08 23:43:47Z",
+ "formerRepresentations" => %{
+ "type" => "OrderedCollection",
+ "orderedItems" => [
+ %{"type" => "Note", "content" => "mew mew 1"}
+ ],
+ "totalItems" => 1
+ }
+ })
+
+ {:ok, o} = Object.create(full_object1)
+
+ assert {:ok, refetched} = Fetcher.refetch_object(o)
+
+ assert %{
+ "content" => "test 1",
+ "formerRepresentations" => %{
+ "orderedItems" => [
+ %{"content" => "mew mew 1"}
+ ],
+ "totalItems" => 1
+ }
+ } = refetched.data
+ end
+
+ test "it goes through ObjectValidator and MRF", %{object2: object2} do
+ with_mock Pleroma.Web.ActivityPub.MRF, [:passthrough],
+ filter: fn
+ %{"type" => "Note"} = object ->
+ {:ok, Map.put(object, "content", "MRFd content")}
+
+ arg ->
+ passthrough([arg])
+ end do
+ {:ok, o} = Object.create(object2)
+
+ assert {:ok, refetched} = Fetcher.refetch_object(o)
+
+ assert %{"content" => "MRFd content"} = refetched.data
+ end
+ end
end
describe "fetch with history" do
diff --git a/test/pleroma/object_test.exs b/test/pleroma/object_test.exs
index d536e0b16b..2025d93e4f 100644
--- a/test/pleroma/object_test.exs
+++ b/test/pleroma/object_test.exs
@@ -7,6 +7,7 @@ defmodule Pleroma.ObjectTest do
use Oban.Testing, repo: Pleroma.Repo
import ExUnit.CaptureLog
+ import Mox
import Pleroma.Factory
import Tesla.Mock
@@ -15,10 +16,12 @@ defmodule Pleroma.ObjectTest do
alias Pleroma.Object
alias Pleroma.Repo
alias Pleroma.Tests.ObanHelpers
+ alias Pleroma.UnstubbedConfigMock, as: ConfigMock
alias Pleroma.Web.CommonAPI
setup do
mock(fn env -> apply(HttpRequestMock, :request, [env]) end)
+ ConfigMock |> stub_with(Pleroma.Test.StaticConfig)
:ok
end
@@ -444,4 +447,42 @@ test "Hashtag records are created with Object record and updated on its change"
Enum.sort_by(object.hashtags, & &1.name)
end
end
+
+ describe "get_emoji_reactions/1" do
+ test "3-tuple current format" do
+ object = %Object{
+ data: %{
+ "reactions" => [
+ ["x", ["https://some/user"], "https://some/emoji"]
+ ]
+ }
+ }
+
+ assert Object.get_emoji_reactions(object) == object.data["reactions"]
+ end
+
+ test "2-tuple legacy format" do
+ object = %Object{
+ data: %{
+ "reactions" => [
+ ["x", ["https://some/user"]]
+ ]
+ }
+ }
+
+ assert Object.get_emoji_reactions(object) == [["x", ["https://some/user"], nil]]
+ end
+
+ test "Map format" do
+ object = %Object{
+ data: %{
+ "reactions" => %{
+ "x" => ["https://some/user"]
+ }
+ }
+ }
+
+ assert Object.get_emoji_reactions(object) == [["x", ["https://some/user"], nil]]
+ end
+ end
end
diff --git a/test/pleroma/otp_version_test.exs b/test/pleroma/otp_version_test.exs
index 642cd13108..21701d5a8f 100644
--- a/test/pleroma/otp_version_test.exs
+++ b/test/pleroma/otp_version_test.exs
@@ -28,7 +28,7 @@ test "23.0" do
"23.0"
end
- test "with non existance file" do
+ test "with nonexistent file" do
assert OTPVersion.get_version_from_files([
"test/fixtures/warnings/otp_version/non-exising",
"test/fixtures/warnings/otp_version/22.4"
diff --git a/test/pleroma/repo/migrations/autolinker_to_linkify_test.exs b/test/pleroma/repo/migrations/autolinker_to_linkify_test.exs
index 52a6063685..9847781f03 100644
--- a/test/pleroma/repo/migrations/autolinker_to_linkify_test.exs
+++ b/test/pleroma/repo/migrations/autolinker_to_linkify_test.exs
@@ -29,13 +29,13 @@ test "change/0 converts auto_linker opts for Pleroma.Formatter", %{migration: mi
%{value: new_opts} = ConfigDB.get_by_params(%{group: :pleroma, key: Pleroma.Formatter})
- assert new_opts == [
+ assert Keyword.equal?(new_opts,
class: false,
extra: true,
new_window: false,
rel: "testing",
strip_prefix: false
- ]
+ )
clear_config(Pleroma.Formatter, new_opts)
assert new_opts == Pleroma.Config.get(Pleroma.Formatter)
@@ -67,6 +67,6 @@ test "transform_opts/1 returns a list of compatible opts", %{migration: migratio
strip_prefix: false
]
- assert migration.transform_opts(old_opts) == expected_opts
+ assert Keyword.equal?(migration.transform_opts(old_opts), expected_opts)
end
end
diff --git a/test/pleroma/repo/migrations/fix_malformed_formatter_config_test.exs b/test/pleroma/repo/migrations/fix_malformed_formatter_config_test.exs
index 4c45adb4b3..cf3fe5aacd 100644
--- a/test/pleroma/repo/migrations/fix_malformed_formatter_config_test.exs
+++ b/test/pleroma/repo/migrations/fix_malformed_formatter_config_test.exs
@@ -26,13 +26,13 @@ test "change/0 converts a map into a list", %{migration: migration} do
%{value: new_opts} = ConfigDB.get_by_params(%{group: :pleroma, key: Pleroma.Formatter})
- assert new_opts == [
+ assert Keyword.equal?(new_opts,
class: false,
extra: true,
new_window: false,
rel: "F",
strip_prefix: false
- ]
+ )
clear_config(Pleroma.Formatter, new_opts)
assert new_opts == Pleroma.Config.get(Pleroma.Formatter)
diff --git a/test/pleroma/reverse_proxy_test.exs b/test/pleroma/reverse_proxy_test.exs
index 0bd4db8d16..fb330232ad 100644
--- a/test/pleroma/reverse_proxy_test.exs
+++ b/test/pleroma/reverse_proxy_test.exs
@@ -306,7 +306,7 @@ defp disposition_headers_mock(headers) do
end
describe "response content disposition header" do
- test "not atachment", %{conn: conn} do
+ test "not attachment", %{conn: conn} do
disposition_headers_mock([
{"content-type", "image/gif"},
{"content-length", "0"}
diff --git a/test/pleroma/rule_test.exs b/test/pleroma/rule_test.exs
new file mode 100644
index 0000000000..d710a6312d
--- /dev/null
+++ b/test/pleroma/rule_test.exs
@@ -0,0 +1,57 @@
+# Pleroma: A lightweight social networking server
+# Copyright © 2017-2022 Pleroma Authors
+# SPDX-License-Identifier: AGPL-3.0-only
+
+defmodule Pleroma.RuleTest do
+ use Pleroma.DataCase, async: true
+
+ alias Pleroma.Repo
+ alias Pleroma.Rule
+
+ test "getting a list of rules sorted by priority" do
+ %{id: id1} = Rule.create(%{text: "Example rule"})
+ %{id: id2} = Rule.create(%{text: "Second rule", priority: 2})
+ %{id: id3} = Rule.create(%{text: "Third rule", priority: 1})
+
+ rules =
+ Rule.query()
+ |> Repo.all()
+
+ assert [%{id: ^id1}, %{id: ^id3}, %{id: ^id2}] = rules
+ end
+
+ test "creating rules" do
+ %{id: id} = Rule.create(%{text: "Example rule"})
+
+ assert %{text: "Example rule"} = Rule.get(id)
+ end
+
+ test "editing rules" do
+ %{id: id} = Rule.create(%{text: "Example rule"})
+
+ Rule.update(%{text: "There are no rules", priority: 2}, id)
+
+ assert %{text: "There are no rules", priority: 2} = Rule.get(id)
+ end
+
+ test "deleting rules" do
+ %{id: id} = Rule.create(%{text: "Example rule"})
+
+ Rule.delete(id)
+
+ assert [] =
+ Rule.query()
+ |> Pleroma.Repo.all()
+ end
+
+ test "getting rules by ids" do
+ %{id: id1} = Rule.create(%{text: "Example rule"})
+ %{id: id2} = Rule.create(%{text: "Second rule"})
+ %{id: _id3} = Rule.create(%{text: "Third rule"})
+
+ rules = Rule.get([id1, id2])
+
+ assert Enum.all?(rules, &(&1.id in [id1, id2]))
+ assert length(rules) == 2
+ end
+end
diff --git a/test/pleroma/scheduled_activity_test.exs b/test/pleroma/scheduled_activity_test.exs
index 3a0927d3f9..aaf643cfc5 100644
--- a/test/pleroma/scheduled_activity_test.exs
+++ b/test/pleroma/scheduled_activity_test.exs
@@ -3,19 +3,23 @@
# SPDX-License-Identifier: AGPL-3.0-only
defmodule Pleroma.ScheduledActivityTest do
- use Pleroma.DataCase
+ use Pleroma.DataCase, async: true
alias Pleroma.ScheduledActivity
+ alias Pleroma.Test.StaticConfig
+ alias Pleroma.UnstubbedConfigMock, as: ConfigMock
+ import Mox
import Pleroma.Factory
- setup do: clear_config([ScheduledActivity, :enabled])
-
- setup [:ensure_local_uploader]
-
describe "creation" do
test "scheduled activities with jobs when ScheduledActivity enabled" do
- clear_config([ScheduledActivity, :enabled], true)
+ ConfigMock
+ |> stub(:get, fn
+ [ScheduledActivity, :enabled] -> true
+ path -> StaticConfig.get(path)
+ end)
+
user = insert(:user)
today =
@@ -27,14 +31,18 @@ test "scheduled activities with jobs when ScheduledActivity enabled" do
{:ok, sa1} = ScheduledActivity.create(user, attrs)
{:ok, sa2} = ScheduledActivity.create(user, attrs)
- jobs =
- Repo.all(from(j in Oban.Job, where: j.queue == "scheduled_activities", select: j.args))
+ jobs = Repo.all(from(j in Oban.Job, where: j.queue == "federator_outgoing", select: j.args))
assert jobs == [%{"activity_id" => sa1.id}, %{"activity_id" => sa2.id}]
end
test "scheduled activities without jobs when ScheduledActivity disabled" do
- clear_config([ScheduledActivity, :enabled], false)
+ ConfigMock
+ |> stub(:get, fn
+ [ScheduledActivity, :enabled] -> false
+ path -> StaticConfig.get(path)
+ end)
+
user = insert(:user)
today =
@@ -53,6 +61,9 @@ test "scheduled activities without jobs when ScheduledActivity disabled" do
end
test "when daily user limit is exceeded" do
+ ConfigMock
+ |> stub_with(StaticConfig)
+
user = insert(:user)
today =
@@ -69,6 +80,9 @@ test "when daily user limit is exceeded" do
end
test "when total user limit is exceeded" do
+ ConfigMock
+ |> stub_with(StaticConfig)
+
user = insert(:user)
today =
@@ -89,6 +103,9 @@ test "when total user limit is exceeded" do
end
test "when scheduled_at is earlier than 5 minute from now" do
+ ConfigMock
+ |> stub_with(StaticConfig)
+
user = insert(:user)
scheduled_at =
diff --git a/test/pleroma/activity/search_test.exs b/test/pleroma/search/database_search_test.exs
similarity index 66%
rename from test/pleroma/activity/search_test.exs
rename to test/pleroma/search/database_search_test.exs
index 3b5fd2c3c5..d8dd090639 100644
--- a/test/pleroma/activity/search_test.exs
+++ b/test/pleroma/search/database_search_test.exs
@@ -2,8 +2,8 @@
# Copyright © 2017-2022 Pleroma Authors
# SPDX-License-Identifier: AGPL-3.0-only
-defmodule Pleroma.Activity.SearchTest do
- alias Pleroma.Activity.Search
+defmodule Pleroma.Search.DatabaseSearchTest do
+ alias Pleroma.Search.DatabaseSearch, as: Search
alias Pleroma.Web.CommonAPI
import Pleroma.Factory
@@ -35,21 +35,6 @@ test "it does not find local-only posts for anonymous users" do
assert [] = Search.search(nil, "wednesday")
end
- test "using plainto_tsquery on postgres < 11" do
- old_version = :persistent_term.get({Pleroma.Repo, :postgres_version})
- :persistent_term.put({Pleroma.Repo, :postgres_version}, 10.0)
- on_exit(fn -> :persistent_term.put({Pleroma.Repo, :postgres_version}, old_version) end)
-
- user = insert(:user)
- {:ok, post} = CommonAPI.post(user, %{status: "it's wednesday my dudes"})
- {:ok, _post2} = CommonAPI.post(user, %{status: "it's wednesday my bros"})
-
- # plainto doesn't understand complex queries
- assert [result] = Search.search(nil, "wednesday -dudes")
-
- assert result.id == post.id
- end
-
test "using websearch_to_tsquery" do
user = insert(:user)
{:ok, _post} = CommonAPI.post(user, %{status: "it's wednesday my dudes"})
diff --git a/test/pleroma/search/healthcheck_test.exs b/test/pleroma/search/healthcheck_test.exs
new file mode 100644
index 0000000000..e7649d9495
--- /dev/null
+++ b/test/pleroma/search/healthcheck_test.exs
@@ -0,0 +1,49 @@
+# Pleroma: A lightweight social networking server
+# Copyright © 2017-2024 Pleroma Authors
+# SPDX-License-Identifier: AGPL-3.0-only
+
+defmodule Pleroma.Search.HealthcheckTest do
+ use Pleroma.DataCase
+
+ import Tesla.Mock
+
+ alias Pleroma.Search.Healthcheck
+
+ @good1 "http://good1.example.com/healthz"
+ @good2 "http://good2.example.com/health"
+ @bad "http://bad.example.com/healthy"
+
+ setup do
+ mock(fn
+ %{method: :get, url: @good1} ->
+ %Tesla.Env{
+ status: 200,
+ body: ""
+ }
+
+ %{method: :get, url: @good2} ->
+ %Tesla.Env{
+ status: 200,
+ body: ""
+ }
+
+ %{method: :get, url: @bad} ->
+ %Tesla.Env{
+ status: 503,
+ body: ""
+ }
+ end)
+
+ :ok
+ end
+
+ test "true for 200 responses" do
+ assert Healthcheck.check([@good1])
+ assert Healthcheck.check([@good1, @good2])
+ end
+
+ test "false if any response is not a 200" do
+ refute Healthcheck.check([@bad])
+ refute Healthcheck.check([@good1, @bad])
+ end
+end
diff --git a/test/pleroma/search/meilisearch_test.exs b/test/pleroma/search/meilisearch_test.exs
new file mode 100644
index 0000000000..eea4543232
--- /dev/null
+++ b/test/pleroma/search/meilisearch_test.exs
@@ -0,0 +1,160 @@
+# Pleroma: A lightweight social networking server
+# Copyright © 2017-2021 Pleroma Authors
+# SPDX-License-Identifier: AGPL-3.0-only
+
+defmodule Pleroma.Search.MeilisearchTest do
+ require Pleroma.Constants
+
+ use Pleroma.DataCase, async: true
+ use Oban.Testing, repo: Pleroma.Repo
+
+ import Pleroma.Factory
+ import Tesla.Mock
+ import Mox
+
+ alias Pleroma.Search.Meilisearch
+ alias Pleroma.UnstubbedConfigMock, as: Config
+ alias Pleroma.Web.CommonAPI
+ alias Pleroma.Workers.SearchIndexingWorker
+
+ describe "meilisearch" do
+ test "indexes a local post on creation" do
+ user = insert(:user)
+
+ Tesla.Mock.mock(fn
+ %{
+ method: :put,
+ url: "http://127.0.0.1:7700/indexes/objects/documents",
+ body: body
+ } ->
+ assert match?(
+ [%{"content" => "guys i just don't wanna leave the swamp"}],
+ Jason.decode!(body)
+ )
+
+ # To make sure that the worker is called
+ send(self(), "posted_to_meilisearch")
+
+ %{
+ "enqueuedAt" => "2023-11-12T12:36:46.927517Z",
+ "indexUid" => "objects",
+ "status" => "enqueued",
+ "taskUid" => 6,
+ "type" => "documentAdditionOrUpdate"
+ }
+ |> json()
+ end)
+
+ Config
+ |> expect(:get, 3, fn
+ [Pleroma.Search, :module], nil ->
+ Meilisearch
+
+ [Pleroma.Search.Meilisearch, :url], nil ->
+ "http://127.0.0.1:7700"
+
+ [Pleroma.Search.Meilisearch, :private_key], nil ->
+ "secret"
+ end)
+
+ {:ok, activity} =
+ CommonAPI.post(user, %{
+ status: "guys i just don't wanna leave the swamp",
+ visibility: "public"
+ })
+
+ args = %{"op" => "add_to_index", "activity" => activity.id}
+
+ assert_enqueued(
+ worker: SearchIndexingWorker,
+ args: args
+ )
+
+ assert :ok = perform_job(SearchIndexingWorker, args)
+ assert_received("posted_to_meilisearch")
+ end
+
+ test "doesn't index posts that are not public" do
+ user = insert(:user)
+
+ Enum.each(["private", "direct"], fn visibility ->
+ {:ok, activity} =
+ CommonAPI.post(user, %{
+ status: "guys i just don't wanna leave the swamp",
+ visibility: visibility
+ })
+
+ args = %{"op" => "add_to_index", "activity" => activity.id}
+
+ Config
+ |> expect(:get, fn
+ [Pleroma.Search, :module], nil ->
+ Meilisearch
+ end)
+
+ assert_enqueued(worker: SearchIndexingWorker, args: args)
+ assert :ok = perform_job(SearchIndexingWorker, args)
+ end)
+ end
+
+ test "deletes posts from index when deleted locally" do
+ user = insert(:user)
+
+ Tesla.Mock.mock(fn
+ %{
+ method: :put,
+ url: "http://127.0.0.1:7700/indexes/objects/documents",
+ body: body
+ } ->
+ assert match?(
+ [%{"content" => "guys i just don't wanna leave the swamp"}],
+ Jason.decode!(body)
+ )
+
+ %{
+ "enqueuedAt" => "2023-11-12T12:36:46.927517Z",
+ "indexUid" => "objects",
+ "status" => "enqueued",
+ "taskUid" => 6,
+ "type" => "documentAdditionOrUpdate"
+ }
+ |> json()
+
+ %{method: :delete, url: "http://127.0.0.1:7700/indexes/objects/documents/" <> id} ->
+ send(self(), "called_delete")
+ assert String.length(id) > 1
+ json(%{})
+ end)
+
+ Config
+ |> expect(:get, 6, fn
+ [Pleroma.Search, :module], nil ->
+ Meilisearch
+
+ [Pleroma.Search.Meilisearch, :url], nil ->
+ "http://127.0.0.1:7700"
+
+ [Pleroma.Search.Meilisearch, :private_key], nil ->
+ "secret"
+ end)
+
+ {:ok, activity} =
+ CommonAPI.post(user, %{
+ status: "guys i just don't wanna leave the swamp",
+ visibility: "public"
+ })
+
+ args = %{"op" => "add_to_index", "activity" => activity.id}
+ assert_enqueued(worker: SearchIndexingWorker, args: args)
+ assert :ok = perform_job(SearchIndexingWorker, args)
+
+ {:ok, _} = CommonAPI.delete(activity.id, user)
+
+ delete_args = %{"op" => "remove_from_index", "object" => activity.object.id}
+ assert_enqueued(worker: SearchIndexingWorker, args: delete_args)
+ assert :ok = perform_job(SearchIndexingWorker, delete_args)
+
+ assert_received("called_delete")
+ end
+ end
+end
diff --git a/test/pleroma/search/qdrant_search_test.exs b/test/pleroma/search/qdrant_search_test.exs
new file mode 100644
index 0000000000..47a77a3912
--- /dev/null
+++ b/test/pleroma/search/qdrant_search_test.exs
@@ -0,0 +1,199 @@
+# Pleroma: A lightweight social networking server
+# Copyright © 2017-2021 Pleroma Authors
+# SPDX-License-Identifier: AGPL-3.0-only
+
+defmodule Pleroma.Search.QdrantSearchTest do
+ use Pleroma.DataCase, async: true
+ use Oban.Testing, repo: Pleroma.Repo
+
+ import Pleroma.Factory
+ import Mox
+
+ alias Pleroma.Search.QdrantSearch
+ alias Pleroma.UnstubbedConfigMock, as: Config
+ alias Pleroma.Web.CommonAPI
+ alias Pleroma.Workers.SearchIndexingWorker
+
+ describe "Qdrant search" do
+ test "returns the correct healthcheck endpoints" do
+ # No openai healthcheck URL
+ Config
+ |> expect(:get, 2, fn
+ [Pleroma.Search.QdrantSearch, key], nil ->
+ %{qdrant_url: "https://qdrant.url"}[key]
+ end)
+
+ [health_endpoint] = QdrantSearch.healthcheck_endpoints()
+
+ assert "https://qdrant.url/healthz" == health_endpoint
+
+ # Set openai healthcheck URL
+ Config
+ |> expect(:get, 2, fn
+ [Pleroma.Search.QdrantSearch, key], nil ->
+ %{qdrant_url: "https://qdrant.url", openai_healthcheck_url: "https://openai.url/health"}[
+ key
+ ]
+ end)
+
+ [_, health_endpoint] = QdrantSearch.healthcheck_endpoints()
+
+ assert "https://openai.url/health" == health_endpoint
+ end
+
+ test "searches for a term by encoding it and sending it to qdrant" do
+ user = insert(:user)
+
+ {:ok, activity} =
+ CommonAPI.post(user, %{
+ status: "guys i just don't wanna leave the swamp",
+ visibility: "public"
+ })
+
+ Config
+ |> expect(:get, 3, fn
+ [Pleroma.Search, :module], nil ->
+ QdrantSearch
+
+ [Pleroma.Search.QdrantSearch, key], nil ->
+ %{
+ openai_model: "a_model",
+ openai_url: "https://openai.url",
+ qdrant_url: "https://qdrant.url"
+ }[key]
+ end)
+
+ Tesla.Mock.mock(fn
+ %{url: "https://openai.url/v1/embeddings", method: :post} ->
+ Tesla.Mock.json(%{
+ data: [%{embedding: [1, 2, 3]}]
+ })
+
+ %{url: "https://qdrant.url/collections/posts/points/search", method: :post, body: body} ->
+ data = Jason.decode!(body)
+ refute data["filter"]
+
+ Tesla.Mock.json(%{
+ result: [%{"id" => activity.id |> FlakeId.from_string() |> Ecto.UUID.cast!()}]
+ })
+ end)
+
+ results = QdrantSearch.search(nil, "guys i just don't wanna leave the swamp", %{})
+
+ assert results == [activity]
+ end
+
+ test "for a given actor, ask for only relevant matches" do
+ user = insert(:user)
+
+ {:ok, activity} =
+ CommonAPI.post(user, %{
+ status: "guys i just don't wanna leave the swamp",
+ visibility: "public"
+ })
+
+ Config
+ |> expect(:get, 3, fn
+ [Pleroma.Search, :module], nil ->
+ QdrantSearch
+
+ [Pleroma.Search.QdrantSearch, key], nil ->
+ %{
+ openai_model: "a_model",
+ openai_url: "https://openai.url",
+ qdrant_url: "https://qdrant.url"
+ }[key]
+ end)
+
+ Tesla.Mock.mock(fn
+ %{url: "https://openai.url/v1/embeddings", method: :post} ->
+ Tesla.Mock.json(%{
+ data: [%{embedding: [1, 2, 3]}]
+ })
+
+ %{url: "https://qdrant.url/collections/posts/points/search", method: :post, body: body} ->
+ data = Jason.decode!(body)
+
+ assert data["filter"] == %{
+ "must" => [%{"key" => "actor", "match" => %{"value" => user.ap_id}}]
+ }
+
+ Tesla.Mock.json(%{
+ result: [%{"id" => activity.id |> FlakeId.from_string() |> Ecto.UUID.cast!()}]
+ })
+ end)
+
+ results =
+ QdrantSearch.search(nil, "guys i just don't wanna leave the swamp", %{author: user})
+
+ assert results == [activity]
+ end
+
+ test "indexes a public post on creation, deletes from the index on deletion" do
+ user = insert(:user)
+
+ Tesla.Mock.mock(fn
+ %{method: :post, url: "https://openai.url/v1/embeddings"} ->
+ send(self(), "posted_to_openai")
+
+ Tesla.Mock.json(%{
+ data: [%{embedding: [1, 2, 3]}]
+ })
+
+ %{method: :put, url: "https://qdrant.url/collections/posts/points", body: body} ->
+ send(self(), "posted_to_qdrant")
+
+ data = Jason.decode!(body)
+ %{"points" => [%{"vector" => vector, "payload" => payload}]} = data
+
+ assert vector == [1, 2, 3]
+ assert payload["actor"]
+ assert payload["published_at"]
+
+ Tesla.Mock.json("ok")
+
+ %{method: :post, url: "https://qdrant.url/collections/posts/points/delete"} ->
+ send(self(), "deleted_from_qdrant")
+ Tesla.Mock.json("ok")
+ end)
+
+ Config
+ |> expect(:get, 6, fn
+ [Pleroma.Search, :module], nil ->
+ QdrantSearch
+
+ [Pleroma.Search.QdrantSearch, key], nil ->
+ %{
+ openai_model: "a_model",
+ openai_url: "https://openai.url",
+ qdrant_url: "https://qdrant.url"
+ }[key]
+ end)
+
+ {:ok, activity} =
+ CommonAPI.post(user, %{
+ status: "guys i just don't wanna leave the swamp",
+ visibility: "public"
+ })
+
+ args = %{"op" => "add_to_index", "activity" => activity.id}
+
+ assert_enqueued(
+ worker: SearchIndexingWorker,
+ args: args
+ )
+
+ assert :ok = perform_job(SearchIndexingWorker, args)
+ assert_received("posted_to_openai")
+ assert_received("posted_to_qdrant")
+
+ {:ok, _} = CommonAPI.delete(activity.id, user)
+
+ delete_args = %{"op" => "remove_from_index", "object" => activity.object.id}
+ assert_enqueued(worker: SearchIndexingWorker, args: delete_args)
+ assert :ok = perform_job(SearchIndexingWorker, delete_args)
+
+ assert_received("deleted_from_qdrant")
+ end
+ end
+end
diff --git a/test/pleroma/signature_test.exs b/test/pleroma/signature_test.exs
index 5b9630f956..572d7acc3f 100644
--- a/test/pleroma/signature_test.exs
+++ b/test/pleroma/signature_test.exs
@@ -43,10 +43,7 @@ test "it returns key" do
end
test "it returns error when not found user" do
- assert capture_log(fn ->
- assert Signature.fetch_public_key(make_fake_conn("https://test-ap-id")) ==
- {:error, :error}
- end) =~ "[error] Could not decode user"
+ assert Signature.fetch_public_key(make_fake_conn("https://test-ap-id")) == {:error, :error}
end
test "it returns error if public key is nil" do
@@ -124,7 +121,7 @@ test "it deduces the actor id for gotoSocial" do
test "it calls webfinger for 'acct:' accounts" do
with_mock(Pleroma.Web.WebFinger,
- finger: fn _ -> %{"ap_id" => "https://gensokyo.2hu/users/raymoo"} end
+ finger: fn _ -> {:ok, %{"ap_id" => "https://gensokyo.2hu/users/raymoo"}} end
) do
assert Signature.key_id_to_actor_id("acct:raymoo@gensokyo.2hu") ==
{:ok, "https://gensokyo.2hu/users/raymoo"}
diff --git a/test/pleroma/upload/filter/analyze_metadata_test.exs b/test/pleroma/upload/filter/analyze_metadata_test.exs
index b800a4a434..e4ac673b21 100644
--- a/test/pleroma/upload/filter/analyze_metadata_test.exs
+++ b/test/pleroma/upload/filter/analyze_metadata_test.exs
@@ -20,6 +20,20 @@ test "adds the dimensions and blurhash for images" do
assert meta.blurhash
end
+ test "it blurhashes images with an alpha component" do
+ upload = %Pleroma.Upload{
+ name: "an… image.jpg",
+ content_type: "image/jpeg",
+ path: Path.absname("test/fixtures/png_with_transparency.png"),
+ tempfile: Path.absname("test/fixtures/png_with_transparency.png")
+ }
+
+ {:ok, :filtered, meta} = AnalyzeMetadata.filter(upload)
+
+ assert %{width: 320, height: 320} = meta
+ assert meta.blurhash == "eXJi-E:SwCEm5rCmn$+YWYn+15K#5A$xxCi{SiV]s*W:Efa#s.jE-T"
+ end
+
test "adds the dimensions for videos" do
upload = %Pleroma.Upload{
name: "coolvideo.mp4",
diff --git a/test/pleroma/upload/filter/exiftool/read_description_test.exs b/test/pleroma/upload/filter/exiftool/read_description_test.exs
index 7389fda471..9a1bd61d78 100644
--- a/test/pleroma/upload/filter/exiftool/read_description_test.exs
+++ b/test/pleroma/upload/filter/exiftool/read_description_test.exs
@@ -3,7 +3,7 @@
# SPDX-License-Identifier: AGPL-3.0-only
defmodule Pleroma.Upload.Filter.Exiftool.ReadDescriptionTest do
- use Pleroma.DataCase, async: true
+ use Pleroma.DataCase
alias Pleroma.Upload.Filter
@uploads %Pleroma.Upload{
@@ -42,6 +42,33 @@ test "otherwise returns ImageDescription when present" do
{:ok, :filtered, uploads_after}
end
+ test "Ignores warnings" do
+ uploads = %Pleroma.Upload{
+ name: "image_with_imagedescription_and_caption-abstract_and_stray_data_after.png",
+ content_type: "image/png",
+ path:
+ Path.absname(
+ "test/fixtures/image_with_imagedescription_and_caption-abstract_and_stray_data_after.png"
+ ),
+ tempfile:
+ Path.absname(
+ "test/fixtures/image_with_imagedescription_and_caption-abstract_and_stray_data_after.png"
+ )
+ }
+
+ assert {:ok, :filtered, %{description: "a descriptive white pixel"}} =
+ Filter.Exiftool.ReadDescription.filter(uploads)
+
+ uploads = %Pleroma.Upload{
+ name: "image_with_stray_data_after.png",
+ content_type: "image/png",
+ path: Path.absname("test/fixtures/image_with_stray_data_after.png"),
+ tempfile: Path.absname("test/fixtures/image_with_stray_data_after.png")
+ }
+
+ assert {:ok, :filtered, %{description: nil}} = Filter.Exiftool.ReadDescription.filter(uploads)
+ end
+
test "otherwise returns iptc:Caption-Abstract when present" do
upload = %Pleroma.Upload{
name: "image_with_caption-abstract.jpg",
diff --git a/test/pleroma/upload/filter/exiftool/strip_location_test.exs b/test/pleroma/upload/filter/exiftool/strip_location_test.exs
index 7e1541f60b..bcb5f3f602 100644
--- a/test/pleroma/upload/filter/exiftool/strip_location_test.exs
+++ b/test/pleroma/upload/filter/exiftool/strip_location_test.exs
@@ -31,12 +31,19 @@ test "apply exiftool filter" do
refute String.match?(exif_filtered, ~r/GPS/)
end
- test "verify webp files are skipped" do
- upload = %Pleroma.Upload{
- name: "sample.webp",
- content_type: "image/webp"
- }
+ test "verify webp, heic, svg files are skipped" do
+ uploads =
+ ~w{webp heic svg svg+xml}
+ |> Enum.map(fn type ->
+ %Pleroma.Upload{
+ name: "sample.#{type}",
+ content_type: "image/#{type}"
+ }
+ end)
- assert Filter.Exiftool.StripLocation.filter(upload) == {:ok, :noop}
+ uploads
+ |> Enum.each(fn upload ->
+ assert Filter.Exiftool.StripLocation.filter(upload) == {:ok, :noop}
+ end)
end
end
diff --git a/test/pleroma/upload/filter/only_media_test.exs b/test/pleroma/upload/filter/only_media_test.exs
new file mode 100644
index 0000000000..75be070a19
--- /dev/null
+++ b/test/pleroma/upload/filter/only_media_test.exs
@@ -0,0 +1,32 @@
+# Pleroma: A lightweight social networking server
+# Copyright © 2017-2023 Pleroma Authors
+# SPDX-License-Identifier: AGPL-3.0-only
+
+defmodule Pleroma.Upload.Filter.OnlyMediaTest do
+ use Pleroma.DataCase, async: true
+
+ alias Pleroma.Upload
+ alias Pleroma.Upload.Filter.OnlyMedia
+
+ test "Allows media Content-Type" do
+ ["audio/mpeg", "image/jpeg", "video/mp4"]
+ |> Enum.each(fn type ->
+ upload = %Upload{
+ content_type: type
+ }
+
+ assert {:ok, :noop} = OnlyMedia.filter(upload)
+ end)
+ end
+
+ test "Disallows non-media Content-Type" do
+ ["application/javascript", "application/pdf", "text/html"]
+ |> Enum.each(fn type ->
+ upload = %Upload{
+ content_type: type
+ }
+
+ assert {:error, _} = OnlyMedia.filter(upload)
+ end)
+ end
+end
diff --git a/test/pleroma/upload_test.exs b/test/pleroma/upload_test.exs
index 6584c2def4..facb634c3f 100644
--- a/test/pleroma/upload_test.exs
+++ b/test/pleroma/upload_test.exs
@@ -6,10 +6,19 @@ defmodule Pleroma.UploadTest do
use Pleroma.DataCase
import ExUnit.CaptureLog
+ import Mox
+ alias Pleroma.UnstubbedConfigMock, as: ConfigMock
alias Pleroma.Upload
alias Pleroma.Uploaders.Uploader
+ setup do
+ ConfigMock
+ |> stub_with(Pleroma.Test.StaticConfig)
+
+ :ok
+ end
+
@upload_file %Plug.Upload{
content_type: "image/jpeg",
path: Path.absname("test/fixtures/image_tmp.jpg"),
@@ -236,6 +245,8 @@ test "escapes reserved uri characters" do
describe "Setting a custom base_url for uploaded media" do
setup do: clear_config([Pleroma.Upload, :base_url], "https://cache.pleroma.social")
+ # This seems to be backwards. Skipped for that reason
+ @tag skip: true
test "returns a media url with configured base_url" do
base_url = Pleroma.Config.get([Pleroma.Upload, :base_url])
diff --git a/test/pleroma/uploaders/ipfs_test.exs b/test/pleroma/uploaders/ipfs_test.exs
new file mode 100644
index 0000000000..cf325b54f2
--- /dev/null
+++ b/test/pleroma/uploaders/ipfs_test.exs
@@ -0,0 +1,158 @@
+# Pleroma: A lightweight social networking server
+# Copyright © 2017-2022 Pleroma Authors
+# SPDX-License-Identifier: AGPL-3.0-only
+
+defmodule Pleroma.Uploaders.IPFSTest do
+ use Pleroma.DataCase
+
+ alias Pleroma.Uploaders.IPFS
+ alias Tesla.Multipart
+
+ import ExUnit.CaptureLog
+ import Mock
+ import Mox
+
+ alias Pleroma.UnstubbedConfigMock, as: Config
+
+ describe "get_final_url" do
+ setup do
+ Config
+ |> expect(:get, fn [Pleroma.Uploaders.IPFS] ->
+ [post_gateway_url: "http://localhost:5001"]
+ end)
+
+ :ok
+ end
+
+ test "it returns the final url for put_file" do
+ assert IPFS.put_file_endpoint() == "http://localhost:5001/api/v0/add"
+ end
+
+ test "it returns the final url for delete_file" do
+ assert IPFS.delete_file_endpoint() == "http://localhost:5001/api/v0/files/rm"
+ end
+ end
+
+ describe "get_file/1" do
+ setup do
+ Config
+ |> expect(:get, fn [Pleroma.Upload, :uploader] -> Pleroma.Uploaders.IPFS end)
+ |> expect(:get, fn [Pleroma.Upload, :base_url] -> nil end)
+ |> expect(:get, fn [Pleroma.Uploaders.IPFS, :public_endpoint] -> nil end)
+
+ :ok
+ end
+
+ test "it returns path to ipfs file with cid as subdomain" do
+ Config
+ |> expect(:get, fn [Pleroma.Uploaders.IPFS, :get_gateway_url] ->
+ "https://{CID}.ipfs.mydomain.com"
+ end)
+
+ assert IPFS.get_file("testcid") == {
+ :ok,
+ {:url, "https://testcid.ipfs.mydomain.com"}
+ }
+ end
+
+ test "it returns path to ipfs file with cid as path" do
+ Config
+ |> expect(:get, fn [Pleroma.Uploaders.IPFS, :get_gateway_url] ->
+ "https://ipfs.mydomain.com/ipfs/{CID}"
+ end)
+
+ assert IPFS.get_file("testcid") == {
+ :ok,
+ {:url, "https://ipfs.mydomain.com/ipfs/testcid"}
+ }
+ end
+ end
+
+ describe "put_file/1" do
+ setup do
+ Config
+ |> expect(:get, fn [Pleroma.Uploaders.IPFS] ->
+ [post_gateway_url: "http://localhost:5001"]
+ end)
+
+ file_upload = %Pleroma.Upload{
+ name: "image-tet.jpg",
+ content_type: "image/jpeg",
+ path: "test_folder/image-tet.jpg",
+ tempfile: Path.absname("test/instance_static/add/shortcode.png")
+ }
+
+ mp =
+ Multipart.new()
+ |> Multipart.add_content_type_param("charset=utf-8")
+ |> Multipart.add_file(file_upload.tempfile)
+
+ [file_upload: file_upload, mp: mp]
+ end
+
+ test "save file", %{file_upload: file_upload} do
+ with_mock Pleroma.HTTP,
+ post: fn "http://localhost:5001/api/v0/add", _mp, [], params: ["cid-version": "1"] ->
+ {:ok,
+ %Tesla.Env{
+ status: 200,
+ body:
+ "{\"Name\":\"image-tet.jpg\",\"Size\":\"5000\", \"Hash\":\"bafybeicrh7ltzx52yxcwrvxxckfmwhqdgsb6qym6dxqm2a4ymsakeshwoi\"}"
+ }}
+ end do
+ assert IPFS.put_file(file_upload) ==
+ {:ok, {:file, "bafybeicrh7ltzx52yxcwrvxxckfmwhqdgsb6qym6dxqm2a4ymsakeshwoi"}}
+ end
+ end
+
+ test "returns error", %{file_upload: file_upload} do
+ with_mock Pleroma.HTTP,
+ post: fn "http://localhost:5001/api/v0/add", _mp, [], params: ["cid-version": "1"] ->
+ {:error, "IPFS Gateway upload failed"}
+ end do
+ assert capture_log(fn ->
+ assert IPFS.put_file(file_upload) == {:error, "IPFS Gateway upload failed"}
+ end) =~ "Elixir.Pleroma.Uploaders.IPFS: {:error, \"IPFS Gateway upload failed\"}"
+ end
+ end
+
+ test "returns error if JSON decode fails", %{file_upload: file_upload} do
+ with_mock Pleroma.HTTP, [],
+ post: fn "http://localhost:5001/api/v0/add", _mp, [], params: ["cid-version": "1"] ->
+ {:ok, %Tesla.Env{status: 200, body: "invalid"}}
+ end do
+ assert capture_log(fn ->
+ assert IPFS.put_file(file_upload) == {:error, "JSON decode failed"}
+ end) =~
+ "Elixir.Pleroma.Uploaders.IPFS: {:error, %Jason.DecodeError"
+ end
+ end
+
+ test "returns error if JSON body doesn't contain Hash key", %{file_upload: file_upload} do
+ with_mock Pleroma.HTTP, [],
+ post: fn "http://localhost:5001/api/v0/add", _mp, [], params: ["cid-version": "1"] ->
+ {:ok, %Tesla.Env{status: 200, body: "{\"key\": \"value\"}"}}
+ end do
+ assert IPFS.put_file(file_upload) == {:error, "JSON doesn't contain Hash key"}
+ end
+ end
+ end
+
+ describe "delete_file/1" do
+ setup do
+ Config
+ |> expect(:get, fn [Pleroma.Uploaders.IPFS] ->
+ [post_gateway_url: "http://localhost:5001"]
+ end)
+
+ :ok
+ end
+
+ test_with_mock "deletes file", Pleroma.HTTP,
+ post: fn "http://localhost:5001/api/v0/files/rm", "", [], params: [arg: "image.jpg"] ->
+ {:ok, %{status: 204}}
+ end do
+ assert :ok = IPFS.delete_file("image.jpg")
+ end
+ end
+end
diff --git a/test/pleroma/uploaders/s3_test.exs b/test/pleroma/uploaders/s3_test.exs
index d870449b17..b8df0e65a2 100644
--- a/test/pleroma/uploaders/s3_test.exs
+++ b/test/pleroma/uploaders/s3_test.exs
@@ -3,22 +3,27 @@
# SPDX-License-Identifier: AGPL-3.0-only
defmodule Pleroma.Uploaders.S3Test do
- use Pleroma.DataCase
+ use Pleroma.DataCase, async: true
+ alias Pleroma.UnstubbedConfigMock, as: ConfigMock
alias Pleroma.Uploaders.S3
+ alias Pleroma.Uploaders.S3.ExAwsMock
- import Mock
+ import Mox
import ExUnit.CaptureLog
- setup do
- clear_config([Pleroma.Upload, :uploader], Pleroma.Uploaders.S3)
- clear_config([Pleroma.Upload, :base_url], "https://s3.amazonaws.com")
- clear_config([Pleroma.Uploaders.S3])
- clear_config([Pleroma.Uploaders.S3, :bucket], "test_bucket")
- end
-
describe "get_file/1" do
- test "it returns path to local folder for files" do
+ test "it returns url for files" do
+ ConfigMock
+ |> expect(:get, 6, fn key ->
+ [
+ {Pleroma.Upload,
+ [uploader: Pleroma.Uploaders.S3, base_url: "https://s3.amazonaws.com"]},
+ {Pleroma.Uploaders.S3, [bucket: "test_bucket"]}
+ ]
+ |> get_in(key)
+ end)
+
assert S3.get_file("test_image.jpg") == {
:ok,
{:url, "https://s3.amazonaws.com/test_bucket/test_image.jpg"}
@@ -26,13 +31,16 @@ test "it returns path to local folder for files" do
end
test "it returns path without bucket when truncated_namespace set to ''" do
- clear_config([Pleroma.Uploaders.S3],
- bucket: "test_bucket",
- bucket_namespace: "myaccount",
- truncated_namespace: ""
- )
-
- clear_config([Pleroma.Upload, :base_url], "https://s3.amazonaws.com")
+ ConfigMock
+ |> expect(:get, 6, fn key ->
+ [
+ {Pleroma.Upload,
+ [uploader: Pleroma.Uploaders.S3, base_url: "https://s3.amazonaws.com"]},
+ {Pleroma.Uploaders.S3,
+ [bucket: "test_bucket", truncated_namespace: "", bucket_namespace: "myaccount"]}
+ ]
+ |> get_in(key)
+ end)
assert S3.get_file("test_image.jpg") == {
:ok,
@@ -41,10 +49,15 @@ test "it returns path without bucket when truncated_namespace set to ''" do
end
test "it returns path with bucket namespace when namespace is set" do
- clear_config([Pleroma.Uploaders.S3],
- bucket: "test_bucket",
- bucket_namespace: "family"
- )
+ ConfigMock
+ |> expect(:get, 6, fn key ->
+ [
+ {Pleroma.Upload,
+ [uploader: Pleroma.Uploaders.S3, base_url: "https://s3.amazonaws.com"]},
+ {Pleroma.Uploaders.S3, [bucket: "test_bucket", bucket_namespace: "family"]}
+ ]
+ |> get_in(key)
+ end)
assert S3.get_file("test_image.jpg") == {
:ok,
@@ -62,28 +75,42 @@ test "it returns path with bucket namespace when namespace is set" do
tempfile: Path.absname("test/instance_static/add/shortcode.png")
}
+ ConfigMock
+ |> expect(:get, fn [Pleroma.Uploaders.S3] ->
+ [
+ bucket: "test_bucket"
+ ]
+ end)
+
[file_upload: file_upload]
end
test "save file", %{file_upload: file_upload} do
- with_mock ExAws, request: fn _ -> {:ok, :ok} end do
- assert S3.put_file(file_upload) == {:ok, {:file, "test_folder/image-tet.jpg"}}
- end
+ ExAwsMock
+ |> expect(:request, fn _req -> {:ok, %{status_code: 200}} end)
+
+ assert S3.put_file(file_upload) == {:ok, {:file, "test_folder/image-tet.jpg"}}
end
test "returns error", %{file_upload: file_upload} do
- with_mock ExAws, request: fn _ -> {:error, "S3 Upload failed"} end do
- assert capture_log(fn ->
- assert S3.put_file(file_upload) == {:error, "S3 Upload failed"}
- end) =~ "Elixir.Pleroma.Uploaders.S3: {:error, \"S3 Upload failed\"}"
- end
+ ExAwsMock
+ |> expect(:request, fn _req -> {:error, "S3 Upload failed"} end)
+
+ assert capture_log(fn ->
+ assert S3.put_file(file_upload) == {:error, "S3 Upload failed"}
+ end) =~ "Elixir.Pleroma.Uploaders.S3: {:error, \"S3 Upload failed\"}"
end
end
describe "delete_file/1" do
- test_with_mock "deletes file", ExAws, request: fn _req -> {:ok, %{status_code: 204}} end do
+ test "deletes file" do
+ ExAwsMock
+ |> expect(:request, fn _req -> {:ok, %{status_code: 204}} end)
+
+ ConfigMock
+ |> expect(:get, fn [Pleroma.Uploaders.S3, :bucket] -> "test_bucket" end)
+
assert :ok = S3.delete_file("image.jpg")
- assert_called(ExAws.request(:_))
end
end
end
diff --git a/test/pleroma/user/backup_async_test.exs b/test/pleroma/user/backup_async_test.exs
new file mode 100644
index 0000000000..76716d6847
--- /dev/null
+++ b/test/pleroma/user/backup_async_test.exs
@@ -0,0 +1,51 @@
+# Pleroma: A lightweight social networking server
+# Copyright © 2017-2023 Pleroma Authors
+# SPDX-License-Identifier: AGPL-3.0-only
+
+defmodule Pleroma.User.BackupAsyncTest do
+ use Pleroma.DataCase, async: true
+
+ import Pleroma.Factory
+ import Mox
+
+ alias Pleroma.UnstubbedConfigMock, as: ConfigMock
+ alias Pleroma.User.Backup
+ alias Pleroma.User.Backup.ProcessorMock
+
+ setup do
+ user = insert(:user, %{nickname: "cofe", name: "Cofe", ap_id: "http://cofe.io/users/cofe"})
+
+ {:ok, backup} = user |> Backup.new() |> Repo.insert()
+ %{backup: backup}
+ end
+
+ @tag capture_log: true
+ test "it handles unrecoverable exceptions", %{backup: backup} do
+ ProcessorMock
+ |> expect(:do_process, fn _, _ ->
+ raise "mock exception"
+ end)
+
+ ConfigMock
+ |> stub_with(Pleroma.Config)
+
+ {:error, %{backup: backup, reason: :exit}} = Backup.process(backup, ProcessorMock)
+
+ assert backup.state == :failed
+ end
+
+ @tag capture_log: true
+ test "it handles timeouts", %{backup: backup} do
+ ProcessorMock
+ |> expect(:do_process, fn _, _ ->
+ Process.sleep(:timer.seconds(4))
+ end)
+
+ ConfigMock
+ |> expect(:get, fn [Pleroma.User.Backup, :process_wait_time] -> :timer.seconds(2) end)
+
+ {:error, %{backup: backup, reason: :timeout}} = Backup.process(backup, ProcessorMock)
+
+ assert backup.state == :failed
+ end
+end
diff --git a/test/pleroma/user/backup_test.exs b/test/pleroma/user/backup_test.exs
index 5c9b940007..5503d15bca 100644
--- a/test/pleroma/user/backup_test.exs
+++ b/test/pleroma/user/backup_test.exs
@@ -9,10 +9,14 @@ defmodule Pleroma.User.BackupTest do
import Mock
import Pleroma.Factory
import Swoosh.TestAssertions
+ import Mox
alias Pleroma.Bookmark
alias Pleroma.Tests.ObanHelpers
+ alias Pleroma.UnstubbedConfigMock, as: ConfigMock
+ alias Pleroma.Uploaders.S3.ExAwsMock
alias Pleroma.User.Backup
+ alias Pleroma.User.Backup.ProcessorMock
alias Pleroma.Web.CommonAPI
alias Pleroma.Workers.BackupWorker
@@ -20,6 +24,14 @@ defmodule Pleroma.User.BackupTest do
clear_config([Pleroma.Upload, :uploader])
clear_config([Backup, :limit_days])
clear_config([Pleroma.Emails.Mailer, :enabled], true)
+
+ ConfigMock
+ |> stub_with(Pleroma.Config)
+
+ ProcessorMock
+ |> stub_with(Pleroma.User.Backup.Processor)
+
+ :ok
end
test "it does not requrie enabled email" do
@@ -39,7 +51,7 @@ test "it creates a backup record and an Oban job" do
assert_enqueued(worker: BackupWorker, args: args)
backup = Backup.get(args["backup_id"])
- assert %Backup{user_id: ^user_id, processed: false, file_size: 0} = backup
+ assert %Backup{user_id: ^user_id, processed: false, file_size: 0, state: :pending} = backup
end
test "it return an error if the export limit is over" do
@@ -59,7 +71,30 @@ test "it process a backup record" do
assert {:ok, %Oban.Job{args: %{"backup_id" => backup_id} = args}} = Backup.create(user)
assert {:ok, backup} = perform_job(BackupWorker, args)
assert backup.file_size > 0
- assert %Backup{id: ^backup_id, processed: true, user_id: ^user_id} = backup
+ assert %Backup{id: ^backup_id, processed: true, user_id: ^user_id, state: :complete} = backup
+
+ delete_job_args = %{"op" => "delete", "backup_id" => backup_id}
+
+ assert_enqueued(worker: BackupWorker, args: delete_job_args)
+ assert {:ok, backup} = perform_job(BackupWorker, delete_job_args)
+ refute Backup.get(backup_id)
+
+ email = Pleroma.Emails.UserEmail.backup_is_ready_email(backup)
+
+ assert_email_sent(
+ to: {user.name, user.email},
+ html_body: email.html_body
+ )
+ end
+
+ test "it updates states of the backup" do
+ clear_config([Pleroma.Upload, :uploader], Pleroma.Uploaders.Local)
+ %{id: user_id} = user = insert(:user)
+
+ assert {:ok, %Oban.Job{args: %{"backup_id" => backup_id} = args}} = Backup.create(user)
+ assert {:ok, backup} = perform_job(BackupWorker, args)
+ assert backup.file_size > 0
+ assert %Backup{id: ^backup_id, processed: true, user_id: ^user_id, state: :complete} = backup
delete_job_args = %{"op" => "delete", "backup_id" => backup_id}
@@ -131,6 +166,7 @@ test "it removes outdated backups after creating a fresh one" do
test "it creates a zip archive with user data" do
user = insert(:user, %{nickname: "cofe", name: "Cofe", ap_id: "http://cofe.io/users/cofe"})
+ %{ap_id: other_ap_id} = other_user = insert(:user)
{:ok, %{object: %{data: %{"id" => id1}}} = status1} =
CommonAPI.post(user, %{status: "status1"})
@@ -147,8 +183,10 @@ test "it creates a zip archive with user data" do
Bookmark.create(user.id, status2.id)
Bookmark.create(user.id, status3.id)
+ CommonAPI.follow(user, other_user)
+
assert {:ok, backup} = user |> Backup.new() |> Repo.insert()
- assert {:ok, path} = Backup.export(backup)
+ assert {:ok, path} = Backup.export(backup, self())
assert {:ok, zipfile} = :zip.zip_open(String.to_charlist(path), [:memory])
assert {:ok, {'actor.json', json}} = :zip.zip_get('actor.json', zipfile)
@@ -226,10 +264,69 @@ test "it creates a zip archive with user data" do
"type" => "OrderedCollection"
} = Jason.decode!(json)
+ assert {:ok, {'following.json', json}} = :zip.zip_get('following.json', zipfile)
+
+ assert %{
+ "@context" => "https://www.w3.org/ns/activitystreams",
+ "id" => "following.json",
+ "orderedItems" => [^other_ap_id],
+ "totalItems" => 1,
+ "type" => "OrderedCollection"
+ } = Jason.decode!(json)
+
:zip.zip_close(zipfile)
File.rm!(path)
end
+ test "it counts the correct number processed" do
+ user = insert(:user, %{nickname: "cofe", name: "Cofe", ap_id: "http://cofe.io/users/cofe"})
+
+ Enum.map(1..120, fn i ->
+ {:ok, status} = CommonAPI.post(user, %{status: "status #{i}"})
+ CommonAPI.favorite(user, status.id)
+ Bookmark.create(user.id, status.id)
+ end)
+
+ assert {:ok, backup} = user |> Backup.new() |> Repo.insert()
+ {:ok, backup} = Backup.process(backup)
+
+ assert backup.processed_number == 1 + 120 + 120 + 120
+
+ Backup.delete(backup)
+ end
+
+ test "it handles errors" do
+ user = insert(:user, %{nickname: "cofe", name: "Cofe", ap_id: "http://cofe.io/users/cofe"})
+
+ Enum.map(1..120, fn i ->
+ {:ok, _status} = CommonAPI.post(user, %{status: "status #{i}"})
+ end)
+
+ assert {:ok, backup} = user |> Backup.new() |> Repo.insert()
+
+ with_mock Pleroma.Web.ActivityPub.Transmogrifier,
+ [:passthrough],
+ prepare_outgoing: fn data ->
+ object =
+ data["object"]
+ |> Pleroma.Object.normalize(fetch: false)
+ |> Map.get(:data)
+
+ data = data |> Map.put("object", object)
+
+ if String.contains?(data["object"]["content"], "119"),
+ do: raise(%Postgrex.Error{}),
+ else: {:ok, data}
+ end do
+ {:ok, backup} = Backup.process(backup)
+ assert backup.processed
+ assert backup.state == :complete
+ assert backup.processed_number == 1 + 119
+
+ Backup.delete(backup)
+ end
+ end
+
describe "it uploads and deletes a backup archive" do
setup do
clear_config([Pleroma.Upload, :base_url], "https://s3.amazonaws.com")
@@ -246,7 +343,7 @@ test "it creates a zip archive with user data" do
Bookmark.create(user.id, status3.id)
assert {:ok, backup} = user |> Backup.new() |> Repo.insert()
- assert {:ok, path} = Backup.export(backup)
+ assert {:ok, path} = Backup.export(backup, self())
[path: path, backup: backup]
end
@@ -255,14 +352,14 @@ test "S3", %{path: path, backup: backup} do
clear_config([Pleroma.Upload, :uploader], Pleroma.Uploaders.S3)
clear_config([Pleroma.Uploaders.S3, :streaming_enabled], false)
- with_mock ExAws,
- request: fn
- %{http_method: :put} -> {:ok, :ok}
- %{http_method: :delete} -> {:ok, %{status_code: 204}}
- end do
- assert {:ok, %Pleroma.Upload{}} = Backup.upload(backup, path)
- assert {:ok, _backup} = Backup.delete(backup)
- end
+ ExAwsMock
+ |> expect(:request, 2, fn
+ %{http_method: :put} -> {:ok, :ok}
+ %{http_method: :delete} -> {:ok, %{status_code: 204}}
+ end)
+
+ assert {:ok, %Pleroma.Upload{}} = Backup.upload(backup, path)
+ assert {:ok, _backup} = Backup.delete(backup)
end
test "Local", %{path: path, backup: backup} do
diff --git a/test/pleroma/user/import_test.exs b/test/pleroma/user/import_test.exs
index b4efd4bb05..f75305e0e5 100644
--- a/test/pleroma/user/import_test.exs
+++ b/test/pleroma/user/import_test.exs
@@ -3,7 +3,6 @@
# SPDX-License-Identifier: AGPL-3.0-only
defmodule Pleroma.User.ImportTest do
- alias Pleroma.Repo
alias Pleroma.Tests.ObanHelpers
alias Pleroma.User
diff --git a/test/pleroma/user_search_test.exs b/test/pleroma/user_search_test.exs
index 1deab6888b..1af9a1493c 100644
--- a/test/pleroma/user_search_test.exs
+++ b/test/pleroma/user_search_test.exs
@@ -3,7 +3,6 @@
# SPDX-License-Identifier: AGPL-3.0-only
defmodule Pleroma.UserSearchTest do
- alias Pleroma.Repo
alias Pleroma.User
use Pleroma.DataCase
diff --git a/test/pleroma/user_test.exs b/test/pleroma/user_test.exs
index c16312a658..5b7a656581 100644
--- a/test/pleroma/user_test.exs
+++ b/test/pleroma/user_test.exs
@@ -19,6 +19,11 @@ defmodule Pleroma.UserTest do
import ExUnit.CaptureLog
import Swoosh.TestAssertions
+ setup do
+ Mox.stub_with(Pleroma.UnstubbedConfigMock, Pleroma.Config)
+ :ok
+ end
+
setup_all do
Tesla.Mock.mock_global(fn env -> apply(HttpRequestMock, :request, [env]) end)
:ok
@@ -221,7 +226,7 @@ test "clears follow requests when requester is blocked" do
assert [] = User.get_follow_requests(followed)
end
- test "follow_all follows mutliple users" do
+ test "follow_all follows multiple users" do
user = insert(:user)
followed_zero = insert(:user)
followed_one = insert(:user)
@@ -245,7 +250,7 @@ test "follow_all follows mutliple users" do
refute User.following?(user, reverse_blocked)
end
- test "follow_all follows mutliple users without duplicating" do
+ test "follow_all follows multiple users without duplicating" do
user = insert(:user)
followed_zero = insert(:user)
followed_one = insert(:user)
@@ -868,113 +873,23 @@ test "gets an existing user by nickname starting with http" do
end
end
- describe "get_or_fetch/1 remote users with tld, while BE is runned on subdomain" do
+ describe "get_or_fetch/1 remote users with tld, while BE is running on a subdomain" do
setup do: clear_config([Pleroma.Web.WebFinger, :update_nickname_on_user_fetch], true)
test "for mastodon" do
- Tesla.Mock.mock(fn
- %{url: "https://example.com/.well-known/host-meta"} ->
- %Tesla.Env{
- status: 302,
- headers: [{"location", "https://sub.example.com/.well-known/host-meta"}]
- }
-
- %{url: "https://sub.example.com/.well-known/host-meta"} ->
- %Tesla.Env{
- status: 200,
- body:
- "test/fixtures/webfinger/masto-host-meta.xml"
- |> File.read!()
- |> String.replace("{{domain}}", "sub.example.com")
- }
-
- %{url: "https://sub.example.com/.well-known/webfinger?resource=acct:a@example.com"} ->
- %Tesla.Env{
- status: 200,
- body:
- "test/fixtures/webfinger/masto-webfinger.json"
- |> File.read!()
- |> String.replace("{{nickname}}", "a")
- |> String.replace("{{domain}}", "example.com")
- |> String.replace("{{subdomain}}", "sub.example.com"),
- headers: [{"content-type", "application/jrd+json"}]
- }
-
- %{url: "https://sub.example.com/users/a"} ->
- %Tesla.Env{
- status: 200,
- body:
- "test/fixtures/webfinger/masto-user.json"
- |> File.read!()
- |> String.replace("{{nickname}}", "a")
- |> String.replace("{{domain}}", "sub.example.com"),
- headers: [{"content-type", "application/activity+json"}]
- }
-
- %{url: "https://sub.example.com/users/a/collections/featured"} ->
- %Tesla.Env{
- status: 200,
- body:
- File.read!("test/fixtures/users_mock/masto_featured.json")
- |> String.replace("{{domain}}", "sub.example.com")
- |> String.replace("{{nickname}}", "a"),
- headers: [{"content-type", "application/activity+json"}]
- }
- end)
-
- ap_id = "a@example.com"
+ ap_id = "a@mastodon.example"
{:ok, fetched_user} = User.get_or_fetch(ap_id)
- assert fetched_user.ap_id == "https://sub.example.com/users/a"
- assert fetched_user.nickname == "a@example.com"
+ assert fetched_user.ap_id == "https://sub.mastodon.example/users/a"
+ assert fetched_user.nickname == "a@mastodon.example"
end
test "for pleroma" do
- Tesla.Mock.mock(fn
- %{url: "https://example.com/.well-known/host-meta"} ->
- %Tesla.Env{
- status: 302,
- headers: [{"location", "https://sub.example.com/.well-known/host-meta"}]
- }
-
- %{url: "https://sub.example.com/.well-known/host-meta"} ->
- %Tesla.Env{
- status: 200,
- body:
- "test/fixtures/webfinger/pleroma-host-meta.xml"
- |> File.read!()
- |> String.replace("{{domain}}", "sub.example.com")
- }
-
- %{url: "https://sub.example.com/.well-known/webfinger?resource=acct:a@example.com"} ->
- %Tesla.Env{
- status: 200,
- body:
- "test/fixtures/webfinger/pleroma-webfinger.json"
- |> File.read!()
- |> String.replace("{{nickname}}", "a")
- |> String.replace("{{domain}}", "example.com")
- |> String.replace("{{subdomain}}", "sub.example.com"),
- headers: [{"content-type", "application/jrd+json"}]
- }
-
- %{url: "https://sub.example.com/users/a"} ->
- %Tesla.Env{
- status: 200,
- body:
- "test/fixtures/webfinger/pleroma-user.json"
- |> File.read!()
- |> String.replace("{{nickname}}", "a")
- |> String.replace("{{domain}}", "sub.example.com"),
- headers: [{"content-type", "application/activity+json"}]
- }
- end)
-
- ap_id = "a@example.com"
+ ap_id = "a@pleroma.example"
{:ok, fetched_user} = User.get_or_fetch(ap_id)
- assert fetched_user.ap_id == "https://sub.example.com/users/a"
- assert fetched_user.nickname == "a@example.com"
+ assert fetched_user.ap_id == "https://sub.pleroma.example/users/a"
+ assert fetched_user.nickname == "a@pleroma.example"
end
end
@@ -1013,13 +928,13 @@ test "gets an existing user by fully qualified nickname, case insensitive" do
@tag capture_log: true
test "returns nil if no user could be fetched" do
- {:error, fetched_user} = User.get_or_fetch_by_nickname("nonexistant@social.heldscal.la")
- assert fetched_user == "not found nonexistant@social.heldscal.la"
+ {:error, fetched_user} = User.get_or_fetch_by_nickname("nonexistent@social.heldscal.la")
+ assert fetched_user == "not found nonexistent@social.heldscal.la"
end
- test "returns nil for nonexistant local user" do
- {:error, fetched_user} = User.get_or_fetch_by_nickname("nonexistant")
- assert fetched_user == "not found nonexistant"
+ test "returns nil for nonexistent local user" do
+ {:error, fetched_user} = User.get_or_fetch_by_nickname("nonexistent")
+ assert fetched_user == "not found nonexistent"
end
test "updates an existing user, if stale" do
@@ -1127,7 +1042,7 @@ test "it confirms validity" do
assert cs.valid?
end
- test "it sets the follower_adress" do
+ test "it sets the follower_address" do
cs = User.remote_user_changeset(@valid_remote)
# remote users get a fake local follower address
assert cs.changes.follower_address ==
@@ -1844,7 +1759,6 @@ test "delete/1 purges a user when they wouldn't be fully deleted" do
confirmation_token: "qqqq",
domain_blocks: ["lain.com"],
is_active: false,
- ap_enabled: true,
is_moderator: true,
is_admin: true,
mascot: %{"a" => "b"},
@@ -1885,7 +1799,6 @@ test "delete/1 purges a user when they wouldn't be fully deleted" do
confirmation_token: nil,
domain_blocks: [],
is_active: false,
- ap_enabled: false,
is_moderator: false,
is_admin: false,
mascot: nil,
@@ -1948,8 +1861,8 @@ test "unsuggests a user" do
end
end
- test "get_public_key_for_ap_id fetches a user that's not in the db" do
- assert {:ok, _key} = User.get_public_key_for_ap_id("http://mastodon.example.org/users/admin")
+ test "get_public_key_for_ap_id returns correctly for user that's not in the db" do
+ assert :error = User.get_public_key_for_ap_id("http://mastodon.example.org/users/admin")
end
describe "per-user rich-text filtering" do
@@ -2421,20 +2334,20 @@ test "external_users/1 external active users with limit", %{user1: user1, user2:
end
end
- describe "is_internal_user?/1" do
+ describe "internal?/1" do
test "non-internal user returns false" do
user = insert(:user)
- refute User.is_internal_user?(user)
+ refute User.internal?(user)
end
test "user with no nickname returns true" do
user = insert(:user, %{nickname: nil})
- assert User.is_internal_user?(user)
+ assert User.internal?(user)
end
test "user with internal-prefixed nickname returns true" do
user = insert(:user, %{nickname: "internal.test"})
- assert User.is_internal_user?(user)
+ assert User.internal?(user)
end
end
@@ -2473,8 +2386,7 @@ test "updates the counters normally on following/getting a follow when disabled"
insert(:user,
local: false,
follower_address: "http://localhost:4001/users/masto_closed/followers",
- following_address: "http://localhost:4001/users/masto_closed/following",
- ap_enabled: true
+ following_address: "http://localhost:4001/users/masto_closed/following"
)
assert other_user.following_count == 0
@@ -2495,8 +2407,7 @@ test "synchronizes the counters with the remote instance for the followed when e
insert(:user,
local: false,
follower_address: "http://localhost:4001/users/masto_closed/followers",
- following_address: "http://localhost:4001/users/masto_closed/following",
- ap_enabled: true
+ following_address: "http://localhost:4001/users/masto_closed/following"
)
assert other_user.following_count == 0
@@ -2517,8 +2428,7 @@ test "synchronizes the counters with the remote instance for the follower when e
insert(:user,
local: false,
follower_address: "http://localhost:4001/users/masto_closed/followers",
- following_address: "http://localhost:4001/users/masto_closed/following",
- ap_enabled: true
+ following_address: "http://localhost:4001/users/masto_closed/following"
)
assert other_user.following_count == 0
@@ -2683,13 +2593,23 @@ test "returns nickname without host" do
end
describe "full_nickname/1" do
- test "returns fully qualified nickname for local and remote users" do
- local_user =
- insert(:user, nickname: "local_user", ap_id: "https://somehost.com/users/local_user")
+ test "returns fully qualified nickname for local users" do
+ local_user = insert(:user, nickname: "local_user")
+ assert User.full_nickname(local_user) == "local_user@localhost"
+ end
+
+ test "returns fully qualified nickname for local users when using different domain for webfinger" do
+ clear_config([Pleroma.Web.WebFinger, :domain], "plemora.dev")
+
+ local_user = insert(:user, nickname: "local_user")
+
+ assert User.full_nickname(local_user) == "local_user@plemora.dev"
+ end
+
+ test "returns fully qualified nickname for remote users" do
remote_user = insert(:user, nickname: "remote@host.com", local: false)
- assert User.full_nickname(local_user) == "local_user@somehost.com"
assert User.full_nickname(remote_user) == "remote@host.com"
end
@@ -2884,6 +2804,20 @@ test "should report error on non-existing alias" do
end
end
+ describe "get_familiar_followers/3" do
+ test "returns familiar followers for a pair of users" do
+ user1 = insert(:user)
+ %{id: id2} = user2 = insert(:user)
+ user3 = insert(:user)
+ _user4 = insert(:user)
+
+ User.follow(user1, user2)
+ User.follow(user2, user3)
+
+ assert [%{id: ^id2}] = User.get_familiar_followers(user3, user1)
+ end
+ end
+
describe "account endorsements" do
test "it pins people" do
user = insert(:user)
@@ -2918,4 +2852,51 @@ test "it doesn't pin users you do not follow" do
refute User.endorses?(user, pinned_user)
end
end
+
+ test "it checks fields links for a backlink" do
+ user = insert(:user, ap_id: "https://social.example.org/users/lain")
+
+ fields = [
+ %{"name" => "Link", "value" => "http://example.com/rel_me/null"},
+ %{"name" => "Verified link", "value" => "http://example.com/rel_me/link"},
+ %{"name" => "Not a link", "value" => "i'm not a link"}
+ ]
+
+ user
+ |> User.update_and_set_cache(%{raw_fields: fields})
+
+ ObanHelpers.perform_all()
+
+ user = User.get_cached_by_id(user.id)
+
+ assert [
+ %{"verified_at" => nil},
+ %{"verified_at" => verified_at},
+ %{"verified_at" => nil}
+ ] = user.fields
+
+ assert is_binary(verified_at)
+ end
+
+ test "updating fields does not invalidate previously validated links" do
+ user = insert(:user, ap_id: "https://social.example.org/users/lain")
+
+ user
+ |> User.update_and_set_cache(%{
+ raw_fields: [%{"name" => "verified link", "value" => "http://example.com/rel_me/link"}]
+ })
+
+ ObanHelpers.perform_all()
+
+ %User{fields: [%{"verified_at" => verified_at}]} = user = User.get_cached_by_id(user.id)
+
+ user
+ |> User.update_and_set_cache(%{
+ raw_fields: [%{"name" => "Verified link", "value" => "http://example.com/rel_me/link"}]
+ })
+
+ user = User.get_cached_by_id(user.id)
+
+ assert [%{"verified_at" => ^verified_at}] = user.fields
+ end
end
diff --git a/test/pleroma/web/activity_pub/activity_pub_controller_test.exs b/test/pleroma/web/activity_pub/activity_pub_controller_test.exs
index ef91066c10..ec4c04c62a 100644
--- a/test/pleroma/web/activity_pub/activity_pub_controller_test.exs
+++ b/test/pleroma/web/activity_pub/activity_pub_controller_test.exs
@@ -25,6 +25,11 @@ defmodule Pleroma.Web.ActivityPub.ActivityPubControllerTest do
require Pleroma.Constants
+ setup do
+ Mox.stub_with(Pleroma.UnstubbedConfigMock, Pleroma.Config)
+ :ok
+ end
+
setup_all do
Tesla.Mock.mock_global(fn env -> apply(HttpRequestMock, :request, [env]) end)
:ok
@@ -216,7 +221,7 @@ test "it doesn't return a local-only object", %{conn: conn} do
user = insert(:user)
{:ok, post} = CommonAPI.post(user, %{status: "test", visibility: "local"})
- assert Pleroma.Web.ActivityPub.Visibility.is_local_public?(post)
+ assert Pleroma.Web.ActivityPub.Visibility.local_public?(post)
object = Object.normalize(post, fetch: false)
uuid = String.split(object.data["id"], "/") |> List.last()
@@ -233,7 +238,7 @@ test "returns local-only objects when authenticated", %{conn: conn} do
user = insert(:user)
{:ok, post} = CommonAPI.post(user, %{status: "test", visibility: "local"})
- assert Pleroma.Web.ActivityPub.Visibility.is_local_public?(post)
+ assert Pleroma.Web.ActivityPub.Visibility.local_public?(post)
object = Object.normalize(post, fetch: false)
uuid = String.split(object.data["id"], "/") |> List.last()
@@ -254,7 +259,7 @@ test "does not return local-only objects for remote users", %{conn: conn} do
{:ok, post} =
CommonAPI.post(user, %{status: "test @#{reader.nickname}", visibility: "local"})
- assert Pleroma.Web.ActivityPub.Visibility.is_local_public?(post)
+ assert Pleroma.Web.ActivityPub.Visibility.local_public?(post)
object = Object.normalize(post, fetch: false)
uuid = String.split(object.data["id"], "/") |> List.last()
@@ -431,7 +436,7 @@ test "it doesn't return a local-only activity", %{conn: conn} do
user = insert(:user)
{:ok, post} = CommonAPI.post(user, %{status: "test", visibility: "local"})
- assert Pleroma.Web.ActivityPub.Visibility.is_local_public?(post)
+ assert Pleroma.Web.ActivityPub.Visibility.local_public?(post)
uuid = String.split(post.data["id"], "/") |> List.last()
@@ -447,7 +452,7 @@ test "returns local-only activities when authenticated", %{conn: conn} do
user = insert(:user)
{:ok, post} = CommonAPI.post(user, %{status: "test", visibility: "local"})
- assert Pleroma.Web.ActivityPub.Visibility.is_local_public?(post)
+ assert Pleroma.Web.ActivityPub.Visibility.local_public?(post)
uuid = String.split(post.data["id"], "/") |> List.last()
@@ -575,7 +580,6 @@ test "it inserts an incoming activity into the database" <>
user =
insert(:user,
ap_id: "https://mastodon.example.org/users/raymoo",
- ap_enabled: true,
local: false,
last_refreshed_at: nil
)
@@ -891,6 +895,23 @@ test "it inserts an incoming activity into the database", %{conn: conn, data: da
assert Activity.get_by_ap_id(data["id"])
end
+ test "it rejects an invalid incoming activity", %{conn: conn, data: data} do
+ user = insert(:user, is_active: false)
+
+ data =
+ data
+ |> Map.put("bcc", [user.ap_id])
+ |> Kernel.put_in(["object", "bcc"], [user.ap_id])
+
+ conn =
+ conn
+ |> assign(:valid_signature, true)
+ |> put_req_header("content-type", "application/activity+json")
+ |> post("/users/#{user.nickname}/inbox", data)
+
+ assert "Invalid request." == json_response(conn, 400)
+ end
+
test "it accepts messages with to as string instead of array", %{conn: conn, data: data} do
user = insert(:user)
diff --git a/test/pleroma/web/activity_pub/activity_pub_test.exs b/test/pleroma/web/activity_pub/activity_pub_test.exs
index fc6fc039da..5242943855 100644
--- a/test/pleroma/web/activity_pub/activity_pub_test.exs
+++ b/test/pleroma/web/activity_pub/activity_pub_test.exs
@@ -11,6 +11,7 @@ defmodule Pleroma.Web.ActivityPub.ActivityPubTest do
alias Pleroma.Config
alias Pleroma.Notification
alias Pleroma.Object
+ alias Pleroma.UnstubbedConfigMock, as: ConfigMock
alias Pleroma.User
alias Pleroma.Web.ActivityPub.ActivityPub
alias Pleroma.Web.ActivityPub.Utils
@@ -19,11 +20,16 @@ defmodule Pleroma.Web.ActivityPub.ActivityPubTest do
import ExUnit.CaptureLog
import Mock
+ import Mox
import Pleroma.Factory
import Tesla.Mock
setup do
mock(fn env -> apply(HttpRequestMock, :request, [env]) end)
+
+ ConfigMock
+ |> stub_with(Pleroma.Test.StaticConfig)
+
:ok
end
@@ -174,7 +180,6 @@ test "it returns a user" do
{:ok, user} = ActivityPub.make_user_from_ap_id(user_id)
assert user.ap_id == user_id
assert user.nickname == "admin@mastodon.example.org"
- assert user.ap_enabled
assert user.follower_address == "http://mastodon.example.org/users/admin/followers"
end
@@ -771,6 +776,34 @@ test "increases replies count", %{user: user} do
assert %{data: _data, object: object} = Activity.get_by_ap_id_with_object(ap_id)
assert object.data["repliesCount"] == 2
end
+
+ test "increates quotes count", %{user: user} do
+ user2 = insert(:user)
+
+ {:ok, activity} = CommonAPI.post(user, %{status: "1", visibility: "public"})
+ ap_id = activity.data["id"]
+ quote_data = %{status: "1", quote_id: activity.id}
+
+ # public
+ {:ok, _} = CommonAPI.post(user2, Map.put(quote_data, :visibility, "public"))
+ assert %{data: _data, object: object} = Activity.get_by_ap_id_with_object(ap_id)
+ assert object.data["quotesCount"] == 1
+
+ # unlisted
+ {:ok, _} = CommonAPI.post(user2, Map.put(quote_data, :visibility, "unlisted"))
+ assert %{data: _data, object: object} = Activity.get_by_ap_id_with_object(ap_id)
+ assert object.data["quotesCount"] == 2
+
+ # private
+ {:ok, _} = CommonAPI.post(user2, Map.put(quote_data, :visibility, "private"))
+ assert %{data: _data, object: object} = Activity.get_by_ap_id_with_object(ap_id)
+ assert object.data["quotesCount"] == 2
+
+ # direct
+ {:ok, _} = CommonAPI.post(user2, Map.put(quote_data, :visibility, "direct"))
+ assert %{data: _data, object: object} = Activity.get_by_ap_id_with_object(ap_id)
+ assert object.data["quotesCount"] == 2
+ end
end
describe "fetch activities for recipients" do
@@ -995,7 +1028,7 @@ test "doesn't return activities from blocked domains" do
refute repeat_activity in activities
end
- test "see your own posts even when they adress actors from blocked domains" do
+ test "see your own posts even when they address actors from blocked domains" do
user = insert(:user)
domain = "dogwhistle.zone"
@@ -1342,6 +1375,14 @@ test "returns reblogs for users for whom reblogs have not been muted" do
%{test_file: test_file}
end
+ test "strips / from filename", %{test_file: file} do
+ file = %Plug.Upload{file | filename: "../../../../../nested/bad.jpg"}
+ {:ok, %Object{} = object} = ActivityPub.upload(file)
+ [%{"href" => href}] = object.data["url"]
+ assert Regex.match?(~r"/bad.jpg$", href)
+ refute Regex.match?(~r"/nested/", href)
+ end
+
test "sets a description if given", %{test_file: file} do
{:ok, %Object{} = object} = ActivityPub.upload(file, description: "a cool file")
assert object.data["name"] == "a cool file"
@@ -2645,4 +2686,13 @@ test "allow fetching of accounts with an empty string name field" do
{:ok, user} = ActivityPub.make_user_from_ap_id("https://princess.cat/users/mewmew")
assert user.name == " "
end
+
+ @tag capture_log: true
+ test "pin_data_from_featured_collection will ignore unsupported values" do
+ assert %{} ==
+ ActivityPub.pin_data_from_featured_collection(%{
+ "type" => "OrderedCollection",
+ "first" => "https://social.example/users/alice/collections/featured?page=true"
+ })
+ end
end
diff --git a/test/pleroma/web/activity_pub/builder_test.exs b/test/pleroma/web/activity_pub/builder_test.exs
index eb175a1bea..52058a0a34 100644
--- a/test/pleroma/web/activity_pub/builder_test.exs
+++ b/test/pleroma/web/activity_pub/builder_test.exs
@@ -44,5 +44,34 @@ test "returns note data" do
assert {:ok, ^expected, []} = Builder.note(draft)
end
+
+ test "quote post" do
+ user = insert(:user)
+ note = insert(:note)
+
+ draft = %ActivityDraft{
+ user: user,
+ context: "2hu",
+ content_html: "This is :moominmamma: note ",
+ quote_post: note,
+ extra: %{}
+ }
+
+ expected = %{
+ "actor" => user.ap_id,
+ "attachment" => [],
+ "content" => "This is :moominmamma: note ",
+ "context" => "2hu",
+ "sensitive" => false,
+ "type" => "Note",
+ "quoteUrl" => note.data["id"],
+ "cc" => [],
+ "summary" => nil,
+ "tag" => [],
+ "to" => []
+ }
+
+ assert {:ok, ^expected, []} = Builder.note(draft)
+ end
end
end
diff --git a/test/pleroma/web/activity_pub/mrf/anti_mention_spam_policy_test.exs b/test/pleroma/web/activity_pub/mrf/anti_mention_spam_policy_test.exs
new file mode 100644
index 0000000000..63947858c8
--- /dev/null
+++ b/test/pleroma/web/activity_pub/mrf/anti_mention_spam_policy_test.exs
@@ -0,0 +1,65 @@
+# Pleroma: A lightweight social networking server
+# Copyright © 2017-2022 Pleroma Authors
+# SPDX-License-Identifier: AGPL-3.0-only
+
+defmodule Pleroma.Web.ActivityPub.MRF.AntiMentionSpamPolicyTest do
+ use Pleroma.DataCase
+ import Pleroma.Factory
+ alias Pleroma.Web.ActivityPub.MRF.AntiMentionSpamPolicy
+
+ test "it allows posts without mentions" do
+ user = insert(:user, local: false)
+ assert user.note_count == 0
+
+ message = %{
+ "type" => "Create",
+ "actor" => user.ap_id
+ }
+
+ {:ok, _message} = AntiMentionSpamPolicy.filter(message)
+ end
+
+ test "it allows posts from users with followers, posts, and age" do
+ user =
+ insert(:user,
+ local: false,
+ follower_count: 1,
+ note_count: 1,
+ inserted_at: ~N[1970-01-01 00:00:00]
+ )
+
+ message = %{
+ "type" => "Create",
+ "actor" => user.ap_id
+ }
+
+ {:ok, _message} = AntiMentionSpamPolicy.filter(message)
+ end
+
+ test "it allows posts from local users" do
+ user = insert(:user, local: true)
+
+ message = %{
+ "type" => "Create",
+ "actor" => user.ap_id
+ }
+
+ {:ok, _message} = AntiMentionSpamPolicy.filter(message)
+ end
+
+ test "it rejects posts with mentions from users without followers" do
+ user = insert(:user, local: false, follower_count: 0)
+
+ message = %{
+ "type" => "Create",
+ "actor" => user.ap_id,
+ "object" => %{
+ "to" => ["https://pleroma.soykaf.com/users/1"],
+ "cc" => ["https://pleroma.soykaf.com/users/1"],
+ "actor" => user.ap_id
+ }
+ }
+
+ {:reject, _message} = AntiMentionSpamPolicy.filter(message)
+ end
+end
diff --git a/test/pleroma/web/activity_pub/mrf/emoji_policy_test.exs b/test/pleroma/web/activity_pub/mrf/emoji_policy_test.exs
new file mode 100644
index 0000000000..7350800f0c
--- /dev/null
+++ b/test/pleroma/web/activity_pub/mrf/emoji_policy_test.exs
@@ -0,0 +1,425 @@
+# Pleroma: A lightweight social networking server
+# Copyright © 2017-2023 Pleroma Authors
+# SPDX-License-Identifier: AGPL-3.0-only
+
+defmodule Pleroma.Web.ActivityPub.MRF.EmojiPolicyTest do
+ use Pleroma.DataCase
+
+ require Pleroma.Constants
+
+ alias Pleroma.Web.ActivityPub.MRF
+ alias Pleroma.Web.ActivityPub.MRF.EmojiPolicy
+
+ setup do: clear_config(:mrf_emoji)
+
+ setup do
+ clear_config([:mrf_emoji], %{
+ remove_url: [],
+ remove_shortcode: [],
+ federated_timeline_removal_url: [],
+ federated_timeline_removal_shortcode: []
+ })
+ end
+
+ @emoji_tags [
+ %{
+ "icon" => %{
+ "type" => "Image",
+ "url" => "https://example.org/emoji/biribiri/mikoto_smile2.png"
+ },
+ "id" => "https://example.org/emoji/biribiri/mikoto_smile2.png",
+ "name" => ":mikoto_smile2:",
+ "type" => "Emoji",
+ "updated" => "1970-01-01T00:00:00Z"
+ },
+ %{
+ "icon" => %{
+ "type" => "Image",
+ "url" => "https://example.org/emoji/biribiri/mikoto_smile3.png"
+ },
+ "id" => "https://example.org/emoji/biribiri/mikoto_smile3.png",
+ "name" => ":mikoto_smile3:",
+ "type" => "Emoji",
+ "updated" => "1970-01-01T00:00:00Z"
+ },
+ %{
+ "icon" => %{
+ "type" => "Image",
+ "url" => "https://example.org/emoji/nekomimi_girl_emoji/nekomimi_girl_emoji_007.png"
+ },
+ "id" => "https://example.org/emoji/nekomimi_girl_emoji/nekomimi_girl_emoji_007.png",
+ "name" => ":nekomimi_girl_emoji_007:",
+ "type" => "Emoji",
+ "updated" => "1970-01-01T00:00:00Z"
+ },
+ %{
+ "icon" => %{
+ "type" => "Image",
+ "url" => "https://example.org/test.png"
+ },
+ "id" => "https://example.org/test.png",
+ "name" => ":test:",
+ "type" => "Emoji",
+ "updated" => "1970-01-01T00:00:00Z"
+ }
+ ]
+
+ @misc_tags [%{"type" => "Placeholder"}]
+
+ @user_data %{
+ "type" => "Person",
+ "id" => "https://example.org/placeholder",
+ "name" => "lol",
+ "tag" => @emoji_tags ++ @misc_tags
+ }
+
+ @status_data %{
+ "type" => "Create",
+ "object" => %{
+ "type" => "Note",
+ "id" => "https://example.org/placeholder",
+ "content" => "lol",
+ "tag" => @emoji_tags ++ @misc_tags,
+ "emoji" => %{
+ "mikoto_smile2" => "https://example.org/emoji/biribiri/mikoto_smile2.png",
+ "mikoto_smile3" => "https://example.org/emoji/biribiri/mikoto_smile3.png",
+ "nekomimi_girl_emoji_007" =>
+ "https://example.org/emoji/nekomimi_girl_emoji/nekomimi_girl_emoji_007.png",
+ "test" => "https://example.org/test.png"
+ },
+ "to" => ["https://example.org/self", Pleroma.Constants.as_public()],
+ "cc" => ["https://example.org/someone"]
+ },
+ "to" => ["https://example.org/self", Pleroma.Constants.as_public()],
+ "cc" => ["https://example.org/someone"]
+ }
+
+ @status_data_with_history %{
+ "type" => "Create",
+ "object" =>
+ @status_data["object"]
+ |> Map.merge(%{
+ "formerRepresentations" => %{
+ "type" => "OrderedCollection",
+ "orderedItems" => [@status_data["object"] |> Map.put("content", "older")],
+ "totalItems" => 1
+ }
+ }),
+ "to" => ["https://example.org/self", Pleroma.Constants.as_public()],
+ "cc" => ["https://example.org/someone"]
+ }
+
+ @emoji_react_data %{
+ "type" => "EmojiReact",
+ "tag" => [@emoji_tags |> Enum.at(3)],
+ "object" => "https://example.org/someobject",
+ "to" => ["https://example.org/self"],
+ "cc" => ["https://example.org/someone"]
+ }
+
+ @emoji_react_data_matching_regex %{
+ "type" => "EmojiReact",
+ "tag" => [@emoji_tags |> Enum.at(1)],
+ "object" => "https://example.org/someobject",
+ "to" => ["https://example.org/self"],
+ "cc" => ["https://example.org/someone"]
+ }
+
+ @emoji_react_data_matching_nothing %{
+ "type" => "EmojiReact",
+ "tag" => [@emoji_tags |> Enum.at(2)],
+ "object" => "https://example.org/someobject",
+ "to" => ["https://example.org/self"],
+ "cc" => ["https://example.org/someone"]
+ }
+
+ @emoji_react_data_unicode %{
+ "type" => "EmojiReact",
+ "content" => "😍",
+ "object" => "https://example.org/someobject",
+ "to" => ["https://example.org/self"],
+ "cc" => ["https://example.org/someone"]
+ }
+
+ describe "remove_url" do
+ setup do
+ clear_config([:mrf_emoji, :remove_url], [
+ "https://example.org/test.png",
+ ~r{/biribiri/mikoto_smile[23]\.png},
+ "nekomimi_girl_emoji"
+ ])
+
+ :ok
+ end
+
+ test "processes user" do
+ {:ok, filtered} = MRF.filter_one(EmojiPolicy, @user_data)
+
+ expected_tags = [@emoji_tags |> Enum.at(2)] ++ @misc_tags
+
+ assert %{"tag" => ^expected_tags} = filtered
+ end
+
+ test "processes status" do
+ {:ok, filtered} = MRF.filter_one(EmojiPolicy, @status_data)
+
+ expected_tags = [@emoji_tags |> Enum.at(2)] ++ @misc_tags
+
+ expected_emoji = %{
+ "nekomimi_girl_emoji_007" =>
+ "https://example.org/emoji/nekomimi_girl_emoji/nekomimi_girl_emoji_007.png"
+ }
+
+ assert %{"object" => %{"tag" => ^expected_tags, "emoji" => ^expected_emoji}} = filtered
+ end
+
+ test "processes status with history" do
+ {:ok, filtered} = MRF.filter_one(EmojiPolicy, @status_data_with_history)
+
+ expected_tags = [@emoji_tags |> Enum.at(2)] ++ @misc_tags
+
+ expected_emoji = %{
+ "nekomimi_girl_emoji_007" =>
+ "https://example.org/emoji/nekomimi_girl_emoji/nekomimi_girl_emoji_007.png"
+ }
+
+ assert %{
+ "object" => %{
+ "tag" => ^expected_tags,
+ "emoji" => ^expected_emoji,
+ "formerRepresentations" => %{"orderedItems" => [item]}
+ }
+ } = filtered
+
+ assert %{"tag" => ^expected_tags, "emoji" => ^expected_emoji} = item
+ end
+
+ test "processes updates" do
+ {:ok, filtered} =
+ MRF.filter_one(EmojiPolicy, @status_data_with_history |> Map.put("type", "Update"))
+
+ expected_tags = [@emoji_tags |> Enum.at(2)] ++ @misc_tags
+
+ expected_emoji = %{
+ "nekomimi_girl_emoji_007" =>
+ "https://example.org/emoji/nekomimi_girl_emoji/nekomimi_girl_emoji_007.png"
+ }
+
+ assert %{
+ "object" => %{
+ "tag" => ^expected_tags,
+ "emoji" => ^expected_emoji,
+ "formerRepresentations" => %{"orderedItems" => [item]}
+ }
+ } = filtered
+
+ assert %{"tag" => ^expected_tags, "emoji" => ^expected_emoji} = item
+ end
+
+ test "processes EmojiReact" do
+ assert {:reject, "[EmojiPolicy] Rejected for having disallowed emoji"} ==
+ MRF.filter_one(EmojiPolicy, @emoji_react_data)
+
+ assert {:reject, "[EmojiPolicy] Rejected for having disallowed emoji"} ==
+ MRF.filter_one(EmojiPolicy, @emoji_react_data_matching_regex)
+
+ assert {:ok, @emoji_react_data_matching_nothing} ==
+ MRF.filter_one(EmojiPolicy, @emoji_react_data_matching_nothing)
+
+ assert {:ok, @emoji_react_data_unicode} ==
+ MRF.filter_one(EmojiPolicy, @emoji_react_data_unicode)
+ end
+ end
+
+ describe "remove_shortcode" do
+ setup do
+ clear_config([:mrf_emoji, :remove_shortcode], [
+ "test",
+ ~r{mikoto_s},
+ "nekomimi_girl_emoji"
+ ])
+
+ :ok
+ end
+
+ test "processes user" do
+ {:ok, filtered} = MRF.filter_one(EmojiPolicy, @user_data)
+
+ expected_tags = [@emoji_tags |> Enum.at(2)] ++ @misc_tags
+
+ assert %{"tag" => ^expected_tags} = filtered
+ end
+
+ test "processes status" do
+ {:ok, filtered} = MRF.filter_one(EmojiPolicy, @status_data)
+
+ expected_tags = [@emoji_tags |> Enum.at(2)] ++ @misc_tags
+
+ expected_emoji = %{
+ "nekomimi_girl_emoji_007" =>
+ "https://example.org/emoji/nekomimi_girl_emoji/nekomimi_girl_emoji_007.png"
+ }
+
+ assert %{"object" => %{"tag" => ^expected_tags, "emoji" => ^expected_emoji}} = filtered
+ end
+
+ test "processes status with history" do
+ {:ok, filtered} = MRF.filter_one(EmojiPolicy, @status_data_with_history)
+
+ expected_tags = [@emoji_tags |> Enum.at(2)] ++ @misc_tags
+
+ expected_emoji = %{
+ "nekomimi_girl_emoji_007" =>
+ "https://example.org/emoji/nekomimi_girl_emoji/nekomimi_girl_emoji_007.png"
+ }
+
+ assert %{
+ "object" => %{
+ "tag" => ^expected_tags,
+ "emoji" => ^expected_emoji,
+ "formerRepresentations" => %{"orderedItems" => [item]}
+ }
+ } = filtered
+
+ assert %{"tag" => ^expected_tags, "emoji" => ^expected_emoji} = item
+ end
+
+ test "processes updates" do
+ {:ok, filtered} =
+ MRF.filter_one(EmojiPolicy, @status_data_with_history |> Map.put("type", "Update"))
+
+ expected_tags = [@emoji_tags |> Enum.at(2)] ++ @misc_tags
+
+ expected_emoji = %{
+ "nekomimi_girl_emoji_007" =>
+ "https://example.org/emoji/nekomimi_girl_emoji/nekomimi_girl_emoji_007.png"
+ }
+
+ assert %{
+ "object" => %{
+ "tag" => ^expected_tags,
+ "emoji" => ^expected_emoji,
+ "formerRepresentations" => %{"orderedItems" => [item]}
+ }
+ } = filtered
+
+ assert %{"tag" => ^expected_tags, "emoji" => ^expected_emoji} = item
+ end
+
+ test "processes EmojiReact" do
+ assert {:reject, "[EmojiPolicy] Rejected for having disallowed emoji"} ==
+ MRF.filter_one(EmojiPolicy, @emoji_react_data)
+
+ assert {:reject, "[EmojiPolicy] Rejected for having disallowed emoji"} ==
+ MRF.filter_one(EmojiPolicy, @emoji_react_data_matching_regex)
+
+ assert {:ok, @emoji_react_data_matching_nothing} ==
+ MRF.filter_one(EmojiPolicy, @emoji_react_data_matching_nothing)
+
+ assert {:ok, @emoji_react_data_unicode} ==
+ MRF.filter_one(EmojiPolicy, @emoji_react_data_unicode)
+ end
+ end
+
+ describe "federated_timeline_removal_url" do
+ setup do
+ clear_config([:mrf_emoji, :federated_timeline_removal_url], [
+ "https://example.org/test.png",
+ ~r{/biribiri/mikoto_smile[23]\.png},
+ "nekomimi_girl_emoji"
+ ])
+
+ :ok
+ end
+
+ test "processes status" do
+ {:ok, filtered} = MRF.filter_one(EmojiPolicy, @status_data)
+
+ expected_tags = @status_data["object"]["tag"]
+ expected_emoji = @status_data["object"]["emoji"]
+
+ expected_to = ["https://example.org/self"]
+ expected_cc = [Pleroma.Constants.as_public(), "https://example.org/someone"]
+
+ assert %{
+ "to" => ^expected_to,
+ "cc" => ^expected_cc,
+ "object" => %{"tag" => ^expected_tags, "emoji" => ^expected_emoji}
+ } = filtered
+ end
+
+ test "ignore updates" do
+ {:ok, filtered} = MRF.filter_one(EmojiPolicy, @status_data |> Map.put("type", "Update"))
+
+ expected_tags = @status_data["object"]["tag"]
+ expected_emoji = @status_data["object"]["emoji"]
+
+ expected_to = ["https://example.org/self", Pleroma.Constants.as_public()]
+ expected_cc = ["https://example.org/someone"]
+
+ assert %{
+ "to" => ^expected_to,
+ "cc" => ^expected_cc,
+ "object" => %{"tag" => ^expected_tags, "emoji" => ^expected_emoji}
+ } = filtered
+ end
+
+ test "processes status with history" do
+ status =
+ @status_data_with_history
+ |> put_in(["object", "tag"], @misc_tags)
+ |> put_in(["object", "emoji"], %{})
+
+ {:ok, filtered} = MRF.filter_one(EmojiPolicy, status)
+
+ expected_tags = @status_data["object"]["tag"]
+ expected_emoji = @status_data["object"]["emoji"]
+
+ expected_to = ["https://example.org/self"]
+ expected_cc = [Pleroma.Constants.as_public(), "https://example.org/someone"]
+
+ assert %{
+ "to" => ^expected_to,
+ "cc" => ^expected_cc,
+ "object" => %{
+ "formerRepresentations" => %{
+ "orderedItems" => [%{"tag" => ^expected_tags, "emoji" => ^expected_emoji}]
+ }
+ }
+ } = filtered
+ end
+ end
+
+ describe "edge cases" do
+ setup do
+ clear_config([:mrf_emoji, :remove_url], [
+ "https://example.org/test.png",
+ ~r{/biribiri/mikoto_smile[23]\.png},
+ "nekomimi_girl_emoji"
+ ])
+
+ :ok
+ end
+
+ test "non-statuses" do
+ answer = @status_data |> put_in(["object", "type"], "Answer")
+ {:ok, filtered} = MRF.filter_one(EmojiPolicy, answer)
+
+ assert filtered == answer
+ end
+
+ test "without tag" do
+ status = @status_data |> Map.put("object", Map.drop(@status_data["object"], ["tag"]))
+ {:ok, filtered} = MRF.filter_one(EmojiPolicy, status)
+
+ refute Map.has_key?(filtered["object"], "tag")
+ end
+
+ test "without emoji" do
+ status = @status_data |> Map.put("object", Map.drop(@status_data["object"], ["emoji"]))
+ {:ok, filtered} = MRF.filter_one(EmojiPolicy, status)
+
+ refute Map.has_key?(filtered["object"], "emoji")
+ end
+ end
+end
diff --git a/test/pleroma/web/activity_pub/mrf/ensure_re_prepended_test.exs b/test/pleroma/web/activity_pub/mrf/ensure_re_prepended_test.exs
index 859e6f1e98..5afab0cf98 100644
--- a/test/pleroma/web/activity_pub/mrf/ensure_re_prepended_test.exs
+++ b/test/pleroma/web/activity_pub/mrf/ensure_re_prepended_test.exs
@@ -24,7 +24,7 @@ test "it adds `re:` to summary object when child summary and parent summary equa
assert res["object"]["summary"] == "re: object-summary"
end
- test "it adds `re:` to summary object when child summary containts re-subject of parent summary " do
+ test "it adds `re:` to summary object when child summary contains re-subject of parent summary " do
message = %{
"type" => "Create",
"object" => %{
diff --git a/test/pleroma/web/activity_pub/mrf/follow_bot_policy_test.exs b/test/pleroma/web/activity_pub/mrf/follow_bot_policy_test.exs
index 248190034e..a70e3c1a26 100644
--- a/test/pleroma/web/activity_pub/mrf/follow_bot_policy_test.exs
+++ b/test/pleroma/web/activity_pub/mrf/follow_bot_policy_test.exs
@@ -3,7 +3,7 @@
# SPDX-License-Identifier: AGPL-3.0-only
defmodule Pleroma.Web.ActivityPub.MRF.FollowBotPolicyTest do
- use Pleroma.DataCase, async: true
+ use Pleroma.DataCase
alias Pleroma.User
alias Pleroma.Web.ActivityPub.MRF.FollowBotPolicy
diff --git a/test/pleroma/web/activity_pub/mrf/force_mention_test.exs b/test/pleroma/web/activity_pub/mrf/force_mention_test.exs
new file mode 100644
index 0000000000..b026bab660
--- /dev/null
+++ b/test/pleroma/web/activity_pub/mrf/force_mention_test.exs
@@ -0,0 +1,73 @@
+# Pleroma: A lightweight social networking server
+# Copyright © 2017-2024 Pleroma Authors
+# SPDX-License-Identifier: AGPL-3.0-only
+
+defmodule Pleroma.Web.ActivityPub.MRF.ForceMentionTest do
+ use Pleroma.DataCase
+ require Pleroma.Constants
+
+ alias Pleroma.Web.ActivityPub.MRF.ForceMention
+
+ import Pleroma.Factory
+
+ test "adds mention to a reply" do
+ lain =
+ insert(:user, ap_id: "https://lain.com/users/lain", nickname: "lain@lain.com", local: false)
+
+ niobleoum =
+ insert(:user,
+ ap_id: "https://www.minds.com/api/activitypub/users/1198929502760083472",
+ nickname: "niobleoum@minds.com",
+ local: false
+ )
+
+ status = File.read!("test/fixtures/minds-pleroma-mentioned-post.json") |> Jason.decode!()
+
+ status_activity = %{
+ "type" => "Create",
+ "actor" => lain.ap_id,
+ "object" => status
+ }
+
+ Pleroma.Web.ActivityPub.Transmogrifier.handle_incoming(status_activity)
+
+ reply = File.read!("test/fixtures/minds-invalid-mention-post.json") |> Jason.decode!()
+
+ reply_activity = %{
+ "type" => "Create",
+ "actor" => niobleoum.ap_id,
+ "object" => reply
+ }
+
+ {:ok, %{"object" => %{"tag" => tag}}} = ForceMention.filter(reply_activity)
+
+ assert Enum.find(tag, fn %{"href" => href} -> href == lain.ap_id end)
+ end
+
+ test "adds mention to a quote" do
+ user1 = insert(:user, ap_id: "https://misskey.io/users/83ssedkv53")
+ user2 = insert(:user, ap_id: "https://misskey.io/users/7rkrarq81i")
+
+ status = File.read!("test/fixtures/tesla_mock/misskey.io_8vs6wxufd0.json") |> Jason.decode!()
+
+ status_activity = %{
+ "type" => "Create",
+ "actor" => user1.ap_id,
+ "object" => status
+ }
+
+ Pleroma.Web.ActivityPub.Transmogrifier.handle_incoming(status_activity)
+
+ quote_post = File.read!("test/fixtures/quote_post/misskey_quote_post.json") |> Jason.decode!()
+
+ quote_activity = %{
+ "type" => "Create",
+ "actor" => user2.ap_id,
+ "object" => quote_post
+ }
+
+ {:ok, %{"object" => %{"tag" => tag}}} = ForceMention.filter(quote_activity)
+
+ assert Enum.find(tag, fn %{"href" => href} -> href == user1.ap_id end)
+ end
+end
diff --git a/test/pleroma/web/activity_pub/mrf/force_mentions_in_content_test.exs b/test/pleroma/web/activity_pub/mrf/force_mentions_in_content_test.exs
index b349a4bb75..811ef105cd 100644
--- a/test/pleroma/web/activity_pub/mrf/force_mentions_in_content_test.exs
+++ b/test/pleroma/web/activity_pub/mrf/force_mentions_in_content_test.exs
@@ -256,4 +256,55 @@ test "works with Updates" do
}
}} = MRF.filter_one(ForceMentionsInContent, activity)
end
+
+ test "don't add duplicate mentions for mastodon or misskey posts" do
+ [zero, rogerick, greg] = [
+ insert(:user,
+ ap_id: "https://pleroma.example.com/users/zero",
+ uri: "https://pleroma.example.com/users/zero",
+ nickname: "zero@pleroma.example.com",
+ local: false
+ ),
+ insert(:user,
+ ap_id: "https://misskey.example.com/users/104ab42f11",
+ uri: "https://misskey.example.com/@rogerick",
+ nickname: "rogerick@misskey.example.com",
+ local: false
+ ),
+ insert(:user,
+ ap_id: "https://mastodon.example.com/users/greg",
+ uri: "https://mastodon.example.com/@greg",
+ nickname: "greg@mastodon.example.com",
+ local: false
+ )
+ ]
+
+ {:ok, post} = CommonAPI.post(rogerick, %{status: "eugh"})
+
+ inline_mentions = [
+ "@rogerick ",
+ "@greg "
+ ]
+
+ activity = %{
+ "type" => "Create",
+ "actor" => zero.ap_id,
+ "object" => %{
+ "type" => "Note",
+ "actor" => zero.ap_id,
+ "content" => "#{Enum.at(inline_mentions, 0)} #{Enum.at(inline_mentions, 1)} erm",
+ "to" => [
+ rogerick.ap_id,
+ greg.ap_id,
+ Constants.as_public()
+ ],
+ "inReplyTo" => Object.normalize(post).data["id"]
+ }
+ }
+
+ {:ok, %{"object" => %{"content" => filtered}}} = ForceMentionsInContent.filter(activity)
+
+ assert filtered ==
+ "#{Enum.at(inline_mentions, 0)} #{Enum.at(inline_mentions, 1)} erm"
+ end
end
diff --git a/test/pleroma/web/activity_pub/mrf/inline_quote_policy_test.exs b/test/pleroma/web/activity_pub/mrf/inline_quote_policy_test.exs
new file mode 100644
index 0000000000..d5762766f1
--- /dev/null
+++ b/test/pleroma/web/activity_pub/mrf/inline_quote_policy_test.exs
@@ -0,0 +1,112 @@
+# Pleroma: A lightweight social networking server
+# Copyright © 2017-2021 Pleroma Authors
+# SPDX-License-Identifier: AGPL-3.0-only
+
+defmodule Pleroma.Web.ActivityPub.MRF.InlineQuotePolicyTest do
+ alias Pleroma.Web.ActivityPub.MRF.InlineQuotePolicy
+ use Pleroma.DataCase
+
+ test "adds quote URL to post content" do
+ quote_url = "https://gleasonator.com/objects/1234"
+
+ activity = %{
+ "type" => "Create",
+ "actor" => "https://gleasonator.com/users/alex",
+ "object" => %{
+ "type" => "Note",
+ "content" => "Nice post",
+ "quoteUrl" => quote_url
+ }
+ }
+
+ {:ok, %{"object" => %{"content" => filtered}}} = InlineQuotePolicy.filter(activity)
+
+ assert filtered ==
+ "Nice postRT: https://gleasonator.com/objects/1234 "
+ end
+
+ test "adds quote URL to post content, custom template" do
+ clear_config([:mrf_inline_quote, :template], "{url}'s quoting")
+ quote_url = "https://gleasonator.com/objects/1234"
+
+ activity = %{
+ "type" => "Create",
+ "actor" => "https://gleasonator.com/users/alex",
+ "object" => %{
+ "type" => "Note",
+ "content" => "Nice post",
+ "quoteUrl" => quote_url
+ }
+ }
+
+ {:ok, %{"object" => %{"content" => filtered}}} = InlineQuotePolicy.filter(activity)
+
+ assert filtered ==
+ "Nice posthttps://gleasonator.com/objects/1234 's quoting "
+ end
+
+ test "doesn't add line breaks to markdown posts" do
+ quote_url = "https://gleasonator.com/objects/1234"
+
+ activity = %{
+ "type" => "Create",
+ "actor" => "https://gleasonator.com/users/alex",
+ "object" => %{
+ "type" => "Note",
+ "content" => "Nice post
",
+ "quoteUrl" => quote_url
+ }
+ }
+
+ {:ok, %{"object" => %{"content" => filtered}}} = InlineQuotePolicy.filter(activity)
+
+ assert filtered ==
+ "Nice postRT: https://gleasonator.com/objects/1234
"
+ end
+
+ test "ignores Misskey quote posts" do
+ object = File.read!("test/fixtures/quote_post/misskey_quote_post.json") |> Jason.decode!()
+
+ activity = %{
+ "type" => "Create",
+ "actor" => "https://misskey.io/users/7rkrarq81i",
+ "object" => object
+ }
+
+ {:ok, filtered} = InlineQuotePolicy.filter(activity)
+ assert filtered == activity
+ end
+
+ test "ignores Fedibird quote posts" do
+ object = File.read!("test/fixtures/quote_post/fedibird_quote_post.json") |> Jason.decode!()
+
+ # Normally the ObjectValidator will fix this before it reaches MRF
+ object = Map.put(object, "quoteUrl", object["quoteURL"])
+
+ activity = %{
+ "type" => "Create",
+ "actor" => "https://fedibird.com/users/noellabo",
+ "object" => object
+ }
+
+ {:ok, filtered} = InlineQuotePolicy.filter(activity)
+ assert filtered == activity
+ end
+
+ test "skips objects which already have an .inline-quote span" do
+ object =
+ File.read!("test/fixtures/quote_post/fedibird_quote_mismatched.json") |> Jason.decode!()
+
+ # Normally the ObjectValidator will fix this before it reaches MRF
+ object = Map.put(object, "quoteUrl", object["quoteUri"])
+
+ activity = %{
+ "type" => "Create",
+ "actor" => "https://fedibird.com/users/noellabo",
+ "object" => object
+ }
+
+ {:ok, filtered} = InlineQuotePolicy.filter(activity)
+ assert filtered == activity
+ end
+end
diff --git a/test/pleroma/web/activity_pub/mrf/media_proxy_warming_policy_test.exs b/test/pleroma/web/activity_pub/mrf/media_proxy_warming_policy_test.exs
index 6557c3a981..0da3afa3b0 100644
--- a/test/pleroma/web/activity_pub/mrf/media_proxy_warming_policy_test.exs
+++ b/test/pleroma/web/activity_pub/mrf/media_proxy_warming_policy_test.exs
@@ -7,10 +7,12 @@ defmodule Pleroma.Web.ActivityPub.MRF.MediaProxyWarmingPolicyTest do
use Pleroma.Tests.Helpers
alias Pleroma.HTTP
+ alias Pleroma.UnstubbedConfigMock, as: ConfigMock
alias Pleroma.Web.ActivityPub.MRF
alias Pleroma.Web.ActivityPub.MRF.MediaProxyWarmingPolicy
import Mock
+ import Mox
@message %{
"type" => "Create",
@@ -42,6 +44,13 @@ defmodule Pleroma.Web.ActivityPub.MRF.MediaProxyWarmingPolicyTest do
}
}
+ setup do
+ ConfigMock
+ |> stub_with(Pleroma.Test.StaticConfig)
+
+ :ok
+ end
+
setup do: clear_config([:media_proxy, :enabled], true)
test "it prefetches media proxy URIs" do
diff --git a/test/pleroma/web/activity_pub/mrf/nsfw_api_policy_test.exs b/test/pleroma/web/activity_pub/mrf/nsfw_api_policy_test.exs
new file mode 100644
index 0000000000..0beb9c2cb2
--- /dev/null
+++ b/test/pleroma/web/activity_pub/mrf/nsfw_api_policy_test.exs
@@ -0,0 +1,267 @@
+# Pleroma: A lightweight social networking server
+# Copyright © 2017-2021 Pleroma Authors
+# SPDX-License-Identifier: AGPL-3.0-only
+
+defmodule Pleroma.Web.ActivityPub.MRF.NsfwApiPolicyTest do
+ use Pleroma.DataCase
+
+ import ExUnit.CaptureLog
+ import Pleroma.Factory
+
+ alias Pleroma.Constants
+ alias Pleroma.Web.ActivityPub.MRF.NsfwApiPolicy
+
+ require Pleroma.Constants
+
+ @policy :mrf_nsfw_api
+
+ @sfw_url "https://kittens.co/kitty.gif"
+ @nsfw_url "https://b00bies.com/nsfw.jpg"
+ @timeout_url "http://time.out/i.jpg"
+
+ setup_all do
+ clear_config(@policy,
+ url: "http://127.0.0.1:5000/",
+ threshold: 0.7,
+ mark_sensitive: true,
+ unlist: false,
+ reject: false
+ )
+ end
+
+ setup do
+ Tesla.Mock.mock(fn
+ # NSFW URL
+ %{method: :get, url: "http://127.0.0.1:5000/?url=#{@nsfw_url}"} ->
+ %Tesla.Env{status: 200, body: ~s({"score":0.99772077798843384,"url":"#{@nsfw_url}"})}
+
+ # SFW URL
+ %{method: :get, url: "http://127.0.0.1:5000/?url=#{@sfw_url}"} ->
+ %Tesla.Env{status: 200, body: ~s({"score":0.00011714912398019806,"url":"#{@sfw_url}"})}
+
+ # Timeout URL
+ %{method: :get, url: "http://127.0.0.1:5000/?url=#{@timeout_url}"} ->
+ {:error, :timeout}
+
+ # Fallback URL
+ %{method: :get, url: "http://127.0.0.1:5000/?url=" <> url} ->
+ body =
+ ~s({"error_code":500,"error_reason":"[Errno -2] Name or service not known","url":"#{url}"})
+
+ %Tesla.Env{status: 500, body: body}
+ end)
+
+ :ok
+ end
+
+ describe "build_request_url/1" do
+ test "it works" do
+ expected = "http://127.0.0.1:5000/?url=https://b00bies.com/nsfw.jpg"
+ assert NsfwApiPolicy.build_request_url(@nsfw_url) == expected
+ end
+
+ test "it adds a trailing slash" do
+ clear_config([@policy, :url], "http://localhost:5000")
+
+ expected = "http://localhost:5000/?url=https://b00bies.com/nsfw.jpg"
+ assert NsfwApiPolicy.build_request_url(@nsfw_url) == expected
+ end
+
+ test "it adds a trailing slash preserving the path" do
+ clear_config([@policy, :url], "http://localhost:5000/nsfw_api")
+
+ expected = "http://localhost:5000/nsfw_api/?url=https://b00bies.com/nsfw.jpg"
+ assert NsfwApiPolicy.build_request_url(@nsfw_url) == expected
+ end
+ end
+
+ describe "parse_url/1" do
+ test "returns decoded JSON from the API server" do
+ expected = %{"score" => 0.99772077798843384, "url" => @nsfw_url}
+ assert NsfwApiPolicy.parse_url(@nsfw_url) == {:ok, expected}
+ end
+
+ test "warns when the API server fails" do
+ expected = "[NsfwApiPolicy]: The API server failed. Skipping."
+ assert capture_log(fn -> NsfwApiPolicy.parse_url(@timeout_url) end) =~ expected
+ end
+
+ test "returns {:error, _} tuple when the API server fails" do
+ capture_log(fn ->
+ assert {:error, _} = NsfwApiPolicy.parse_url(@timeout_url)
+ end)
+ end
+ end
+
+ describe "check_url_nsfw/1" do
+ test "returns {:nsfw, _} tuple" do
+ expected = {:nsfw, %{url: @nsfw_url, score: 0.99772077798843384, threshold: 0.7}}
+ assert NsfwApiPolicy.check_url_nsfw(@nsfw_url) == expected
+ end
+
+ test "returns {:sfw, _} tuple" do
+ expected = {:sfw, %{url: @sfw_url, score: 0.00011714912398019806, threshold: 0.7}}
+ assert NsfwApiPolicy.check_url_nsfw(@sfw_url) == expected
+ end
+
+ test "returns {:sfw, _} on failure" do
+ expected = {:sfw, %{url: @timeout_url, score: nil, threshold: 0.7}}
+
+ capture_log(fn ->
+ assert NsfwApiPolicy.check_url_nsfw(@timeout_url) == expected
+ end)
+ end
+
+ test "works with map URL" do
+ expected = {:nsfw, %{url: @nsfw_url, score: 0.99772077798843384, threshold: 0.7}}
+ assert NsfwApiPolicy.check_url_nsfw(%{"href" => @nsfw_url}) == expected
+ end
+ end
+
+ describe "check_attachment_nsfw/1" do
+ test "returns {:nsfw, _} if any items are NSFW" do
+ attachment = %{"url" => [%{"href" => @nsfw_url}, @nsfw_url, @sfw_url]}
+ assert NsfwApiPolicy.check_attachment_nsfw(attachment) == {:nsfw, attachment}
+ end
+
+ test "returns {:sfw, _} if all items are SFW" do
+ attachment = %{"url" => [%{"href" => @sfw_url}, @sfw_url, @sfw_url]}
+ assert NsfwApiPolicy.check_attachment_nsfw(attachment) == {:sfw, attachment}
+ end
+
+ test "works with binary URL" do
+ attachment = %{"url" => @nsfw_url}
+ assert NsfwApiPolicy.check_attachment_nsfw(attachment) == {:nsfw, attachment}
+ end
+ end
+
+ describe "check_object_nsfw/1" do
+ test "returns {:nsfw, _} if any items are NSFW" do
+ object = %{"attachment" => [%{"url" => [%{"href" => @nsfw_url}, @sfw_url]}]}
+ assert NsfwApiPolicy.check_object_nsfw(object) == {:nsfw, object}
+ end
+
+ test "returns {:sfw, _} if all items are SFW" do
+ object = %{"attachment" => [%{"url" => [%{"href" => @sfw_url}, @sfw_url]}]}
+ assert NsfwApiPolicy.check_object_nsfw(object) == {:sfw, object}
+ end
+
+ test "works with embedded object" do
+ object = %{"object" => %{"attachment" => [%{"url" => [%{"href" => @nsfw_url}, @sfw_url]}]}}
+ assert NsfwApiPolicy.check_object_nsfw(object) == {:nsfw, object}
+ end
+ end
+
+ describe "unlist/1" do
+ test "unlist addressing" do
+ user = insert(:user)
+
+ object = %{
+ "to" => [Constants.as_public()],
+ "cc" => [user.follower_address, "https://hello.world/users/alex"],
+ "actor" => user.ap_id
+ }
+
+ expected = %{
+ "to" => [user.follower_address],
+ "cc" => [Constants.as_public(), "https://hello.world/users/alex"],
+ "actor" => user.ap_id
+ }
+
+ assert NsfwApiPolicy.unlist(object) == expected
+ end
+
+ test "raise if user isn't found" do
+ object = %{
+ "to" => [Constants.as_public()],
+ "cc" => [],
+ "actor" => "https://hello.world/users/alex"
+ }
+
+ assert_raise(RuntimeError, fn ->
+ NsfwApiPolicy.unlist(object)
+ end)
+ end
+ end
+
+ describe "mark_sensitive/1" do
+ test "adds nsfw tag and marks sensitive" do
+ object = %{"tag" => ["yolo"]}
+ expected = %{"tag" => ["yolo", "nsfw"], "sensitive" => true}
+ assert NsfwApiPolicy.mark_sensitive(object) == expected
+ end
+
+ test "works with embedded object" do
+ object = %{"object" => %{"tag" => ["yolo"]}}
+ expected = %{"object" => %{"tag" => ["yolo", "nsfw"], "sensitive" => true}}
+ assert NsfwApiPolicy.mark_sensitive(object) == expected
+ end
+ end
+
+ describe "filter/1" do
+ setup do
+ user = insert(:user)
+
+ nsfw_object = %{
+ "to" => [Constants.as_public()],
+ "cc" => [user.follower_address],
+ "actor" => user.ap_id,
+ "attachment" => [%{"url" => @nsfw_url}]
+ }
+
+ sfw_object = %{
+ "to" => [Constants.as_public()],
+ "cc" => [user.follower_address],
+ "actor" => user.ap_id,
+ "attachment" => [%{"url" => @sfw_url}]
+ }
+
+ %{user: user, nsfw_object: nsfw_object, sfw_object: sfw_object}
+ end
+
+ test "passes SFW object through", %{sfw_object: object} do
+ {:ok, _} = NsfwApiPolicy.filter(object)
+ end
+
+ test "passes NSFW object through when actions are disabled", %{nsfw_object: object} do
+ clear_config([@policy, :mark_sensitive], false)
+ clear_config([@policy, :unlist], false)
+ clear_config([@policy, :reject], false)
+ {:ok, _} = NsfwApiPolicy.filter(object)
+ end
+
+ test "passes NSFW object through when :threshold is 1", %{nsfw_object: object} do
+ clear_config([@policy, :reject], true)
+ clear_config([@policy, :threshold], 1)
+ {:ok, _} = NsfwApiPolicy.filter(object)
+ end
+
+ test "rejects SFW object through when :threshold is 0", %{sfw_object: object} do
+ clear_config([@policy, :reject], true)
+ clear_config([@policy, :threshold], 0)
+ {:reject, _} = NsfwApiPolicy.filter(object)
+ end
+
+ test "rejects NSFW when :reject is enabled", %{nsfw_object: object} do
+ clear_config([@policy, :reject], true)
+ {:reject, _} = NsfwApiPolicy.filter(object)
+ end
+
+ test "passes NSFW through when :reject is disabled", %{nsfw_object: object} do
+ clear_config([@policy, :reject], false)
+ {:ok, _} = NsfwApiPolicy.filter(object)
+ end
+
+ test "unlists NSFW when :unlist is enabled", %{user: user, nsfw_object: object} do
+ clear_config([@policy, :unlist], true)
+ {:ok, object} = NsfwApiPolicy.filter(object)
+ assert object["to"] == [user.follower_address]
+ end
+
+ test "passes NSFW through when :unlist is disabled", %{nsfw_object: object} do
+ clear_config([@policy, :unlist], false)
+ {:ok, object} = NsfwApiPolicy.filter(object)
+ assert object["to"] == [Constants.as_public()]
+ end
+ end
+end
diff --git a/test/pleroma/web/activity_pub/mrf/quote_to_link_tag_policy_test.exs b/test/pleroma/web/activity_pub/mrf/quote_to_link_tag_policy_test.exs
new file mode 100644
index 0000000000..96b49b6a0e
--- /dev/null
+++ b/test/pleroma/web/activity_pub/mrf/quote_to_link_tag_policy_test.exs
@@ -0,0 +1,73 @@
+# Pleroma: A lightweight social networking server
+# Copyright © 2017-2023 Pleroma Authors
+# SPDX-License-Identifier: AGPL-3.0-only
+
+defmodule Pleroma.Web.ActivityPub.MRF.QuoteToLinkTagPolicyTest do
+ alias Pleroma.Web.ActivityPub.MRF.QuoteToLinkTagPolicy
+
+ use Pleroma.DataCase
+
+ require Pleroma.Constants
+
+ test "Add quote url to Link tag" do
+ quote_url = "https://gleasonator.com/objects/1234"
+
+ activity = %{
+ "type" => "Create",
+ "actor" => "https://gleasonator.com/users/alex",
+ "object" => %{
+ "type" => "Note",
+ "content" => "Nice post",
+ "quoteUrl" => quote_url
+ }
+ }
+
+ {:ok, %{"object" => object}} = QuoteToLinkTagPolicy.filter(activity)
+
+ assert object["tag"] == [
+ %{
+ "type" => "Link",
+ "href" => quote_url,
+ "mediaType" => Pleroma.Constants.activity_json_canonical_mime_type()
+ }
+ ]
+ end
+
+ test "Add quote url to Link tag, append to the end" do
+ quote_url = "https://gleasonator.com/objects/1234"
+
+ activity = %{
+ "type" => "Create",
+ "actor" => "https://gleasonator.com/users/alex",
+ "object" => %{
+ "type" => "Note",
+ "content" => "Nice post",
+ "quoteUrl" => quote_url,
+ "tag" => [%{"type" => "Hashtag", "name" => "#foo"}]
+ }
+ }
+
+ {:ok, %{"object" => object}} = QuoteToLinkTagPolicy.filter(activity)
+
+ assert [_, tag] = object["tag"]
+
+ assert tag == %{
+ "type" => "Link",
+ "href" => quote_url,
+ "mediaType" => Pleroma.Constants.activity_json_canonical_mime_type()
+ }
+ end
+
+ test "Bypass posts without quoteUrl" do
+ activity = %{
+ "type" => "Create",
+ "actor" => "https://gleasonator.com/users/alex",
+ "object" => %{
+ "type" => "Note",
+ "content" => "Nice post"
+ }
+ }
+
+ assert {:ok, ^activity} = QuoteToLinkTagPolicy.filter(activity)
+ end
+end
diff --git a/test/pleroma/web/activity_pub/mrf/steal_emoji_policy_test.exs b/test/pleroma/web/activity_pub/mrf/steal_emoji_policy_test.exs
index 89d32352f6..2c7497da51 100644
--- a/test/pleroma/web/activity_pub/mrf/steal_emoji_policy_test.exs
+++ b/test/pleroma/web/activity_pub/mrf/steal_emoji_policy_test.exs
@@ -60,6 +60,59 @@ test "Steals emoji on unknown shortcode from allowed remote host", %{
|> File.exists?()
end
+ test "works with unknown extension", %{path: path} do
+ message = %{
+ "type" => "Create",
+ "object" => %{
+ "emoji" => [{"firedfox", "https://example.org/emoji/firedfox"}],
+ "actor" => "https://example.org/users/admin"
+ }
+ }
+
+ fullpath = Path.join(path, "firedfox.png")
+
+ Tesla.Mock.mock(fn %{method: :get, url: "https://example.org/emoji/firedfox"} ->
+ %Tesla.Env{status: 200, body: File.read!("test/fixtures/image.jpg")}
+ end)
+
+ clear_config(:mrf_steal_emoji, hosts: ["example.org"], size_limit: 284_468)
+
+ refute "firedfox" in installed()
+ refute File.exists?(path)
+
+ assert {:ok, _message} = StealEmojiPolicy.filter(message)
+
+ assert "firedfox" in installed()
+ assert File.exists?(path)
+ assert File.exists?(fullpath)
+ end
+
+ test "rejects invalid shortcodes", %{path: path} do
+ message = %{
+ "type" => "Create",
+ "object" => %{
+ "emoji" => [{"fired/fox", "https://example.org/emoji/firedfox"}],
+ "actor" => "https://example.org/users/admin"
+ }
+ }
+
+ fullpath = Path.join(path, "fired/fox.png")
+
+ Tesla.Mock.mock(fn %{method: :get, url: "https://example.org/emoji/firedfox"} ->
+ %Tesla.Env{status: 200, body: File.read!("test/fixtures/image.jpg")}
+ end)
+
+ clear_config(:mrf_steal_emoji, hosts: ["example.org"], size_limit: 284_468)
+
+ refute "firedfox" in installed()
+ refute File.exists?(path)
+
+ assert {:ok, _message} = StealEmojiPolicy.filter(message)
+
+ refute "fired/fox" in installed()
+ refute File.exists?(fullpath)
+ end
+
test "reject regex shortcode", %{message: message} do
refute "firedfox" in installed()
diff --git a/test/pleroma/web/activity_pub/mrf/utils_test.exs b/test/pleroma/web/activity_pub/mrf/utils_test.exs
new file mode 100644
index 0000000000..3bbc2cfd3e
--- /dev/null
+++ b/test/pleroma/web/activity_pub/mrf/utils_test.exs
@@ -0,0 +1,19 @@
+# Pleroma: A lightweight social networking server
+# Copyright © 2017-2023 Pleroma Authors
+# SPDX-License-Identifier: AGPL-3.0-only
+
+defmodule Pleroma.Web.ActivityPub.MRF.UtilsTest do
+ use Pleroma.DataCase, async: true
+
+ alias Pleroma.Web.ActivityPub.MRF.Utils
+
+ describe "describe_regex_or_string/1" do
+ test "describes regex" do
+ assert "~r/foo/i" == Utils.describe_regex_or_string(~r/foo/i)
+ end
+
+ test "returns string as-is" do
+ assert "foo" == Utils.describe_regex_or_string("foo")
+ end
+ end
+end
diff --git a/test/pleroma/web/activity_pub/mrf_test.exs b/test/pleroma/web/activity_pub/mrf_test.exs
index 8d14e976a2..3ead737928 100644
--- a/test/pleroma/web/activity_pub/mrf_test.exs
+++ b/test/pleroma/web/activity_pub/mrf_test.exs
@@ -1,10 +1,13 @@
# Pleroma: A lightweight social networking server
-# Copyright © 2017-2022 Pleroma Authors
+# Copyright © 2017-2023 Pleroma Authors
# SPDX-License-Identifier: AGPL-3.0-only
defmodule Pleroma.Web.ActivityPub.MRFTest do
- use ExUnit.Case, async: true
+ use ExUnit.Case
use Pleroma.Tests.Helpers
+
+ import ExUnit.CaptureLog
+
alias Pleroma.Web.ActivityPub.MRF
test "subdomains_regex/1" do
@@ -61,6 +64,14 @@ test "matches are case-insensitive" do
refute MRF.subdomain_match?(regexes, "EXAMPLE.COM")
refute MRF.subdomain_match?(regexes, "example.com")
end
+
+ @tag capture_log: true
+ test "logs sensible error on accidental wildcard" do
+ assert_raise Regex.CompileError, fn ->
+ assert capture_log(MRF.subdomains_regex(["*unsafe.tld"])) =~
+ "MRF: Invalid subdomain Regex: *unsafe.tld"
+ end
+ end
end
describe "instance_list_from_tuples/1" do
diff --git a/test/pleroma/web/activity_pub/object_validators/article_note_page_validator_test.exs b/test/pleroma/web/activity_pub/object_validators/article_note_page_validator_test.exs
index c7a62be18f..2b33950d6b 100644
--- a/test/pleroma/web/activity_pub/object_validators/article_note_page_validator_test.exs
+++ b/test/pleroma/web/activity_pub/object_validators/article_note_page_validator_test.exs
@@ -93,6 +93,17 @@ test "a Note from Roadhouse validates" do
%{valid?: true} = ArticleNotePageValidator.cast_and_validate(note)
end
+ test "a Note from Convergence AP Bridge validates" do
+ insert(:user, ap_id: "https://cc.mkdir.uk/ap/acct/hiira")
+
+ note =
+ "test/fixtures/ccworld-ap-bridge_note.json"
+ |> File.read!()
+ |> Jason.decode!()
+
+ %{valid?: true} = ArticleNotePageValidator.cast_and_validate(note)
+ end
+
test "a note with an attachment should work", _ do
insert(:user, %{ap_id: "https://owncast.localhost.localdomain/federation/user/streamer"})
@@ -116,4 +127,53 @@ test "a Note without replies/first/items validates" do
%{valid?: true} = ArticleNotePageValidator.cast_and_validate(note)
end
+
+ test "Fedibird quote post" do
+ insert(:user, ap_id: "https://fedibird.com/users/noellabo")
+
+ data = File.read!("test/fixtures/quote_post/fedibird_quote_post.json") |> Jason.decode!()
+ cng = ArticleNotePageValidator.cast_and_validate(data)
+
+ assert cng.valid?
+ assert cng.changes.quoteUrl == "https://misskey.io/notes/8vsn2izjwh"
+ end
+
+ test "Fedibird quote post with quoteUri field" do
+ insert(:user, ap_id: "https://fedibird.com/users/noellabo")
+
+ data = File.read!("test/fixtures/quote_post/fedibird_quote_uri.json") |> Jason.decode!()
+ cng = ArticleNotePageValidator.cast_and_validate(data)
+
+ assert cng.valid?
+ assert cng.changes.quoteUrl == "https://fedibird.com/users/yamako/statuses/107699333438289729"
+ end
+
+ test "Misskey quote post" do
+ insert(:user, ap_id: "https://misskey.io/users/7rkrarq81i")
+
+ data = File.read!("test/fixtures/quote_post/misskey_quote_post.json") |> Jason.decode!()
+ cng = ArticleNotePageValidator.cast_and_validate(data)
+
+ assert cng.valid?
+ assert cng.changes.quoteUrl == "https://misskey.io/notes/8vs6wxufd0"
+ end
+
+ test "Parse tag as quote" do
+ # https://codeberg.org/fediverse/fep/src/branch/main/fep/e232/fep-e232.md
+
+ insert(:user, ap_id: "https://server.example/users/1")
+
+ data = File.read!("test/fixtures/quote_post/fep-e232-tag-example.json") |> Jason.decode!()
+ cng = ArticleNotePageValidator.cast_and_validate(data)
+
+ assert cng.valid?
+ assert cng.changes.quoteUrl == "https://server.example/objects/123"
+
+ assert Enum.at(cng.changes.tag, 0).changes == %{
+ type: "Link",
+ mediaType: "application/ld+json; profile=\"https://www.w3.org/ns/activitystreams\"",
+ href: "https://server.example/objects/123",
+ name: "RE: https://server.example/objects/123"
+ }
+ end
end
diff --git a/test/pleroma/web/activity_pub/object_validators/attachment_validator_test.exs b/test/pleroma/web/activity_pub/object_validators/attachment_validator_test.exs
index 77f2044e97..6627fa6db6 100644
--- a/test/pleroma/web/activity_pub/object_validators/attachment_validator_test.exs
+++ b/test/pleroma/web/activity_pub/object_validators/attachment_validator_test.exs
@@ -5,9 +5,11 @@
defmodule Pleroma.Web.ActivityPub.ObjectValidators.AttachmentValidatorTest do
use Pleroma.DataCase, async: true
+ alias Pleroma.UnstubbedConfigMock, as: ConfigMock
alias Pleroma.Web.ActivityPub.ActivityPub
alias Pleroma.Web.ActivityPub.ObjectValidators.AttachmentValidator
+ import Mox
import Pleroma.Factory
describe "attachments" do
@@ -25,19 +27,22 @@ test "fails without url" do
end
test "works with honkerific attachments" do
- attachment = %{
+ honk = %{
"mediaType" => "",
- "name" => "",
- "summary" => "298p3RG7j27tfsZ9RQ.jpg",
+ "summary" => "Select your spirit chonk",
+ "name" => "298p3RG7j27tfsZ9RQ.jpg",
"type" => "Document",
"url" => "https://honk.tedunangst.com/d/298p3RG7j27tfsZ9RQ.jpg"
}
assert {:ok, attachment} =
- AttachmentValidator.cast_and_validate(attachment)
+ honk
+ |> AttachmentValidator.cast_and_validate()
|> Ecto.Changeset.apply_action(:insert)
assert attachment.mediaType == "application/octet-stream"
+ assert attachment.summary == "Select your spirit chonk"
+ assert attachment.name == "298p3RG7j27tfsZ9RQ.jpg"
end
test "works with an unknown but valid mime type" do
@@ -116,6 +121,9 @@ test "it handles our own uploads" do
filename: "an_image.jpg"
}
+ ConfigMock
+ |> stub_with(Pleroma.Test.StaticConfig)
+
{:ok, attachment} = ActivityPub.upload(file, actor: user.ap_id)
{:ok, attachment} =
@@ -159,7 +167,7 @@ test "it handles image dimensions" do
assert attachment.mediaType == "image/jpeg"
end
- test "it transforms image dimentions to our internal format" do
+ test "it transforms image dimensions to our internal format" do
attachment = %{
"type" => "Document",
"name" => "Hello world",
diff --git a/test/pleroma/web/activity_pub/object_validators/chat_validation_test.exs b/test/pleroma/web/activity_pub/object_validators/chat_validation_test.exs
index 8192efe972..301fed60d0 100644
--- a/test/pleroma/web/activity_pub/object_validators/chat_validation_test.exs
+++ b/test/pleroma/web/activity_pub/object_validators/chat_validation_test.exs
@@ -5,11 +5,13 @@
defmodule Pleroma.Web.ActivityPub.ObjectValidators.ChatValidationTest do
use Pleroma.DataCase
alias Pleroma.Object
+ alias Pleroma.UnstubbedConfigMock, as: ConfigMock
alias Pleroma.Web.ActivityPub.ActivityPub
alias Pleroma.Web.ActivityPub.Builder
alias Pleroma.Web.ActivityPub.ObjectValidator
alias Pleroma.Web.CommonAPI
+ import Mox
import Pleroma.Factory
describe "chat message create activities" do
@@ -82,6 +84,9 @@ test "validates for a basic object with an attachment", %{
filename: "an_image.jpg"
}
+ ConfigMock
+ |> stub_with(Pleroma.Test.StaticConfig)
+
{:ok, attachment} = ActivityPub.upload(file, actor: user.ap_id)
valid_chat_message =
@@ -103,6 +108,9 @@ test "validates for a basic object with an attachment in an array", %{
filename: "an_image.jpg"
}
+ ConfigMock
+ |> stub_with(Pleroma.Test.StaticConfig)
+
{:ok, attachment} = ActivityPub.upload(file, actor: user.ap_id)
valid_chat_message =
@@ -124,6 +132,9 @@ test "validates for a basic object with an attachment but without content", %{
filename: "an_image.jpg"
}
+ ConfigMock
+ |> stub_with(Pleroma.Test.StaticConfig)
+
{:ok, attachment} = ActivityPub.upload(file, actor: user.ap_id)
valid_chat_message =
@@ -136,6 +147,21 @@ test "validates for a basic object with an attachment but without content", %{
assert object["attachment"]
end
+ test "validates for a basic object with content but attachment set to empty array", %{
+ user: user,
+ recipient: recipient
+ } do
+ {:ok, valid_chat_message, _} = Builder.chat_message(user, recipient.ap_id, "Hello!")
+
+ valid_chat_message =
+ valid_chat_message
+ |> Map.put("attachment", [])
+
+ assert {:ok, object, _meta} = ObjectValidator.validate(valid_chat_message, [])
+
+ assert object == Map.drop(valid_chat_message, ["attachment"])
+ end
+
test "does not validate if the message has no content", %{
valid_chat_message: valid_chat_message
} do
diff --git a/test/pleroma/web/activity_pub/object_validators/emoji_react_handling_test.exs b/test/pleroma/web/activity_pub/object_validators/emoji_react_handling_test.exs
index bbdb09c4cd..9bb291a38a 100644
--- a/test/pleroma/web/activity_pub/object_validators/emoji_react_handling_test.exs
+++ b/test/pleroma/web/activity_pub/object_validators/emoji_react_handling_test.exs
@@ -38,16 +38,70 @@ test "it is not valid without a 'content' field", %{valid_emoji_react: valid_emo
assert {:content, {"can't be blank", [validation: :required]}} in cng.errors
end
- test "it is not valid with a non-emoji content field", %{valid_emoji_react: valid_emoji_react} do
+ test "it is valid when custom emoji is used", %{valid_emoji_react: valid_emoji_react} do
without_emoji_content =
valid_emoji_react
- |> Map.put("content", "x")
+ |> Map.put("content", ":hello:")
+ |> Map.put("tag", [
+ %{
+ "type" => "Emoji",
+ "name" => ":hello:",
+ "icon" => %{"url" => "http://somewhere", "type" => "Image"}
+ }
+ ])
+
+ {:ok, _, _} = ObjectValidator.validate(without_emoji_content, [])
+ end
+
+ test "it is not valid when custom emoji don't have a matching tag", %{
+ valid_emoji_react: valid_emoji_react
+ } do
+ without_emoji_content =
+ valid_emoji_react
+ |> Map.put("content", ":hello:")
+ |> Map.put("tag", [
+ %{
+ "type" => "Emoji",
+ "name" => ":whoops:",
+ "icon" => %{"url" => "http://somewhere", "type" => "Image"}
+ }
+ ])
{:error, cng} = ObjectValidator.validate(without_emoji_content, [])
refute cng.valid?
- assert {:content, {"must be a single character emoji", []}} in cng.errors
+ assert {:tag, {"does not contain an Emoji tag", []}} in cng.errors
+ end
+
+ test "it is not valid when custom emoji have no tags", %{
+ valid_emoji_react: valid_emoji_react
+ } do
+ without_emoji_content =
+ valid_emoji_react
+ |> Map.put("content", ":hello:")
+ |> Map.put("tag", [])
+
+ {:error, cng} = ObjectValidator.validate(without_emoji_content, [])
+
+ refute cng.valid?
+
+ assert {:tag, {"does not contain an Emoji tag", []}} in cng.errors
+ end
+
+ test "it is not valid when custom emoji doesn't match a shortcode format", %{
+ valid_emoji_react: valid_emoji_react
+ } do
+ without_emoji_content =
+ valid_emoji_react
+ |> Map.put("content", "hello")
+ |> Map.put("tag", [])
+
+ {:error, cng} = ObjectValidator.validate(without_emoji_content, [])
+
+ refute cng.valid?
+
+ assert {:tag, {"does not contain an Emoji tag", []}} in cng.errors
end
end
end
diff --git a/test/pleroma/web/activity_pub/publisher_test.exs b/test/pleroma/web/activity_pub/publisher_test.exs
index e2db3d5754..870f1f77a7 100644
--- a/test/pleroma/web/activity_pub/publisher_test.exs
+++ b/test/pleroma/web/activity_pub/publisher_test.exs
@@ -25,6 +25,17 @@ defmodule Pleroma.Web.ActivityPub.PublisherTest do
setup_all do: clear_config([:instance, :federating], true)
+ describe "should_federate?/1" do
+ test "it returns false when the inbox is nil" do
+ refute Publisher.should_federate?(nil, false)
+ refute Publisher.should_federate?(nil, true)
+ end
+
+ test "it returns true when public is true" do
+ assert Publisher.should_federate?(false, true)
+ end
+ end
+
describe "gather_webfinger_links/1" do
test "it returns links" do
user = insert(:user)
@@ -205,6 +216,7 @@ test "publish to url with with different ports" do
refute called(Instances.set_reachable(inbox))
end
+ @tag capture_log: true
test_with_mock "calls `Instances.set_unreachable` on target inbox on non-2xx HTTP response code",
Instances,
[:passthrough],
@@ -212,7 +224,8 @@ test "publish to url with with different ports" do
actor = insert(:user)
inbox = "http://404.site/users/nick1/inbox"
- assert {:error, _} = Publisher.publish_one(%{inbox: inbox, json: "{}", actor: actor, id: 1})
+ assert {:discard, _} =
+ Publisher.publish_one(%{inbox: inbox, json: "{}", actor: actor, id: 1})
assert called(Instances.set_unreachable(inbox))
end
@@ -268,7 +281,7 @@ test "publish to url with with different ports" do
describe "publish/2" do
test_with_mock "doesn't publish a non-public activity to quarantined instances.",
- Pleroma.Web.Federator.Publisher,
+ Pleroma.Web.ActivityPub.Publisher,
[:passthrough],
[] do
Config.put([:instance, :quarantined_instances], [{"domain.com", "some reason"}])
@@ -276,8 +289,7 @@ test "publish to url with with different ports" do
follower =
insert(:user, %{
local: false,
- inbox: "https://domain.com/users/nick1/inbox",
- ap_enabled: true
+ inbox: "https://domain.com/users/nick1/inbox"
})
actor = insert(:user, follower_address: follower.ap_id)
@@ -296,7 +308,7 @@ test "publish to url with with different ports" do
assert res == :ok
assert not called(
- Pleroma.Web.Federator.Publisher.enqueue_one(Publisher, %{
+ Publisher.enqueue_one(%{
inbox: "https://domain.com/users/nick1/inbox",
actor_id: actor.id,
id: note_activity.data["id"]
@@ -305,7 +317,7 @@ test "publish to url with with different ports" do
end
test_with_mock "Publishes a non-public activity to non-quarantined instances.",
- Pleroma.Web.Federator.Publisher,
+ Pleroma.Web.ActivityPub.Publisher,
[:passthrough],
[] do
Config.put([:instance, :quarantined_instances], [{"somedomain.com", "some reason"}])
@@ -313,8 +325,7 @@ test "publish to url with with different ports" do
follower =
insert(:user, %{
local: false,
- inbox: "https://domain.com/users/nick1/inbox",
- ap_enabled: true
+ inbox: "https://domain.com/users/nick1/inbox"
})
actor = insert(:user, follower_address: follower.ap_id)
@@ -333,23 +344,49 @@ test "publish to url with with different ports" do
assert res == :ok
assert called(
- Pleroma.Web.Federator.Publisher.enqueue_one(Publisher, %{
- inbox: "https://domain.com/users/nick1/inbox",
- actor_id: actor.id,
- id: note_activity.data["id"]
- })
+ Publisher.enqueue_one(
+ %{
+ inbox: "https://domain.com/users/nick1/inbox",
+ actor_id: actor.id,
+ id: note_activity.data["id"]
+ },
+ priority: 1
+ )
+ )
+ end
+
+ test_with_mock "Publishes to directly addressed actors with higher priority.",
+ Pleroma.Web.ActivityPub.Publisher,
+ [:passthrough],
+ [] do
+ note_activity = insert(:direct_note_activity)
+
+ actor = Pleroma.User.get_by_ap_id(note_activity.data["actor"])
+
+ res = Publisher.publish(actor, note_activity)
+
+ assert res == :ok
+
+ assert called(
+ Publisher.enqueue_one(
+ %{
+ inbox: :_,
+ actor_id: actor.id,
+ id: note_activity.data["id"]
+ },
+ priority: 0
+ )
)
end
test_with_mock "publishes an activity with BCC to all relevant peers.",
- Pleroma.Web.Federator.Publisher,
+ Pleroma.Web.ActivityPub.Publisher,
[:passthrough],
[] do
follower =
insert(:user, %{
local: false,
- inbox: "https://domain.com/users/nick1/inbox",
- ap_enabled: true
+ inbox: "https://domain.com/users/nick1/inbox"
})
actor = insert(:user, follower_address: follower.ap_id)
@@ -367,7 +404,7 @@ test "publish to url with with different ports" do
assert res == :ok
assert called(
- Pleroma.Web.Federator.Publisher.enqueue_one(Publisher, %{
+ Publisher.enqueue_one(%{
inbox: "https://domain.com/users/nick1/inbox",
actor_id: actor.id,
id: note_activity.data["id"]
@@ -376,21 +413,19 @@ test "publish to url with with different ports" do
end
test_with_mock "publishes a delete activity to peers who signed fetch requests to the create acitvity/object.",
- Pleroma.Web.Federator.Publisher,
+ Pleroma.Web.ActivityPub.Publisher,
[:passthrough],
[] do
fetcher =
insert(:user,
local: false,
- inbox: "https://domain.com/users/nick1/inbox",
- ap_enabled: true
+ inbox: "https://domain.com/users/nick1/inbox"
)
another_fetcher =
insert(:user,
local: false,
- inbox: "https://domain2.com/users/nick1/inbox",
- ap_enabled: true
+ inbox: "https://domain2.com/users/nick1/inbox"
)
actor = insert(:user)
@@ -419,19 +454,25 @@ test "publish to url with with different ports" do
assert res == :ok
assert called(
- Pleroma.Web.Federator.Publisher.enqueue_one(Publisher, %{
- inbox: "https://domain.com/users/nick1/inbox",
- actor_id: actor.id,
- id: delete.data["id"]
- })
+ Publisher.enqueue_one(
+ %{
+ inbox: "https://domain.com/users/nick1/inbox",
+ actor_id: actor.id,
+ id: delete.data["id"]
+ },
+ priority: 1
+ )
)
assert called(
- Pleroma.Web.Federator.Publisher.enqueue_one(Publisher, %{
- inbox: "https://domain2.com/users/nick1/inbox",
- actor_id: actor.id,
- id: delete.data["id"]
- })
+ Publisher.enqueue_one(
+ %{
+ inbox: "https://domain2.com/users/nick1/inbox",
+ actor_id: actor.id,
+ id: delete.data["id"]
+ },
+ priority: 1
+ )
)
end
end
diff --git a/test/pleroma/web/activity_pub/side_effects_test.exs b/test/pleroma/web/activity_pub/side_effects_test.exs
index b24831e854..7af50e12cd 100644
--- a/test/pleroma/web/activity_pub/side_effects_test.exs
+++ b/test/pleroma/web/activity_pub/side_effects_test.exs
@@ -17,11 +17,19 @@ defmodule Pleroma.Web.ActivityPub.SideEffectsTest do
alias Pleroma.Web.ActivityPub.ActivityPub
alias Pleroma.Web.ActivityPub.Builder
alias Pleroma.Web.ActivityPub.SideEffects
+ alias Pleroma.Web.ActivityPub.Utils
alias Pleroma.Web.CommonAPI
+ alias Pleroma.Web.CommonAPI.ActivityDraft
import Mock
import Pleroma.Factory
+ defp get_announces_of_object(%{data: %{"id" => id}} = _object) do
+ Pleroma.Activity.Queries.by_type("Announce")
+ |> Pleroma.Activity.Queries.by_object_id(id)
+ |> Pleroma.Repo.all()
+ end
+
describe "handle_after_transaction" do
test "it streams out notifications and streams" do
author = insert(:user, local: true)
@@ -453,7 +461,7 @@ test "adds the reaction to the object", %{emoji_react: emoji_react, user: user}
object = Object.get_by_ap_id(emoji_react.data["object"])
assert object.data["reaction_count"] == 1
- assert ["👌", [user.ap_id]] in object.data["reactions"]
+ assert ["👌", [user.ap_id], nil] in object.data["reactions"]
end
test "creates a notification", %{emoji_react: emoji_react, poster: poster} do
@@ -819,31 +827,6 @@ test "creates a notification", %{announce: announce, poster: poster} do
{:ok, announce, _} = SideEffects.handle(announce)
assert Repo.get_by(Notification, user_id: poster.id, activity_id: announce.id)
end
-
- test "it streams out the announce", %{announce: announce} do
- with_mocks([
- {
- Pleroma.Web.Streamer,
- [],
- [
- stream: fn _, _ -> nil end
- ]
- },
- {
- Pleroma.Web.Push,
- [],
- [
- send: fn _ -> nil end
- ]
- }
- ]) do
- {:ok, announce, _} = SideEffects.handle(announce)
-
- assert called(Pleroma.Web.Streamer.stream(["user", "list"], announce))
-
- assert called(Pleroma.Web.Push.send(:_))
- end
- end
end
describe "removing a follower" do
@@ -915,4 +898,85 @@ test "", %{user: user, followed: followed, reject: reject} do
assert User.get_follow_state(user, followed, nil) == nil
end
end
+
+ describe "Group actors" do
+ setup do
+ poster =
+ insert(:user,
+ local: false,
+ nickname: "poster@example.com",
+ ap_id: "https://example.com/users/poster"
+ )
+
+ group = insert(:user, actor_type: "Group")
+
+ make_create = fn mentioned_users ->
+ mentions = mentioned_users |> Enum.map(fn u -> "@#{u.nickname}" end) |> Enum.join(" ")
+ {:ok, draft} = ActivityDraft.create(poster, %{status: "#{mentions} hey"})
+
+ create_activity_data =
+ Utils.make_create_data(draft.changes |> Map.put(:published, nil), %{})
+ |> put_in(["object", "id"], "https://example.com/object")
+ |> put_in(["id"], "https://example.com/activity")
+
+ assert Enum.all?(mentioned_users, fn u -> u.ap_id in create_activity_data["to"] end)
+
+ create_activity_data
+ end
+
+ %{poster: poster, group: group, make_create: make_create}
+ end
+
+ test "group should boost it", %{make_create: make_create, group: group} do
+ create_activity_data = make_create.([group])
+ {:ok, create_activity, _meta} = ActivityPub.persist(create_activity_data, local: false)
+
+ {:ok, _create_activity, _meta} =
+ SideEffects.handle(create_activity,
+ local: false,
+ object_data: create_activity_data["object"]
+ )
+
+ object = Object.normalize(create_activity, fetch: false)
+ assert [announce] = get_announces_of_object(object)
+ assert announce.actor == group.ap_id
+ end
+
+ test "remote group should not boost it", %{make_create: make_create, group: group} do
+ remote_group =
+ insert(:user, actor_type: "Group", local: false, nickname: "remotegroup@example.com")
+
+ create_activity_data = make_create.([group, remote_group])
+ {:ok, create_activity, _meta} = ActivityPub.persist(create_activity_data, local: false)
+
+ {:ok, _create_activity, _meta} =
+ SideEffects.handle(create_activity,
+ local: false,
+ object_data: create_activity_data["object"]
+ )
+
+ object = Object.normalize(create_activity, fetch: false)
+ assert [announce] = get_announces_of_object(object)
+ assert announce.actor == group.ap_id
+ end
+
+ test "group should not boost it if group is blocking poster", %{
+ make_create: make_create,
+ group: group,
+ poster: poster
+ } do
+ {:ok, _} = CommonAPI.block(group, poster)
+ create_activity_data = make_create.([group])
+ {:ok, create_activity, _meta} = ActivityPub.persist(create_activity_data, local: false)
+
+ {:ok, _create_activity, _meta} =
+ SideEffects.handle(create_activity,
+ local: false,
+ object_data: create_activity_data["object"]
+ )
+
+ object = Object.normalize(create_activity, fetch: false)
+ assert [] = get_announces_of_object(object)
+ end
+ end
end
diff --git a/test/pleroma/web/activity_pub/transmogrifier/emoji_react_handling_test.exs b/test/pleroma/web/activity_pub/transmogrifier/emoji_react_handling_test.exs
index 9d99df27c8..f2e1cefa3e 100644
--- a/test/pleroma/web/activity_pub/transmogrifier/emoji_react_handling_test.exs
+++ b/test/pleroma/web/activity_pub/transmogrifier/emoji_react_handling_test.exs
@@ -34,7 +34,56 @@ test "it works for incoming emoji reactions" do
object = Object.get_by_ap_id(data["object"])
assert object.data["reaction_count"] == 1
- assert match?([["👌", _]], object.data["reactions"])
+ assert match?([["👌", _, nil]], object.data["reactions"])
+ end
+
+ test "it works for incoming custom emoji reactions" do
+ user = insert(:user)
+ other_user = insert(:user, local: false)
+ {:ok, activity} = CommonAPI.post(user, %{status: "hello"})
+
+ data =
+ File.read!("test/fixtures/custom-emoji-reaction.json")
+ |> Jason.decode!()
+ |> Map.put("object", activity.data["object"])
+ |> Map.put("actor", other_user.ap_id)
+
+ {:ok, %Activity{data: data, local: false}} = Transmogrifier.handle_incoming(data)
+
+ assert data["actor"] == other_user.ap_id
+ assert data["type"] == "EmojiReact"
+ assert data["id"] == "https://misskey.local.live/likes/917ocsybgp"
+ assert data["object"] == activity.data["object"]
+ assert data["content"] == ":hanapog:"
+
+ assert data["tag"] == [
+ %{
+ "id" => "https://misskey.local.live/emojis/hanapog",
+ "type" => "Emoji",
+ "name" => "hanapog",
+ "updated" => "2022-06-07T12:00:05.773Z",
+ "icon" => %{
+ "type" => "Image",
+ "url" =>
+ "https://misskey.local.live/files/webpublic-8f8a9768-7264-4171-88d6-2356aabeadcd"
+ }
+ }
+ ]
+
+ object = Object.get_by_ap_id(data["object"])
+
+ assert object.data["reaction_count"] == 1
+
+ assert match?(
+ [
+ [
+ "hanapog",
+ _,
+ "https://misskey.local.live/files/webpublic-8f8a9768-7264-4171-88d6-2356aabeadcd"
+ ]
+ ],
+ object.data["reactions"]
+ )
end
test "it works for incoming unqualified emoji reactions" do
@@ -65,7 +114,7 @@ test "it works for incoming unqualified emoji reactions" do
object = Object.get_by_ap_id(data["object"])
assert object.data["reaction_count"] == 1
- assert match?([[emoji, _]], object.data["reactions"])
+ assert match?([[^emoji, _, _]], object.data["reactions"])
end
test "it reject invalid emoji reactions" do
diff --git a/test/pleroma/web/activity_pub/transmogrifier/image_handling_test.exs b/test/pleroma/web/activity_pub/transmogrifier/image_handling_test.exs
new file mode 100644
index 0000000000..b85f0a4772
--- /dev/null
+++ b/test/pleroma/web/activity_pub/transmogrifier/image_handling_test.exs
@@ -0,0 +1,50 @@
+# Pleroma: A lightweight social networking server
+# Copyright © 2017-2021 Pleroma Authors
+# SPDX-License-Identifier: AGPL-3.0-only
+
+defmodule Pleroma.Web.ActivityPub.Transmogrifier.ImageHandlingTest do
+ use Oban.Testing, repo: Pleroma.Repo
+ use Pleroma.DataCase
+
+ alias Pleroma.Activity
+ alias Pleroma.Object
+ alias Pleroma.Web.ActivityPub.Transmogrifier
+
+ test "Hubzilla Image object" do
+ Tesla.Mock.mock(fn
+ %{url: "https://hub.somaton.com/channel/testc6"} ->
+ %Tesla.Env{
+ status: 200,
+ body: File.read!("test/fixtures/hubzilla-actor.json"),
+ headers: HttpRequestMock.activitypub_object_headers()
+ }
+ end)
+
+ data = File.read!("test/fixtures/hubzilla-create-image.json") |> Poison.decode!()
+
+ {:ok, %Activity{local: false} = activity} = Transmogrifier.handle_incoming(data)
+
+ assert object = Object.normalize(activity, fetch: false)
+
+ assert object.data["to"] == ["https://www.w3.org/ns/activitystreams#Public"]
+
+ assert object.data["cc"] == ["https://hub.somaton.com/followers/testc6"]
+
+ assert object.data["attachment"] == [
+ %{
+ "mediaType" => "image/jpeg",
+ "type" => "Link",
+ "url" => [
+ %{
+ "height" => 2200,
+ "href" =>
+ "https://hub.somaton.com/photo/452583b2-7e1f-4ac3-8334-ff666f134afe-0.jpg",
+ "mediaType" => "image/jpeg",
+ "type" => "Link",
+ "width" => 2200
+ }
+ ]
+ }
+ ]
+ end
+end
diff --git a/test/pleroma/web/activity_pub/transmogrifier/note_handling_test.exs b/test/pleroma/web/activity_pub/transmogrifier/note_handling_test.exs
index 7c406fbd05..2507fa2b01 100644
--- a/test/pleroma/web/activity_pub/transmogrifier/note_handling_test.exs
+++ b/test/pleroma/web/activity_pub/transmogrifier/note_handling_test.exs
@@ -104,6 +104,7 @@ test "it does not fetch reply-to activities beyond max replies depth limit" do
end
end
+ @tag capture_log: true
test "it does not crash if the object in inReplyTo can't be fetched" do
data =
File.read!("test/fixtures/mastodon-post-activity.json")
@@ -220,6 +221,19 @@ test "it works for incoming notices with contentMap" do
"@lain
"
end
+ test "it works for incoming notices with a nil contentMap (firefish)" do
+ data =
+ File.read!("test/fixtures/mastodon-post-activity-contentmap.json")
+ |> Jason.decode!()
+ |> Map.put("contentMap", nil)
+
+ {:ok, %Activity{data: data, local: false}} = Transmogrifier.handle_incoming(data)
+ object = Object.normalize(data["object"], fetch: false)
+
+ assert object.data["content"] ==
+ "@lain
"
+ end
+
test "it works for incoming notices with to/cc not being an array (kroeg)" do
data = File.read!("test/fixtures/kroeg-post-activity.json") |> Jason.decode!()
@@ -507,7 +521,7 @@ test "successfully reserializes a message with AS2 objects in IR" do
[data: data]
end
- test "returns not modified object when hasn't containts inReplyTo field", %{data: data} do
+ test "returns not modified object when has no inReplyTo field", %{data: data} do
assert Transmogrifier.fix_in_reply_to(data) == data
end
@@ -723,6 +737,7 @@ test "the standalone note uses its own ID when context is missing" do
assert modified.data["context"] == object.data["id"]
end
+ @tag capture_log: true
test "the reply note uses its parent's ID when context is missing and reply is unreachable" do
insert(:user, ap_id: "https://mk.absturztau.be/users/8ozbzjs3o8")
diff --git a/test/pleroma/web/activity_pub/transmogrifier/undo_handling_test.exs b/test/pleroma/web/activity_pub/transmogrifier/undo_handling_test.exs
index 846d25cbe1..ea01c92faa 100644
--- a/test/pleroma/web/activity_pub/transmogrifier/undo_handling_test.exs
+++ b/test/pleroma/web/activity_pub/transmogrifier/undo_handling_test.exs
@@ -32,7 +32,7 @@ test "it works for incoming emoji reaction undos" do
assert activity.data["type"] == "Undo"
end
- test "it returns an error for incoming unlikes wihout a like activity" do
+ test "it returns an error for incoming unlikes without a like activity" do
user = insert(:user)
{:ok, activity} = CommonAPI.post(user, %{status: "leave a like pls"})
diff --git a/test/pleroma/web/activity_pub/transmogrifier_test.exs b/test/pleroma/web/activity_pub/transmogrifier_test.exs
index 6b4636d227..a49e459a6d 100644
--- a/test/pleroma/web/activity_pub/transmogrifier_test.exs
+++ b/test/pleroma/web/activity_pub/transmogrifier_test.exs
@@ -8,7 +8,6 @@ defmodule Pleroma.Web.ActivityPub.TransmogrifierTest do
alias Pleroma.Activity
alias Pleroma.Object
- alias Pleroma.Tests.ObanHelpers
alias Pleroma.User
alias Pleroma.Web.ActivityPub.Transmogrifier
alias Pleroma.Web.ActivityPub.Utils
@@ -123,6 +122,40 @@ test "it fixes both the Create and object contexts in a reply" do
assert activity.data["context"] == object.data["context"]
end
+
+ test "it keeps link tags" do
+ insert(:user, ap_id: "https://example.org/users/alice")
+
+ message = File.read!("test/fixtures/fep-e232.json") |> Jason.decode!()
+
+ assert capture_log(fn ->
+ assert {:ok, activity} = Transmogrifier.handle_incoming(message)
+ object = Object.normalize(activity)
+ assert [%{"type" => "Mention"}, %{"type" => "Link"}] = object.data["tag"]
+ end) =~ "Object rejected while fetching"
+ end
+
+ test "it accepts quote posts" do
+ insert(:user, ap_id: "https://misskey.io/users/7rkrarq81i")
+
+ object = File.read!("test/fixtures/quote_post/misskey_quote_post.json") |> Jason.decode!()
+
+ message = %{
+ "@context" => "https://www.w3.org/ns/activitystreams",
+ "type" => "Create",
+ "actor" => "https://misskey.io/users/7rkrarq81i",
+ "object" => object
+ }
+
+ assert {:ok, activity} = Transmogrifier.handle_incoming(message)
+
+ # Object was created in the database
+ object = Object.normalize(activity)
+ assert object.data["quoteUrl"] == "https://misskey.io/notes/8vs6wxufd0"
+
+ # It fetched the quoted post
+ assert Object.normalize("https://misskey.io/notes/8vs6wxufd0")
+ end
end
describe "prepare outgoing" do
@@ -337,68 +370,19 @@ test "Updates of Notes are handled" do
}
} = prepared["object"]
end
- end
- describe "user upgrade" do
- test "it upgrades a user to activitypub" do
- user =
- insert(:user, %{
- nickname: "rye@niu.moe",
- local: false,
- ap_id: "https://niu.moe/users/rye",
- follower_address: User.ap_followers(%User{nickname: "rye@niu.moe"})
- })
+ test "it prepares a quote post" do
+ user = insert(:user)
- user_two = insert(:user)
- Pleroma.FollowingRelationship.follow(user_two, user, :follow_accept)
+ {:ok, quoted_post} = CommonAPI.post(user, %{status: "hey"})
+ {:ok, quote_post} = CommonAPI.post(user, %{status: "hey", quote_id: quoted_post.id})
- {:ok, activity} = CommonAPI.post(user, %{status: "test"})
- {:ok, unrelated_activity} = CommonAPI.post(user_two, %{status: "test"})
- assert "http://localhost:4001/users/rye@niu.moe/followers" in activity.recipients
+ {:ok, modified} = Transmogrifier.prepare_outgoing(quote_post.data)
- user = User.get_cached_by_id(user.id)
- assert user.note_count == 1
+ %{data: %{"id" => quote_id}} = Object.normalize(quoted_post)
- {:ok, user} = Transmogrifier.upgrade_user_from_ap_id("https://niu.moe/users/rye")
- ObanHelpers.perform_all()
-
- assert user.ap_enabled
- assert user.note_count == 1
- assert user.follower_address == "https://niu.moe/users/rye/followers"
- assert user.following_address == "https://niu.moe/users/rye/following"
-
- user = User.get_cached_by_id(user.id)
- assert user.note_count == 1
-
- activity = Activity.get_by_id(activity.id)
- assert user.follower_address in activity.recipients
-
- assert %{
- "url" => [
- %{
- "href" =>
- "https://cdn.niu.moe/accounts/avatars/000/033/323/original/fd7f8ae0b3ffedc9.jpeg"
- }
- ]
- } = user.avatar
-
- assert %{
- "url" => [
- %{
- "href" =>
- "https://cdn.niu.moe/accounts/headers/000/033/323/original/850b3448fa5fd477.png"
- }
- ]
- } = user.banner
-
- refute "..." in activity.recipients
-
- unrelated_activity = Activity.get_by_id(unrelated_activity.id)
- refute user.follower_address in unrelated_activity.recipients
-
- user_two = User.get_cached_by_id(user_two.id)
- assert User.following?(user_two, user)
- refute "..." in User.following(user_two)
+ assert modified["object"]["quoteUrl"] == quote_id
+ assert modified["object"]["quoteUri"] == quote_id
end
end
@@ -426,7 +410,7 @@ test "it rejects activities which reference objects with bogus origins" do
assert capture_log(fn ->
{:error, _} = Transmogrifier.handle_incoming(data)
- end) =~ "Object containment failed"
+ end) =~ "Object rejected while fetching"
end
test "it rejects activities which reference objects that have an incorrect attribution (variant 1)" do
@@ -441,7 +425,7 @@ test "it rejects activities which reference objects that have an incorrect attri
assert capture_log(fn ->
{:error, _} = Transmogrifier.handle_incoming(data)
- end) =~ "Object containment failed"
+ end) =~ "Object rejected while fetching"
end
test "it rejects activities which reference objects that have an incorrect attribution (variant 2)" do
@@ -456,7 +440,7 @@ test "it rejects activities which reference objects that have an incorrect attri
assert capture_log(fn ->
{:error, _} = Transmogrifier.handle_incoming(data)
- end) =~ "Object containment failed"
+ end) =~ "Object rejected while fetching"
end
end
diff --git a/test/pleroma/web/activity_pub/utils_test.exs b/test/pleroma/web/activity_pub/utils_test.exs
index e7d1e01c43..cd61e3e4bb 100644
--- a/test/pleroma/web/activity_pub/utils_test.exs
+++ b/test/pleroma/web/activity_pub/utils_test.exs
@@ -16,6 +16,41 @@ defmodule Pleroma.Web.ActivityPub.UtilsTest do
require Pleroma.Constants
+ describe "strip_report_status_data/1" do
+ test "does not break on issues with the reported activities" do
+ reporter = insert(:user)
+ target_account = insert(:user)
+ {:ok, activity} = CommonAPI.post(target_account, %{status: "foobar"})
+ context = Utils.generate_context_id()
+ content = "foobar"
+ post_id = activity.data["id"]
+
+ res =
+ Utils.make_flag_data(
+ %{
+ actor: reporter,
+ context: context,
+ account: target_account,
+ statuses: [%{"id" => post_id}],
+ content: content
+ },
+ %{}
+ )
+
+ res =
+ res
+ |> Map.put("object", res["object"] ++ [nil, 1, 5, "123"])
+
+ {:ok, activity} = Pleroma.Web.ActivityPub.ActivityPub.insert(res)
+
+ [user_id, object | _] = activity.data["object"]
+
+ {:ok, stripped} = Utils.strip_report_status_data(activity)
+
+ assert stripped.data["object"] == [user_id, object["id"]]
+ end
+ end
+
describe "fetch the latest Follow" do
test "fetches the latest Follow activity" do
%Activity{data: %{"type" => "Follow"}} = activity = insert(:follow_activity)
@@ -118,7 +153,7 @@ test "addresses actor's follower address if the activity is public", %{
assert Enum.sort(cc) == expected_cc
end
- test "does not adress actor's follower address if the activity is not public", %{
+ test "does not address actor's follower address if the activity is not public", %{
user: user,
other_user: other_user,
third_user: third_user
@@ -587,15 +622,38 @@ test "removes actor from announcements" do
end
describe "get_cached_emoji_reactions/1" do
- test "returns the data or an emtpy list" do
+ test "returns the normalized data or an empty list" do
object = insert(:note)
assert Utils.get_cached_emoji_reactions(object) == []
object = insert(:note, data: %{"reactions" => [["x", ["lain"]]]})
- assert Utils.get_cached_emoji_reactions(object) == [["x", ["lain"]]]
+ assert Utils.get_cached_emoji_reactions(object) == [["x", ["lain"], nil]]
object = insert(:note, data: %{"reactions" => %{}})
assert Utils.get_cached_emoji_reactions(object) == []
end
end
+
+ describe "add_emoji_reaction_to_object/1" do
+ test "works with legacy 2-tuple format" do
+ user = insert(:user)
+ other_user = insert(:user)
+ third_user = insert(:user)
+
+ note =
+ insert(:note,
+ user: user,
+ data: %{
+ "reactions" => [["😿", [other_user.ap_id]]]
+ }
+ )
+
+ _activity = insert(:note_activity, user: user, note: note)
+
+ Utils.add_emoji_reaction_to_object(
+ %Activity{data: %{"content" => "😿", "actor" => third_user.ap_id}},
+ note
+ )
+ end
+ end
end
diff --git a/test/pleroma/web/activity_pub/views/user_view_test.exs b/test/pleroma/web/activity_pub/views/user_view_test.exs
index 5f03c019e6..c75149dab7 100644
--- a/test/pleroma/web/activity_pub/views/user_view_test.exs
+++ b/test/pleroma/web/activity_pub/views/user_view_test.exs
@@ -76,12 +76,28 @@ test "renders an invisible user with the invisible property set to true" do
assert %{"invisible" => true} = UserView.render("service.json", %{user: user})
end
+ test "service has a few essential fields" do
+ user = insert(:user)
+ result = UserView.render("service.json", %{user: user})
+ assert result["id"]
+ assert result["type"] == "Application"
+ assert result["inbox"]
+ assert result["outbox"]
+ end
+
test "renders AKAs" do
akas = ["https://i.tusooa.xyz/users/test-pleroma"]
user = insert(:user, also_known_as: akas)
assert %{"alsoKnownAs" => ^akas} = UserView.render("user.json", %{user: user})
end
+ test "renders full nickname" do
+ clear_config([Pleroma.Web.WebFinger, :domain], "plemora.dev")
+
+ user = insert(:user, nickname: "user")
+ assert %{"webfinger" => "acct:user@plemora.dev"} = UserView.render("user.json", %{user: user})
+ end
+
describe "endpoints" do
test "local users have a usable endpoints structure" do
user = insert(:user)
diff --git a/test/pleroma/web/activity_pub/visibility_test.exs b/test/pleroma/web/activity_pub/visibility_test.exs
index 8c4c06a952..fd3dc83a1c 100644
--- a/test/pleroma/web/activity_pub/visibility_test.exs
+++ b/test/pleroma/web/activity_pub/visibility_test.exs
@@ -52,60 +52,60 @@ defmodule Pleroma.Web.ActivityPub.VisibilityTest do
}
end
- test "is_direct?", %{
+ test "direct?", %{
public: public,
private: private,
direct: direct,
unlisted: unlisted,
list: list
} do
- assert Visibility.is_direct?(direct)
- refute Visibility.is_direct?(public)
- refute Visibility.is_direct?(private)
- refute Visibility.is_direct?(unlisted)
- assert Visibility.is_direct?(list)
+ assert Visibility.direct?(direct)
+ refute Visibility.direct?(public)
+ refute Visibility.direct?(private)
+ refute Visibility.direct?(unlisted)
+ assert Visibility.direct?(list)
end
- test "is_public?", %{
+ test "public?", %{
public: public,
private: private,
direct: direct,
unlisted: unlisted,
list: list
} do
- refute Visibility.is_public?(direct)
- assert Visibility.is_public?(public)
- refute Visibility.is_public?(private)
- assert Visibility.is_public?(unlisted)
- refute Visibility.is_public?(list)
+ refute Visibility.public?(direct)
+ assert Visibility.public?(public)
+ refute Visibility.public?(private)
+ assert Visibility.public?(unlisted)
+ refute Visibility.public?(list)
end
- test "is_private?", %{
+ test "private?", %{
public: public,
private: private,
direct: direct,
unlisted: unlisted,
list: list
} do
- refute Visibility.is_private?(direct)
- refute Visibility.is_private?(public)
- assert Visibility.is_private?(private)
- refute Visibility.is_private?(unlisted)
- refute Visibility.is_private?(list)
+ refute Visibility.private?(direct)
+ refute Visibility.private?(public)
+ assert Visibility.private?(private)
+ refute Visibility.private?(unlisted)
+ refute Visibility.private?(list)
end
- test "is_list?", %{
+ test "list?", %{
public: public,
private: private,
direct: direct,
unlisted: unlisted,
list: list
} do
- refute Visibility.is_list?(direct)
- refute Visibility.is_list?(public)
- refute Visibility.is_list?(private)
- refute Visibility.is_list?(unlisted)
- assert Visibility.is_list?(list)
+ refute Visibility.list?(direct)
+ refute Visibility.list?(public)
+ refute Visibility.list?(private)
+ refute Visibility.list?(unlisted)
+ assert Visibility.list?(list)
end
test "visible_for_user? Activity", %{
@@ -227,7 +227,7 @@ test "doesn't die when the user doesn't exist",
} do
Repo.delete(user)
Pleroma.User.invalidate_cache(user)
- refute Visibility.is_private?(direct)
+ refute Visibility.private?(direct)
end
test "get_visibility", %{
diff --git a/test/pleroma/web/admin_api/controllers/admin_api_controller_test.exs b/test/pleroma/web/admin_api/controllers/admin_api_controller_test.exs
index e1ab505426..a7ee8359d0 100644
--- a/test/pleroma/web/admin_api/controllers/admin_api_controller_test.exs
+++ b/test/pleroma/web/admin_api/controllers/admin_api_controller_test.exs
@@ -15,6 +15,7 @@ defmodule Pleroma.Web.AdminAPI.AdminAPIControllerTest do
alias Pleroma.ModerationLog
alias Pleroma.Repo
alias Pleroma.Tests.ObanHelpers
+ alias Pleroma.UnstubbedConfigMock, as: ConfigMock
alias Pleroma.User
alias Pleroma.Web.CommonAPI
@@ -1077,6 +1078,9 @@ test "it requires privileged role :statistics_read", %{conn: conn} do
describe "/api/pleroma/backups" do
test "it creates a backup", %{conn: conn} do
+ ConfigMock
+ |> Mox.stub_with(Pleroma.Config)
+
admin = %{id: admin_id, nickname: admin_nickname} = insert(:user, is_admin: true)
token = insert(:oauth_admin_token, user: admin)
user = %{id: user_id, nickname: user_nickname} = insert(:user)
diff --git a/test/pleroma/web/admin_api/controllers/config_controller_test.exs b/test/pleroma/web/admin_api/controllers/config_controller_test.exs
index 9ef7c0c46c..734aca7526 100644
--- a/test/pleroma/web/admin_api/controllers/config_controller_test.exs
+++ b/test/pleroma/web/admin_api/controllers/config_controller_test.exs
@@ -316,6 +316,7 @@ test "create new config setting in db", %{conn: conn} do
assert Application.get_env(:idna, :key5) == {"string", Pleroma.Captcha.NotReal, []}
end
+ @tag capture_log: true
test "save configs setting without explicit key", %{conn: conn} do
adapter = Application.get_env(:http, :adapter)
send_user_agent = Application.get_env(:http, :send_user_agent)
@@ -872,7 +873,7 @@ test "tuples with more than two values", %{conn: conn} do
%{
"tuple" => [
":_",
- "Phoenix.Endpoint.Cowboy2Handler",
+ "Plug.Cowboy.Handler",
%{"tuple" => ["Pleroma.Web.Endpoint", []]}
]
}
@@ -936,7 +937,7 @@ test "tuples with more than two values", %{conn: conn} do
%{
"tuple" => [
":_",
- "Phoenix.Endpoint.Cowboy2Handler",
+ "Plug.Cowboy.Handler",
%{"tuple" => ["Pleroma.Web.Endpoint", []]}
]
}
@@ -1501,15 +1502,14 @@ test "filters by database configuration whitelist", %{conn: conn} do
clear_config(:database_config_whitelist, [
{:pleroma, :instance},
{:pleroma, :activitypub},
- {:pleroma, Pleroma.Upload},
- {:esshd}
+ {:pleroma, Pleroma.Upload}
])
conn = get(conn, "/api/pleroma/admin/config/descriptions")
children = json_response_and_validate_schema(conn, 200)
- assert length(children) == 4
+ assert length(children) == 3
assert Enum.count(children, fn c -> c["group"] == ":pleroma" end) == 3
@@ -1521,9 +1521,6 @@ test "filters by database configuration whitelist", %{conn: conn} do
web_endpoint = Enum.find(children, fn c -> c["key"] == "Pleroma.Upload" end)
assert web_endpoint["children"]
-
- esshd = Enum.find(children, fn c -> c["group"] == ":esshd" end)
- assert esshd["children"]
end
end
end
diff --git a/test/pleroma/web/admin_api/controllers/frontend_controller_test.exs b/test/pleroma/web/admin_api/controllers/frontend_controller_test.exs
index 38a23b224d..0d1a4999eb 100644
--- a/test/pleroma/web/admin_api/controllers/frontend_controller_test.exs
+++ b/test/pleroma/web/admin_api/controllers/frontend_controller_test.exs
@@ -89,6 +89,7 @@ test "from available frontends", %{conn: conn} do
"build_url" => "http://gensokyo.2hu/builds/${ref}",
"git" => nil,
"installed" => true,
+ "installed_refs" => ["fantasy"],
"name" => "pleroma",
"ref" => "fantasy"
}
diff --git a/test/pleroma/web/admin_api/controllers/media_proxy_cache_controller_test.exs b/test/pleroma/web/admin_api/controllers/media_proxy_cache_controller_test.exs
index 852334a571..de9c201451 100644
--- a/test/pleroma/web/admin_api/controllers/media_proxy_cache_controller_test.exs
+++ b/test/pleroma/web/admin_api/controllers/media_proxy_cache_controller_test.exs
@@ -5,9 +5,11 @@
defmodule Pleroma.Web.AdminAPI.MediaProxyCacheControllerTest do
use Pleroma.Web.ConnCase
- import Pleroma.Factory
import Mock
+ import Mox
+ import Pleroma.Factory
+ alias Pleroma.UnstubbedConfigMock, as: ConfigMock
alias Pleroma.Web.MediaProxy
setup do: clear_config([:media_proxy])
@@ -128,6 +130,9 @@ test "perform invalidates cache of MediaProxy", %{conn: conn} do
"http://example.com/media/fb1f4d.jpg"
]
+ ConfigMock
+ |> stub_with(Pleroma.Test.StaticConfig)
+
with_mocks [
{MediaProxy.Invalidation.Script, [],
[
@@ -150,6 +155,9 @@ test "perform invalidates cache of MediaProxy and adds url to banned", %{conn: c
"http://example.com/media/fb1f4d.jpg"
]
+ ConfigMock
+ |> stub_with(Pleroma.Test.StaticConfig)
+
with_mocks [{MediaProxy.Invalidation.Script, [], [purge: fn _, _ -> {"ok", 0} end]}] do
conn
|> put_req_header("content-type", "application/json")
diff --git a/test/pleroma/web/admin_api/controllers/o_auth_app_controller_test.exs b/test/pleroma/web/admin_api/controllers/o_auth_app_controller_test.exs
index 80646dd25c..10eefbeca2 100644
--- a/test/pleroma/web/admin_api/controllers/o_auth_app_controller_test.exs
+++ b/test/pleroma/web/admin_api/controllers/o_auth_app_controller_test.exs
@@ -163,7 +163,7 @@ test "with id", %{conn: conn} do
assert response == ""
end
- test "with non existance id", %{conn: conn} do
+ test "with nonexistent id", %{conn: conn} do
response =
conn
|> delete("/api/pleroma/admin/oauth_app/0")
diff --git a/test/pleroma/web/admin_api/controllers/report_controller_test.exs b/test/pleroma/web/admin_api/controllers/report_controller_test.exs
index aee26d80ad..b626ddf559 100644
--- a/test/pleroma/web/admin_api/controllers/report_controller_test.exs
+++ b/test/pleroma/web/admin_api/controllers/report_controller_test.exs
@@ -11,6 +11,7 @@ defmodule Pleroma.Web.AdminAPI.ReportControllerTest do
alias Pleroma.ModerationLog
alias Pleroma.Repo
alias Pleroma.ReportNote
+ alias Pleroma.Rule
alias Pleroma.Web.CommonAPI
setup do
@@ -123,6 +124,7 @@ test "returns 404 when report id is invalid", %{conn: conn} do
})
%{
+ reporter: reporter,
id: report_id,
second_report_id: second_report_id
}
@@ -266,6 +268,26 @@ test "updates state of multiple reports", %{
assert ModerationLog.get_log_entry_message(second_log_entry) ==
"@#{admin.nickname} updated report ##{second_report_id} (on user @#{second_activity.user_actor.nickname}) with 'closed' state"
end
+
+ test "works if reporter is deactivated", %{
+ conn: conn,
+ id: id,
+ reporter: reporter
+ } do
+ Pleroma.User.set_activation(reporter, false)
+
+ conn
+ |> put_req_header("content-type", "application/json")
+ |> patch("/api/pleroma/admin/reports", %{
+ "reports" => [
+ %{"state" => "resolved", "id" => id}
+ ]
+ })
+ |> json_response_and_validate_schema(:no_content)
+
+ activity = Activity.get_by_id_with_user_actor(id)
+ assert activity.data["state"] == "resolved"
+ end
end
describe "GET /api/pleroma/admin/reports" do
@@ -366,6 +388,34 @@ test "returns reports with specified state", %{conn: conn} do
|> json_response_and_validate_schema(:ok)
end
+ test "renders content correctly", %{conn: conn} do
+ [reporter, target_user] = insert_pair(:user)
+ note = insert(:note, user: target_user, data: %{"content" => "mew 1"})
+ note2 = insert(:note, user: target_user, data: %{"content" => "mew 2"})
+ activity = insert(:note_activity, user: target_user, note: note)
+ activity2 = insert(:note_activity, user: target_user, note: note2)
+
+ {:ok, _report} =
+ CommonAPI.report(reporter, %{
+ account_id: target_user.id,
+ comment: "I feel offended",
+ status_ids: [activity.id, activity2.id]
+ })
+
+ CommonAPI.delete(activity.id, target_user)
+ CommonAPI.delete(activity2.id, target_user)
+
+ response =
+ conn
+ |> get(report_path(conn, :index))
+ |> json_response_and_validate_schema(:ok)
+
+ assert [open_report] = response["reports"]
+ assert %{"statuses" => [s1, s2]} = open_report
+ assert "mew 1" in [s1["content"], s2["content"]]
+ assert "mew 2" in [s1["content"], s2["content"]]
+ end
+
test "returns 403 when requested by a non-admin" do
user = insert(:user)
token = insert(:oauth_token, user: user)
@@ -387,6 +437,34 @@ test "returns 403 when requested by anonymous" do
"error" => "Invalid credentials."
}
end
+
+ test "returns reports with specified role_id", %{conn: conn} do
+ [reporter, target_user] = insert_pair(:user)
+
+ %{id: rule_id} = Rule.create(%{text: "Example rule"})
+
+ rule_id = to_string(rule_id)
+
+ {:ok, %{id: report_id}} =
+ CommonAPI.report(reporter, %{
+ account_id: target_user.id,
+ comment: "",
+ rule_ids: [rule_id]
+ })
+
+ {:ok, _report} =
+ CommonAPI.report(reporter, %{
+ account_id: target_user.id,
+ comment: ""
+ })
+
+ response =
+ conn
+ |> get("/api/pleroma/admin/reports?rule_id=#{rule_id}")
+ |> json_response_and_validate_schema(:ok)
+
+ assert %{"reports" => [%{"id" => ^report_id}]} = response
+ end
end
describe "POST /api/pleroma/admin/reports/:id/notes" do
diff --git a/test/pleroma/web/admin_api/controllers/rule_controller_test.exs b/test/pleroma/web/admin_api/controllers/rule_controller_test.exs
new file mode 100644
index 0000000000..96b52b2722
--- /dev/null
+++ b/test/pleroma/web/admin_api/controllers/rule_controller_test.exs
@@ -0,0 +1,82 @@
+# Pleroma: A lightweight social networking server
+# Copyright © 2017-2022 Pleroma Authors
+# SPDX-License-Identifier: AGPL-3.0-only
+
+defmodule Pleroma.Web.AdminAPI.RuleControllerTest do
+ use Pleroma.Web.ConnCase, async: true
+
+ import Pleroma.Factory
+
+ alias Pleroma.Rule
+
+ setup do
+ admin = insert(:user, is_admin: true)
+ token = insert(:oauth_admin_token, user: admin)
+
+ conn =
+ build_conn()
+ |> assign(:user, admin)
+ |> assign(:token, token)
+
+ {:ok, %{admin: admin, token: token, conn: conn}}
+ end
+
+ describe "GET /api/pleroma/admin/rules" do
+ test "sorts rules by priority", %{conn: conn} do
+ %{id: id1} = Rule.create(%{text: "Example rule"})
+ %{id: id2} = Rule.create(%{text: "Second rule", priority: 2})
+ %{id: id3} = Rule.create(%{text: "Third rule", priority: 1})
+
+ id1 = to_string(id1)
+ id2 = to_string(id2)
+ id3 = to_string(id3)
+
+ response =
+ conn
+ |> get("/api/pleroma/admin/rules")
+ |> json_response_and_validate_schema(:ok)
+
+ assert [%{"id" => ^id1}, %{"id" => ^id3}, %{"id" => ^id2}] = response
+ end
+ end
+
+ describe "POST /api/pleroma/admin/rules" do
+ test "creates a rule", %{conn: conn} do
+ %{"id" => id} =
+ conn
+ |> put_req_header("content-type", "application/json")
+ |> post("/api/pleroma/admin/rules", %{text: "Example rule"})
+ |> json_response_and_validate_schema(:ok)
+
+ assert %{text: "Example rule"} = Rule.get(id)
+ end
+ end
+
+ describe "PATCH /api/pleroma/admin/rules" do
+ test "edits a rule", %{conn: conn} do
+ %{id: id} = Rule.create(%{text: "Example rule"})
+
+ conn
+ |> put_req_header("content-type", "application/json")
+ |> patch("/api/pleroma/admin/rules/#{id}", %{text: "There are no rules", priority: 2})
+ |> json_response_and_validate_schema(:ok)
+
+ assert %{text: "There are no rules", priority: 2} = Rule.get(id)
+ end
+ end
+
+ describe "DELETE /api/pleroma/admin/rules" do
+ test "deletes a rule", %{conn: conn} do
+ %{id: id} = Rule.create(%{text: "Example rule"})
+
+ conn
+ |> put_req_header("content-type", "application/json")
+ |> delete("/api/pleroma/admin/rules/#{id}")
+ |> json_response_and_validate_schema(:ok)
+
+ assert [] =
+ Rule.query()
+ |> Pleroma.Repo.all()
+ end
+ end
+end
diff --git a/test/pleroma/web/admin_api/controllers/user_controller_test.exs b/test/pleroma/web/admin_api/controllers/user_controller_test.exs
index bb9dcb4aae..8edfda54c3 100644
--- a/test/pleroma/web/admin_api/controllers/user_controller_test.exs
+++ b/test/pleroma/web/admin_api/controllers/user_controller_test.exs
@@ -19,6 +19,11 @@ defmodule Pleroma.Web.AdminAPI.UserControllerTest do
alias Pleroma.Web.Endpoint
alias Pleroma.Web.MediaProxy
+ setup do
+ Mox.stub_with(Pleroma.UnstubbedConfigMock, Pleroma.Config)
+ :ok
+ end
+
setup_all do
Tesla.Mock.mock_global(fn env -> apply(HttpRequestMock, :request, [env]) end)
diff --git a/test/pleroma/web/admin_api/views/report_view_test.exs b/test/pleroma/web/admin_api/views/report_view_test.exs
index 9637c2b90f..1b16aca6a5 100644
--- a/test/pleroma/web/admin_api/views/report_view_test.exs
+++ b/test/pleroma/web/admin_api/views/report_view_test.exs
@@ -7,6 +7,7 @@ defmodule Pleroma.Web.AdminAPI.ReportViewTest do
import Pleroma.Factory
+ alias Pleroma.Rule
alias Pleroma.Web.AdminAPI
alias Pleroma.Web.AdminAPI.Report
alias Pleroma.Web.AdminAPI.ReportView
@@ -38,7 +39,8 @@ test "renders a report" do
statuses: [],
notes: [],
state: "open",
- id: activity.id
+ id: activity.id,
+ rules: []
}
result =
@@ -76,7 +78,8 @@ test "includes reported statuses" do
statuses: [StatusView.render("show.json", %{activity: activity})],
state: "open",
notes: [],
- id: report_activity.id
+ id: report_activity.id,
+ rules: []
}
result =
@@ -168,4 +171,22 @@ test "reports are ordered newest first" do
assert report2.id == rendered |> Enum.at(0) |> Map.get(:id)
assert report1.id == rendered |> Enum.at(1) |> Map.get(:id)
end
+
+ test "renders included rules" do
+ user = insert(:user)
+ other_user = insert(:user)
+
+ %{id: rule_id, text: text} = Rule.create(%{text: "Example rule"})
+
+ rule_id = to_string(rule_id)
+
+ {:ok, activity} =
+ CommonAPI.report(user, %{
+ account_id: other_user.id,
+ rule_ids: [rule_id]
+ })
+
+ assert %{rules: [%{id: ^rule_id, text: ^text}]} =
+ ReportView.render("show.json", Report.extract_report_info(activity))
+ end
end
diff --git a/test/pleroma/web/api_spec/scopes/compiler_test.exs b/test/pleroma/web/api_spec/scopes/compiler_test.exs
new file mode 100644
index 0000000000..99e1d343a9
--- /dev/null
+++ b/test/pleroma/web/api_spec/scopes/compiler_test.exs
@@ -0,0 +1,56 @@
+# Pleroma: A lightweight social networking server
+# Copyright © 2017-2023 Pleroma Authors
+# SPDX-License-Identifier: AGPL-3.0-only
+
+defmodule Pleroma.Web.ApiSpec.Scopes.CompilerTest do
+ use ExUnit.Case, async: true
+
+ alias Pleroma.Web.ApiSpec.Scopes.Compiler
+
+ @dummy_response %{}
+
+ @data %{
+ paths: %{
+ "/mew" => %OpenApiSpex.PathItem{
+ post: %OpenApiSpex.Operation{
+ security: [%{"oAuth" => ["a:b:c"]}],
+ responses: @dummy_response
+ },
+ get: %OpenApiSpex.Operation{security: nil, responses: @dummy_response}
+ },
+ "/mew2" => %OpenApiSpex.PathItem{
+ post: %OpenApiSpex.Operation{
+ security: [%{"oAuth" => ["d:e", "f:g"]}],
+ responses: @dummy_response
+ },
+ get: %OpenApiSpex.Operation{security: nil, responses: @dummy_response}
+ }
+ }
+ }
+
+ describe "process_scope/1" do
+ test "gives all higher-level scopes" do
+ scopes = Compiler.process_scope("admin:read:accounts")
+
+ assert [_, _, _] = scopes
+ assert "admin" in scopes
+ assert "admin:read" in scopes
+ assert "admin:read:accounts" in scopes
+ end
+ end
+
+ describe "extract_all_scopes_from/1" do
+ test "extracts scopes" do
+ scopes = Compiler.extract_all_scopes_from(@data)
+
+ assert [_, _, _, _, _, _, _] = scopes
+ assert "a" in scopes
+ assert "a:b" in scopes
+ assert "a:b:c" in scopes
+ assert "d" in scopes
+ assert "d:e" in scopes
+ assert "f" in scopes
+ assert "f:g" in scopes
+ end
+ end
+end
diff --git a/test/pleroma/web/common_api/activity_draft_test.exs b/test/pleroma/web/common_api/activity_draft_test.exs
new file mode 100644
index 0000000000..02bc6cf3b1
--- /dev/null
+++ b/test/pleroma/web/common_api/activity_draft_test.exs
@@ -0,0 +1,33 @@
+# Pleroma: A lightweight social networking server
+# Copyright © 2017-2021 Pleroma Authors
+# SPDX-License-Identifier: AGPL-3.0-only
+
+defmodule Pleroma.Web.CommonAPI.ActivityDraftTest do
+ use Pleroma.DataCase
+
+ alias Pleroma.Web.CommonAPI
+ alias Pleroma.Web.CommonAPI.ActivityDraft
+
+ import Pleroma.Factory
+
+ test "create/2 with a quote post" do
+ user = insert(:user)
+ another_user = insert(:user)
+
+ {:ok, direct} = CommonAPI.post(user, %{status: ".", visibility: "direct"})
+ {:ok, private} = CommonAPI.post(user, %{status: ".", visibility: "private"})
+ {:ok, unlisted} = CommonAPI.post(user, %{status: ".", visibility: "unlisted"})
+ {:ok, local} = CommonAPI.post(user, %{status: ".", visibility: "local"})
+ {:ok, public} = CommonAPI.post(user, %{status: ".", visibility: "public"})
+
+ {:error, _} = ActivityDraft.create(user, %{status: "nice", quote_id: direct.id})
+ {:ok, _} = ActivityDraft.create(user, %{status: "nice", quote_id: private.id})
+ {:error, _} = ActivityDraft.create(another_user, %{status: "nice", quote_id: private.id})
+ {:ok, _} = ActivityDraft.create(user, %{status: "nice", quote_id: unlisted.id})
+ {:ok, _} = ActivityDraft.create(another_user, %{status: "nice", quote_id: unlisted.id})
+ {:ok, _} = ActivityDraft.create(user, %{status: "nice", quote_id: local.id})
+ {:ok, _} = ActivityDraft.create(another_user, %{status: "nice", quote_id: local.id})
+ {:ok, _} = ActivityDraft.create(user, %{status: "nice", quote_id: public.id})
+ {:ok, _} = ActivityDraft.create(another_user, %{status: "nice", quote_id: public.id})
+ end
+end
diff --git a/test/pleroma/web/common_api/utils_test.exs b/test/pleroma/web/common_api/utils_test.exs
index b538c59794..27b1da1e32 100644
--- a/test/pleroma/web/common_api/utils_test.exs
+++ b/test/pleroma/web/common_api/utils_test.exs
@@ -178,6 +178,10 @@ test "links" do
code = "https://github.com/pragdave/earmark/"
{result, [], []} = Utils.format_input(code, "text/markdown")
assert result == ~s[#{code}
]
+
+ code = "https://github.com/~foo/bar"
+ {result, [], []} = Utils.format_input(code, "text/markdown")
+ assert result == ~s[#{code}
]
end
test "link with local mention" do
@@ -196,7 +200,7 @@ test "local mentions" do
{result, _, []} = Utils.format_input(code, "text/markdown")
assert result ==
- ~s[@mario @luigi yo what’s up?
]
+ ~s[@mario @luigi yo what's up?
]
end
test "remote mentions" do
@@ -207,7 +211,7 @@ test "remote mentions" do
{result, _, []} = Utils.format_input(code, "text/markdown")
assert result ==
- ~s[@mario @luigi yo what’s up?
]
+ ~s[@mario @luigi yo what's up?
]
end
test "raw HTML" do
@@ -225,7 +229,7 @@ test "rulers" do
test "blockquote" do
code = ~s[> whoms't are you quoting?]
{result, [], []} = Utils.format_input(code, "text/markdown")
- assert result == "whoms’t are you quoting?
"
+ assert result == "whoms't are you quoting?
"
end
test "code" do
@@ -582,41 +586,61 @@ test "returns recipients when object not found" do
end
end
- describe "attachments_from_ids_descs/2" do
+ describe "attachments_from_ids_descs/3" do
test "returns [] when attachment ids is empty" do
- assert Utils.attachments_from_ids_descs([], "{}") == []
+ assert Utils.attachments_from_ids_descs([], "{}", nil) == []
end
test "returns list attachments with desc" do
- object = insert(:note)
+ user = insert(:user)
+ object = insert(:attachment, %{user: user})
desc = Jason.encode!(%{object.id => "test-desc"})
- assert Utils.attachments_from_ids_descs(["#{object.id}", "34"], desc) == [
+ assert Utils.attachments_from_ids_descs(["#{object.id}", "34"], desc, user) == [
Map.merge(object.data, %{"name" => "test-desc"})
]
end
end
- describe "attachments_from_ids/1" do
+ describe "attachments_from_ids/2" do
test "returns attachments with descs" do
- object = insert(:note)
+ user = insert(:user)
+ object = insert(:attachment, %{user: user})
desc = Jason.encode!(%{object.id => "test-desc"})
- assert Utils.attachments_from_ids(%{
- media_ids: ["#{object.id}"],
- descriptions: desc
- }) == [
+ assert Utils.attachments_from_ids(
+ %{
+ media_ids: ["#{object.id}"],
+ descriptions: desc
+ },
+ user
+ ) == [
Map.merge(object.data, %{"name" => "test-desc"})
]
end
test "returns attachments without descs" do
- object = insert(:note)
- assert Utils.attachments_from_ids(%{media_ids: ["#{object.id}"]}) == [object.data]
+ user = insert(:user)
+ object = insert(:attachment, %{user: user})
+ assert Utils.attachments_from_ids(%{media_ids: ["#{object.id}"]}, user) == [object.data]
end
test "returns [] when not pass media_ids" do
- assert Utils.attachments_from_ids(%{}) == []
+ assert Utils.attachments_from_ids(%{}, nil) == []
+ end
+
+ test "returns [] when media_ids not belong to current user" do
+ user = insert(:user)
+ user2 = insert(:user)
+
+ object = insert(:attachment, %{user: user})
+
+ assert Utils.attachments_from_ids(%{media_ids: ["#{object.id}"]}, user2) == []
+ end
+
+ test "checks that the object is of upload type" do
+ object = insert(:note)
+ assert Utils.attachments_from_ids(%{media_ids: ["#{object.id}"]}, nil) == []
end
end
diff --git a/test/pleroma/web/common_api_test.exs b/test/pleroma/web/common_api_test.exs
index 44355c26da..58cd1fd42c 100644
--- a/test/pleroma/web/common_api_test.exs
+++ b/test/pleroma/web/common_api_test.exs
@@ -12,6 +12,8 @@ defmodule Pleroma.Web.CommonAPITest do
alias Pleroma.Notification
alias Pleroma.Object
alias Pleroma.Repo
+ alias Pleroma.Rule
+ alias Pleroma.UnstubbedConfigMock, as: ConfigMock
alias Pleroma.User
alias Pleroma.Web.ActivityPub.ActivityPub
alias Pleroma.Web.ActivityPub.Transmogrifier
@@ -20,17 +22,32 @@ defmodule Pleroma.Web.CommonAPITest do
alias Pleroma.Web.CommonAPI
alias Pleroma.Workers.PollWorker
- import Pleroma.Factory
- import Mock
import Ecto.Query, only: [from: 2]
+ import Mock
+ import Mox
+ import Pleroma.Factory
+ require Pleroma.Activity.Queries
require Pleroma.Constants
+ defp get_announces_of_object(%{data: %{"id" => id}} = _object) do
+ Pleroma.Activity.Queries.by_type("Announce")
+ |> Pleroma.Activity.Queries.by_object_id(id)
+ |> Pleroma.Repo.all()
+ end
+
setup_all do
Tesla.Mock.mock_global(fn env -> apply(HttpRequestMock, :request, [env]) end)
:ok
end
+ setup do
+ ConfigMock
+ |> stub_with(Pleroma.Test.StaticConfig)
+
+ :ok
+ end
+
setup do: clear_config([:instance, :safe_dm_mentions])
setup do: clear_config([:instance, :limit])
setup do: clear_config([:instance, :max_pinned_statuses])
@@ -279,6 +296,24 @@ test "it reject messages via MRF" do
assert {:reject, "[KeywordPolicy] Matches with rejected keyword"} ==
CommonAPI.post_chat_message(author, recipient, "GNO/Linux")
end
+
+ test "it reject messages with attachments not belonging to user" do
+ author = insert(:user)
+ not_author = insert(:user)
+ recipient = author
+
+ attachment = insert(:attachment, %{user: not_author})
+
+ {:error, message} =
+ CommonAPI.post_chat_message(
+ author,
+ recipient,
+ "123",
+ media_id: attachment.id
+ )
+
+ assert message == :forbidden
+ end
end
describe "unblocking" do
@@ -393,6 +428,20 @@ test "privileged users deleting non-local posts won't federate the delete" do
refute Activity.get_by_id(post.id)
end
+
+ test "it allows privileged users to delete banned user's posts" do
+ clear_config([:instance, :moderator_privileges], [:messages_delete])
+ user = insert(:user)
+ moderator = insert(:user, is_moderator: true)
+
+ {:ok, post} = CommonAPI.post(user, %{status: "namu amida butsu"})
+ User.set_activation(user, false)
+
+ assert {:ok, delete} = CommonAPI.delete(post.id, moderator)
+ assert delete.local
+
+ refute Activity.get_by_id(post.id)
+ end
end
test "favoriting race condition" do
@@ -458,7 +507,7 @@ test "when replying to a conversation / participation, it will set the correct c
{:ok, convo_reply} =
CommonAPI.post(user, %{status: ".", in_reply_to_conversation_id: participation.id})
- assert Visibility.is_direct?(convo_reply)
+ assert Visibility.direct?(convo_reply)
assert activity.data["context"] == convo_reply.data["context"]
end
@@ -518,6 +567,36 @@ test "it de-duplicates tags" do
assert Object.tags(object) == ["2hu"]
end
+ test "zwnj is treated as word character" do
+ user = insert(:user)
+ {:ok, activity} = CommonAPI.post(user, %{status: "#ساٴينس"})
+
+ object = Object.normalize(activity, fetch: false)
+
+ assert Object.tags(object) == ["ساٴينس"]
+ end
+
+ test "allows lang attribute" do
+ user = insert(:user)
+ text = ~s{something random
}
+
+ {:ok, activity} = CommonAPI.post(user, %{status: text, content_type: "text/html"})
+
+ object = Object.normalize(activity, fetch: false)
+
+ assert object.data["content"] == text
+ end
+
+ test "double dot in link is allowed" do
+ user = insert(:user)
+ text = "https://example.to/something..mp3"
+ {:ok, activity} = CommonAPI.post(user, %{status: text})
+
+ object = Object.normalize(activity, fetch: false)
+
+ assert object.data["content"] == "#{text} "
+ end
+
test "it adds emoji in the object" do
user = insert(:user)
{:ok, activity} = CommonAPI.post(user, %{status: ":firefox:"})
@@ -734,6 +813,65 @@ test "it can handle activities that expire" do
scheduled_at: expires_at
)
end
+
+ test "it allows quote posting" do
+ user = insert(:user)
+
+ {:ok, quoted} = CommonAPI.post(user, %{status: "Hello world"})
+ {:ok, quote_post} = CommonAPI.post(user, %{status: "nice post", quote_id: quoted.id})
+
+ quoted = Object.normalize(quoted)
+ quote_post = Object.normalize(quote_post)
+
+ assert quote_post.data["quoteUrl"] == quoted.data["id"]
+
+ # The OP is not mentioned
+ refute quoted.data["actor"] in quote_post.data["to"]
+ end
+
+ test "quote posting with explicit addressing doesn't mention the OP" do
+ user = insert(:user)
+
+ {:ok, quoted} = CommonAPI.post(user, %{status: "Hello world"})
+
+ {:ok, quote_post} =
+ CommonAPI.post(user, %{status: "nice post", quote_id: quoted.id, to: []})
+
+ assert Object.normalize(quote_post).data["to"] == [Pleroma.Constants.as_public()]
+ end
+
+ test "quote posting visibility" do
+ user = insert(:user)
+ another_user = insert(:user)
+
+ {:ok, direct} = CommonAPI.post(user, %{status: ".", visibility: "direct"})
+ {:ok, private} = CommonAPI.post(user, %{status: ".", visibility: "private"})
+ {:ok, unlisted} = CommonAPI.post(user, %{status: ".", visibility: "unlisted"})
+ {:ok, local} = CommonAPI.post(user, %{status: ".", visibility: "local"})
+ {:ok, public} = CommonAPI.post(user, %{status: ".", visibility: "public"})
+
+ {:error, _} = CommonAPI.post(user, %{status: "nice", quote_id: direct.id})
+ {:ok, _} = CommonAPI.post(user, %{status: "nice", quote_id: private.id})
+ {:error, _} = CommonAPI.post(another_user, %{status: "nice", quote_id: private.id})
+ {:ok, _} = CommonAPI.post(user, %{status: "nice", quote_id: unlisted.id})
+ {:ok, _} = CommonAPI.post(another_user, %{status: "nice", quote_id: unlisted.id})
+ {:ok, _} = CommonAPI.post(user, %{status: "nice", quote_id: local.id})
+ {:ok, _} = CommonAPI.post(another_user, %{status: "nice", quote_id: local.id})
+ {:ok, _} = CommonAPI.post(user, %{status: "nice", quote_id: public.id})
+ {:ok, _} = CommonAPI.post(another_user, %{status: "nice", quote_id: public.id})
+ end
+
+ test "it properly mentions punycode domain" do
+ user = insert(:user)
+
+ _mentioned_user =
+ insert(:user, ap_id: "https://xn--i2raa.com/users/yyy", nickname: "yyy@xn--i2raa.com")
+
+ {:ok, activity} =
+ CommonAPI.post(user, %{status: "hey @yyy@xn--i2raa.com", content_type: "text/markdown"})
+
+ assert "https://xn--i2raa.com/users/yyy" in Object.normalize(activity).data["to"]
+ end
end
describe "reactions" do
@@ -787,7 +925,7 @@ test "repeating a status" do
{:ok, activity} = CommonAPI.post(other_user, %{status: "cofe"})
{:ok, %Activity{} = announce_activity} = CommonAPI.repeat(activity.id, user)
- assert Visibility.is_public?(announce_activity)
+ assert Visibility.public?(announce_activity)
end
test "can't repeat a repeat" do
@@ -809,7 +947,7 @@ test "repeating a status privately" do
{:ok, %Activity{} = announce_activity} =
CommonAPI.repeat(activity.id, user, %{visibility: "private"})
- assert Visibility.is_private?(announce_activity)
+ assert Visibility.private?(announce_activity)
refute Visibility.visible_for_user?(announce_activity, nil)
end
@@ -822,7 +960,7 @@ test "author can repeat own private statuses" do
{:ok, %Activity{} = announce_activity} = CommonAPI.repeat(activity.id, author)
- assert Visibility.is_private?(announce_activity)
+ assert Visibility.private?(announce_activity)
refute Visibility.visible_for_user?(announce_activity, nil)
assert Visibility.visible_for_user?(activity, follower)
@@ -1226,6 +1364,33 @@ test "updates state of multiple reports" do
assert first_report.data["state"] == "resolved"
assert second_report.data["state"] == "resolved"
end
+
+ test "creates a report with provided rules" do
+ reporter = insert(:user)
+ target_user = insert(:user)
+
+ %{id: rule_id} = Rule.create(%{text: "There are no rules"})
+
+ reporter_ap_id = reporter.ap_id
+ target_ap_id = target_user.ap_id
+
+ report_data = %{
+ account_id: target_user.id,
+ rule_ids: [rule_id]
+ }
+
+ assert {:ok, flag_activity} = CommonAPI.report(reporter, report_data)
+
+ assert %Activity{
+ actor: ^reporter_ap_id,
+ data: %{
+ "type" => "Flag",
+ "object" => [^target_ap_id],
+ "state" => "open",
+ "rules" => [^rule_id]
+ }
+ } = flag_activity
+ end
end
describe "reblog muting" do
@@ -1309,7 +1474,7 @@ test "cancels a pending follow for a local user" do
test "cancels a pending follow for a remote user" do
follower = insert(:user)
- followed = insert(:user, is_locked: true, local: false, ap_enabled: true)
+ followed = insert(:user, is_locked: true, local: false)
assert {:ok, follower, followed, %{id: activity_id, data: %{"state" => "pending"}}} =
CommonAPI.follow(follower, followed)
@@ -1467,7 +1632,7 @@ test "post" do
with_mock Pleroma.Web.Federator, publish: fn _ -> :ok end do
{:ok, activity} = CommonAPI.post(user, %{status: "#2hu #2HU", visibility: "local"})
- assert Visibility.is_local_public?(activity)
+ assert Visibility.local_public?(activity)
assert_not_called(Pleroma.Web.Federator.publish(activity))
end
end
@@ -1482,7 +1647,7 @@ test "delete" do
assert {:ok, %Activity{data: %{"deleted_activity_id" => ^activity_id}} = activity} =
CommonAPI.delete(activity_id, user)
- assert Visibility.is_local_public?(activity)
+ assert Visibility.local_public?(activity)
assert_not_called(Pleroma.Web.Federator.publish(activity))
end
end
@@ -1498,7 +1663,7 @@ test "repeat" do
assert {:ok, %Activity{data: %{"type" => "Announce"}} = activity} =
CommonAPI.repeat(activity_id, user)
- assert Visibility.is_local_public?(activity)
+ assert Visibility.local_public?(activity)
refute called(Pleroma.Web.Federator.publish(activity))
end
end
@@ -1516,7 +1681,7 @@ test "unrepeat" do
assert {:ok, %Activity{data: %{"type" => "Undo"}} = activity} =
CommonAPI.unrepeat(activity_id, user)
- assert Visibility.is_local_public?(activity)
+ assert Visibility.local_public?(activity)
refute called(Pleroma.Web.Federator.publish(activity))
end
end
@@ -1531,7 +1696,7 @@ test "favorite" do
assert {:ok, %Activity{data: %{"type" => "Like"}} = activity} =
CommonAPI.favorite(user, activity.id)
- assert Visibility.is_local_public?(activity)
+ assert Visibility.local_public?(activity)
refute called(Pleroma.Web.Federator.publish(activity))
end
end
@@ -1546,7 +1711,7 @@ test "unfavorite" do
with_mock Pleroma.Web.Federator, publish: fn _ -> :ok end do
assert {:ok, activity} = CommonAPI.unfavorite(activity.id, user)
- assert Visibility.is_local_public?(activity)
+ assert Visibility.local_public?(activity)
refute called(Pleroma.Web.Federator.publish(activity))
end
end
@@ -1560,7 +1725,7 @@ test "react_with_emoji" do
assert {:ok, %Activity{data: %{"type" => "EmojiReact"}} = activity} =
CommonAPI.react_with_emoji(activity.id, user, "👍")
- assert Visibility.is_local_public?(activity)
+ assert Visibility.local_public?(activity)
refute called(Pleroma.Web.Federator.publish(activity))
end
end
@@ -1576,7 +1741,7 @@ test "unreact_with_emoji" do
assert {:ok, %Activity{data: %{"type" => "Undo"}} = activity} =
CommonAPI.unreact_with_emoji(activity.id, user, "👍")
- assert Visibility.is_local_public?(activity)
+ assert Visibility.local_public?(activity)
refute called(Pleroma.Web.Federator.publish(activity))
end
end
@@ -1705,4 +1870,54 @@ test "respects MRF" do
assert Map.has_key?(updated_object.data, "updated")
end
end
+
+ describe "Group actors" do
+ setup do
+ poster = insert(:user)
+ group = insert(:user, actor_type: "Group")
+ other_group = insert(:user, actor_type: "Group")
+ %{poster: poster, group: group, other_group: other_group}
+ end
+
+ test "it boosts public posts", %{poster: poster, group: group} do
+ {:ok, post} = CommonAPI.post(poster, %{status: "hey @#{group.nickname}"})
+
+ announces = get_announces_of_object(post.object)
+ assert [_] = announces
+ end
+
+ test "it does not boost private posts", %{poster: poster, group: group} do
+ {:ok, private_post} =
+ CommonAPI.post(poster, %{status: "hey @#{group.nickname}", visibility: "private"})
+
+ assert [] = get_announces_of_object(private_post.object)
+ end
+
+ test "remote groups do not boost any posts", %{poster: poster} do
+ remote_group =
+ insert(:user, actor_type: "Group", local: false, nickname: "remote@example.com")
+
+ {:ok, post} = CommonAPI.post(poster, %{status: "hey @#{User.full_nickname(remote_group)}"})
+ assert remote_group.ap_id in post.data["to"]
+
+ announces = get_announces_of_object(post.object)
+ assert [] = announces
+ end
+
+ test "multiple groups mentioned", %{poster: poster, group: group, other_group: other_group} do
+ {:ok, post} =
+ CommonAPI.post(poster, %{status: "hey @#{group.nickname} @#{other_group.nickname}"})
+
+ announces = get_announces_of_object(post.object)
+ assert [_, _] = announces
+ end
+
+ test "it does not boost if group is blocking poster", %{poster: poster, group: group} do
+ {:ok, _} = CommonAPI.block(group, poster)
+ {:ok, post} = CommonAPI.post(poster, %{status: "hey @#{group.nickname}"})
+
+ announces = get_announces_of_object(post.object)
+ assert [] = announces
+ end
+ end
end
diff --git a/test/pleroma/web/endpoint/metrics_exporter_test.exs b/test/pleroma/web/endpoint/metrics_exporter_test.exs
deleted file mode 100644
index ad236d4cb3..0000000000
--- a/test/pleroma/web/endpoint/metrics_exporter_test.exs
+++ /dev/null
@@ -1,69 +0,0 @@
-# Pleroma: A lightweight social networking server
-# Copyright © 2017-2022 Pleroma Authors
-# SPDX-License-Identifier: AGPL-3.0-only
-
-defmodule Pleroma.Web.Endpoint.MetricsExporterTest do
- # Modifies AppEnv, has to stay synchronous
- use Pleroma.Web.ConnCase
-
- alias Pleroma.Web.Endpoint.MetricsExporter
-
- defp config do
- Application.get_env(:prometheus, MetricsExporter)
- end
-
- describe "with default config" do
- test "does NOT expose app metrics", %{conn: conn} do
- conn
- |> get(config()[:path])
- |> json_response(404)
- end
- end
-
- describe "when enabled" do
- setup do
- initial_config = config()
- on_exit(fn -> Application.put_env(:prometheus, MetricsExporter, initial_config) end)
-
- Application.put_env(
- :prometheus,
- MetricsExporter,
- Keyword.put(initial_config, :enabled, true)
- )
- end
-
- test "serves app metrics", %{conn: conn} do
- conn = get(conn, config()[:path])
- assert response = response(conn, 200)
-
- for metric <- [
- "http_requests_total",
- "http_request_duration_microseconds",
- "phoenix_controller_call_duration",
- "telemetry_scrape_duration",
- "erlang_vm_memory_atom_bytes_total"
- ] do
- assert response =~ ~r/#{metric}/
- end
- end
-
- test "when IP whitelist configured, " <>
- "serves app metrics only if client IP is whitelisted",
- %{conn: conn} do
- Application.put_env(
- :prometheus,
- MetricsExporter,
- Keyword.put(config(), :ip_whitelist, ["127.127.127.127", {1, 1, 1, 1}, '255.255.255.255'])
- )
-
- conn
- |> get(config()[:path])
- |> json_response(404)
-
- conn
- |> Map.put(:remote_ip, {127, 127, 127, 127})
- |> get(config()[:path])
- |> response(200)
- end
- end
-end
diff --git a/test/pleroma/web/fallback_test.exs b/test/pleroma/web/fallback_test.exs
index 6d11d4f371..ed34d64900 100644
--- a/test/pleroma/web/fallback_test.exs
+++ b/test/pleroma/web/fallback_test.exs
@@ -6,20 +6,6 @@ defmodule Pleroma.Web.FallbackTest do
use Pleroma.Web.ConnCase
import Pleroma.Factory
- describe "neither preloaded data nor metadata attached to" do
- test "GET /registration/:token", %{conn: conn} do
- response = get(conn, "/registration/foo")
-
- assert html_response(response, 200) =~ ""
- end
-
- test "GET /*path", %{conn: conn} do
- assert conn
- |> get("/foo")
- |> html_response(200) =~ ""
- end
- end
-
test "GET /*path adds a title", %{conn: conn} do
clear_config([:instance, :name], "a cool title")
@@ -29,21 +15,28 @@ test "GET /*path adds a title", %{conn: conn} do
end
describe "preloaded data and metadata attached to" do
- test "GET /:maybe_nickname_or_id", %{conn: conn} do
+ test "GET /:maybe_nickname_or_id with existing user", %{conn: conn} do
+ clear_config([:instance, :name], "a cool title")
+ user = insert(:user)
+
+ resp = get(conn, "/#{user.nickname}")
+
+ assert html_response(resp, 200) =~ "a cool title "
+ refute html_response(resp, 200) =~ ""
+ assert html_response(resp, 200) =~ "initial-results"
+ end
+
+ test "GET /:maybe_nickname_or_id with missing user", %{conn: conn} do
clear_config([:instance, :name], "a cool title")
- user = insert(:user)
- user_missing = get(conn, "/foo")
- user_present = get(conn, "/#{user.nickname}")
+ resp = get(conn, "/foo")
- assert html_response(user_missing, 200) =~ ""
- refute html_response(user_present, 200) =~ ""
- assert html_response(user_present, 200) =~ "initial-results"
- assert html_response(user_present, 200) =~ "a cool title "
+ assert html_response(resp, 200) =~ "a cool title "
+ refute html_response(resp, 200) =~ "initial-results"
end
test "GET /*path", %{conn: conn} do
- assert conn
+ refute conn
|> get("/foo")
|> html_response(200) =~ ""
@@ -65,10 +58,12 @@ test "GET /main/public", %{conn: conn} do
end
test "GET /main/all", %{conn: conn} do
+ clear_config([:instance, :name], "a cool title")
public_page = get(conn, "/main/all")
refute html_response(public_page, 200) =~ ""
assert html_response(public_page, 200) =~ "initial-results"
+ assert html_response(public_page, 200) =~ "a cool title "
end
end
diff --git a/test/pleroma/web/federator_test.exs b/test/pleroma/web/federator_test.exs
index 41d1c5d5e8..4a398f2392 100644
--- a/test/pleroma/web/federator_test.exs
+++ b/test/pleroma/web/federator_test.exs
@@ -40,6 +40,44 @@ defmodule Pleroma.Web.FederatorTest do
%{activity: activity, relay_mock: relay_mock}
end
+ test "to shared inbox when multiple actors from same instance are recipients" do
+ user = insert(:user)
+
+ shared_inbox = "https://domain.com/inbox"
+
+ follower_one =
+ insert(:user, %{
+ local: false,
+ nickname: "nick1@domain.com",
+ ap_id: "https://domain.com/users/nick1",
+ inbox: "https://domain.com/users/nick1/inbox",
+ shared_inbox: shared_inbox
+ })
+
+ follower_two =
+ insert(:user, %{
+ local: false,
+ nickname: "nick2@domain.com",
+ ap_id: "https://domain.com/users/nick2",
+ inbox: "https://domain.com/users/nick2/inbox",
+ shared_inbox: shared_inbox
+ })
+
+ {:ok, _, _} = Pleroma.User.follow(follower_one, user)
+ {:ok, _, _} = Pleroma.User.follow(follower_two, user)
+
+ {:ok, _activity} = CommonAPI.post(user, %{status: "Happy Friday everyone!"})
+
+ ObanHelpers.perform(all_enqueued(worker: PublisherWorker))
+
+ inboxes =
+ all_enqueued(worker: PublisherWorker)
+ |> Enum.filter(&(get_in(&1, [Access.key(:args), Access.key("op")]) == "publish_one"))
+ |> Enum.map(&get_in(&1, [Access.key(:args), Access.key("params"), Access.key("inbox")]))
+
+ assert [shared_inbox] == inboxes
+ end
+
test "with relays active, it publishes to the relay", %{
activity: activity,
relay_mock: relay_mock
@@ -78,16 +116,14 @@ test "it federates only to reachable instances via AP" do
local: false,
nickname: "nick1@domain.com",
ap_id: "https://domain.com/users/nick1",
- inbox: inbox1,
- ap_enabled: true
+ inbox: inbox1
})
insert(:user, %{
local: false,
nickname: "nick2@domain2.com",
ap_id: "https://domain2.com/users/nick2",
- inbox: inbox2,
- ap_enabled: true
+ inbox: inbox2
})
dt = NaiveDateTime.utc_now()
@@ -133,7 +169,7 @@ test "successfully processes incoming AP docs with correct origin" do
assert {:ok, _activity} = ObanHelpers.perform(job)
assert {:ok, job} = Federator.incoming_ap_doc(params)
- assert {:error, :already_present} = ObanHelpers.perform(job)
+ assert {:cancel, :already_present} = ObanHelpers.perform(job)
end
test "rejects incoming AP docs with incorrect origin" do
diff --git a/test/pleroma/web/feed/user_controller_test.exs b/test/pleroma/web/feed/user_controller_test.exs
index de32d3d4bf..d3c4108de0 100644
--- a/test/pleroma/web/feed/user_controller_test.exs
+++ b/test/pleroma/web/feed/user_controller_test.exs
@@ -57,9 +57,23 @@ defmodule Pleroma.Web.Feed.UserControllerTest do
)
note_activity2 = insert(:note_activity, note: note2)
+
+ note3 =
+ insert(:note,
+ user: user,
+ data: %{
+ "content" => "This note tests whether HTML entities are truncated properly",
+ "summary" => "Won't, didn't fail",
+ "inReplyTo" => note_activity2.id
+ }
+ )
+
+ _note_activity3 = insert(:note_activity, note: note3)
object = Object.normalize(note_activity, fetch: false)
- [user: user, object: object, max_id: note_activity2.id]
+ encoded_title = FeedView.activity_title(note3.data)
+
+ [user: user, object: object, max_id: note_activity2.id, encoded_title: encoded_title]
end
test "gets an atom feed", %{conn: conn, user: user, object: object, max_id: max_id} do
@@ -74,7 +88,7 @@ test "gets an atom feed", %{conn: conn, user: user, object: object, max_id: max_
|> SweetXml.parse()
|> SweetXml.xpath(~x"//entry/title/text()"l)
- assert activity_titles == ['2hu', '2hu & as']
+ assert activity_titles == ['Won\'t, didn\'...', '2hu', '2hu & as']
assert resp =~ FeedView.escape(object.data["content"])
assert resp =~ FeedView.escape(object.data["summary"])
assert resp =~ FeedView.escape(object.data["context"])
@@ -105,7 +119,7 @@ test "gets a rss feed", %{conn: conn, user: user, object: object, max_id: max_id
|> SweetXml.parse()
|> SweetXml.xpath(~x"//item/title/text()"l)
- assert activity_titles == ['2hu', '2hu & as']
+ assert activity_titles == ['Won\'t, didn\'...', '2hu', '2hu & as']
assert resp =~ FeedView.escape(object.data["content"])
assert resp =~ FeedView.escape(object.data["summary"])
assert resp =~ FeedView.escape(object.data["context"])
@@ -176,6 +190,30 @@ test "does not require authentication on non-federating instances", %{conn: conn
|> get("/users/#{user.nickname}/feed.rss")
|> response(200)
end
+
+ test "does not mangle HTML entities midway", %{
+ conn: conn,
+ user: user,
+ object: object,
+ encoded_title: encoded_title
+ } do
+ resp =
+ conn
+ |> put_req_header("accept", "application/atom+xml")
+ |> get(user_feed_path(conn, :feed, user.nickname))
+ |> response(200)
+
+ activity_titles =
+ resp
+ |> SweetXml.parse()
+ |> SweetXml.xpath(~x"//entry/title/text()"l)
+
+ assert activity_titles == ['Won\'t, didn\'...', '2hu', '2hu & as']
+ assert resp =~ FeedView.escape(object.data["content"])
+ assert resp =~ FeedView.escape(object.data["summary"])
+ assert resp =~ FeedView.escape(object.data["context"])
+ assert resp =~ encoded_title
+ end
end
# Note: see ActivityPubControllerTest for JSON format tests
diff --git a/test/pleroma/web/mastodon_api/controllers/account_controller_test.exs b/test/pleroma/web/mastodon_api/controllers/account_controller_test.exs
index 958b7f76f9..e87b339605 100644
--- a/test/pleroma/web/mastodon_api/controllers/account_controller_test.exs
+++ b/test/pleroma/web/mastodon_api/controllers/account_controller_test.exs
@@ -18,6 +18,11 @@ defmodule Pleroma.Web.MastodonAPI.AccountControllerTest do
import Pleroma.Factory
+ setup do
+ Mox.stub_with(Pleroma.UnstubbedConfigMock, Pleroma.Config)
+ :ok
+ end
+
describe "account fetching" do
test "works by id" do
%User{id: user_id} = insert(:user)
@@ -1355,7 +1360,7 @@ test "registers but does not log in with :account_approval_required", %{conn: co
assert user.registration_reason == "I'm a cool dude, bro"
end
- test "returns error when user already registred", %{conn: conn, valid_params: valid_params} do
+ test "returns error when user already registered", %{conn: conn, valid_params: valid_params} do
_user = insert(:user, email: "lain@example.org")
app_token = insert(:oauth_token, user: nil)
@@ -1490,7 +1495,7 @@ test "registration from trusted app" do
|> Plug.Conn.put_req_header("authorization", "Bearer " <> token)
|> put_req_header("content-type", "multipart/form-data")
|> post("/api/v1/accounts", %{
- nickname: "nickanme",
+ nickname: "nickname",
agreement: true,
email: "email@example.com",
fullname: "Lain",
@@ -1776,7 +1781,7 @@ test "language parameter should be normalized", %{conn: conn} do
assert %{language: "ru_RU"} = Pleroma.User.get_by_nickname("foo")
end
- test "createing an account without language parameter should fallback to cookie/header language",
+ test "creating an account without language parameter should fallback to cookie/header language",
%{conn: conn} do
params = %{
username: "foo2",
@@ -2031,6 +2036,39 @@ test "getting a list of blocks" do
assert [%{"id" => ^id1}] = result
end
+ test "list of blocks with with_relationships parameter" do
+ %{user: user, conn: conn} = oauth_access(["read:blocks"])
+ %{id: id1} = other_user1 = insert(:user)
+ %{id: id2} = other_user2 = insert(:user)
+ %{id: id3} = other_user3 = insert(:user)
+
+ {:ok, _, _} = User.follow(other_user1, user)
+ {:ok, _, _} = User.follow(other_user2, user)
+ {:ok, _, _} = User.follow(other_user3, user)
+
+ {:ok, _} = User.block(user, other_user1)
+ {:ok, _} = User.block(user, other_user2)
+ {:ok, _} = User.block(user, other_user3)
+
+ assert [
+ %{
+ "id" => ^id3,
+ "pleroma" => %{"relationship" => %{"blocking" => true, "followed_by" => false}}
+ },
+ %{
+ "id" => ^id2,
+ "pleroma" => %{"relationship" => %{"blocking" => true, "followed_by" => false}}
+ },
+ %{
+ "id" => ^id1,
+ "pleroma" => %{"relationship" => %{"blocking" => true, "followed_by" => false}}
+ }
+ ] =
+ conn
+ |> get("/api/v1/blocks?with_relationships=true")
+ |> json_response_and_validate_schema(200)
+ end
+
test "account lookup", %{conn: conn} do
%{nickname: acct} = insert(:user, %{nickname: "nickname"})
%{nickname: acct_two} = insert(:user, %{nickname: "nickname@notlocaldoma.in"})
@@ -2134,6 +2172,55 @@ test "max pinned accounts", %{user: user, conn: conn} do
end
end
+ describe "familiar followers" do
+ setup do: oauth_access(["read:follows"])
+
+ test "fetch user familiar followers", %{user: user, conn: conn} do
+ %{id: id1} = other_user1 = insert(:user)
+ %{id: id2} = other_user2 = insert(:user)
+ _ = insert(:user)
+
+ User.follow(user, other_user1)
+ User.follow(other_user1, other_user2)
+
+ assert [%{"accounts" => [%{"id" => ^id1}], "id" => ^id2}] =
+ conn
+ |> put_req_header("content-type", "application/json")
+ |> get("/api/v1/accounts/familiar_followers?id[]=#{id2}")
+ |> json_response_and_validate_schema(200)
+ end
+
+ test "returns empty array if followers are hidden", %{user: user, conn: conn} do
+ other_user1 = insert(:user, hide_follows: true)
+ %{id: id2} = other_user2 = insert(:user)
+ _ = insert(:user)
+
+ User.follow(user, other_user1)
+ User.follow(other_user1, other_user2)
+
+ assert [%{"accounts" => [], "id" => ^id2}] =
+ conn
+ |> put_req_header("content-type", "application/json")
+ |> get("/api/v1/accounts/familiar_followers?id[]=#{id2}")
+ |> json_response_and_validate_schema(200)
+ end
+
+ test "it respects hide_followers", %{user: user, conn: conn} do
+ other_user1 = insert(:user)
+ %{id: id2} = other_user2 = insert(:user, hide_followers: true)
+ _ = insert(:user)
+
+ User.follow(user, other_user1)
+ User.follow(other_user1, other_user2)
+
+ assert [%{"accounts" => [], "id" => ^id2}] =
+ conn
+ |> put_req_header("content-type", "application/json")
+ |> get("/api/v1/accounts/familiar_followers?id[]=#{id2}")
+ |> json_response_and_validate_schema(200)
+ end
+ end
+
describe "remove from followers" do
setup do: oauth_access(["follow"])
diff --git a/test/pleroma/web/mastodon_api/controllers/directory_controller_test.exs b/test/pleroma/web/mastodon_api/controllers/directory_controller_test.exs
index f90ef96f9d..40b23a5d6a 100644
--- a/test/pleroma/web/mastodon_api/controllers/directory_controller_test.exs
+++ b/test/pleroma/web/mastodon_api/controllers/directory_controller_test.exs
@@ -3,7 +3,7 @@
# SPDX-License-Identifier: AGPL-3.0-only
defmodule Pleroma.Web.MastodonAPI.DirectoryControllerTest do
- use Pleroma.Web.ConnCase, async: true
+ use Pleroma.Web.ConnCase
alias Pleroma.Web.CommonAPI
import Pleroma.Factory
diff --git a/test/pleroma/web/mastodon_api/controllers/instance_controller_test.exs b/test/pleroma/web/mastodon_api/controllers/instance_controller_test.exs
index 13e3ffc0af..373a84303e 100644
--- a/test/pleroma/web/mastodon_api/controllers/instance_controller_test.exs
+++ b/test/pleroma/web/mastodon_api/controllers/instance_controller_test.exs
@@ -6,6 +6,7 @@ defmodule Pleroma.Web.MastodonAPI.InstanceControllerTest do
# TODO: Should not need Cachex
use Pleroma.Web.ConnCase
+ alias Pleroma.Rule
alias Pleroma.User
import Pleroma.Factory
@@ -40,7 +41,8 @@ test "get instance information", %{conn: conn} do
"banner_upload_limit" => _,
"background_image" => from_config_background,
"shout_limit" => _,
- "description_limit" => _
+ "description_limit" => _,
+ "rules" => _
} = result
assert result["pleroma"]["metadata"]["account_activation_required"] != nil
@@ -92,4 +94,62 @@ test "get peers", %{conn: conn} do
assert ["peer1.com", "peer2.com"] == Enum.sort(result)
end
+
+ test "instance languages", %{conn: conn} do
+ assert %{"languages" => ["en"]} =
+ conn
+ |> get("/api/v1/instance")
+ |> json_response_and_validate_schema(200)
+
+ clear_config([:instance, :languages], ["aa", "bb"])
+
+ assert %{"languages" => ["aa", "bb"]} =
+ conn
+ |> get("/api/v1/instance")
+ |> json_response_and_validate_schema(200)
+ end
+
+ test "get instance contact information", %{conn: conn} do
+ user = insert(:user, %{local: true})
+
+ clear_config([:instance, :contact_username], user.nickname)
+
+ conn = get(conn, "/api/v1/instance")
+
+ assert result = json_response_and_validate_schema(conn, 200)
+
+ assert result["contact_account"]["id"] == user.id
+ end
+
+ test "get instance information v2", %{conn: conn} do
+ clear_config([:auth, :oauth_consumer_strategies], [])
+
+ assert get(conn, "/api/v2/instance")
+ |> json_response_and_validate_schema(200)
+ end
+
+ test "get instance rules", %{conn: conn} do
+ Rule.create(%{text: "Example rule", hint: "Rule description", priority: 1})
+ Rule.create(%{text: "Third rule", priority: 2})
+ Rule.create(%{text: "Second rule", priority: 1})
+
+ conn = get(conn, "/api/v1/instance")
+
+ assert result = json_response_and_validate_schema(conn, 200)
+
+ assert [
+ %{
+ "text" => "Example rule",
+ "hint" => "Rule description"
+ },
+ %{
+ "text" => "Second rule",
+ "hint" => ""
+ },
+ %{
+ "text" => "Third rule",
+ "hint" => ""
+ }
+ ] = result["rules"]
+ end
end
diff --git a/test/pleroma/web/mastodon_api/controllers/media_controller_test.exs b/test/pleroma/web/mastodon_api/controllers/media_controller_test.exs
index 79d52bb2fd..b92fd8afad 100644
--- a/test/pleroma/web/mastodon_api/controllers/media_controller_test.exs
+++ b/test/pleroma/web/mastodon_api/controllers/media_controller_test.exs
@@ -6,8 +6,10 @@ defmodule Pleroma.Web.MastodonAPI.MediaControllerTest do
use Pleroma.Web.ConnCase
import ExUnit.CaptureLog
+ import Mox
alias Pleroma.Object
+ alias Pleroma.UnstubbedConfigMock, as: ConfigMock
alias Pleroma.User
alias Pleroma.Web.ActivityPub.ActivityPub
@@ -15,6 +17,9 @@ defmodule Pleroma.Web.MastodonAPI.MediaControllerTest do
setup do: oauth_access(["write:media"])
setup do
+ ConfigMock
+ |> stub_with(Pleroma.Test.StaticConfig)
+
image = %Plug.Upload{
content_type: "image/jpeg",
path: Path.absname("test/fixtures/image.jpg"),
@@ -122,12 +127,32 @@ test "/api/v2/media, upload_limit", %{conn: conn, user: user} do
assert :ok == File.rm(Path.absname("test/tmp/large_binary.data"))
end
+
+ test "Do not allow nested filename", %{conn: conn, image: image} do
+ image = %Plug.Upload{
+ image
+ | filename: "../../../../../nested/file.jpg"
+ }
+
+ desc = "Description of the image"
+
+ media =
+ conn
+ |> put_req_header("content-type", "multipart/form-data")
+ |> post("/api/v1/media", %{"file" => image, "description" => desc})
+ |> json_response_and_validate_schema(:ok)
+
+ refute Regex.match?(~r"/nested/", media["url"])
+ end
end
describe "Update media description" do
setup do: oauth_access(["write:media"])
setup %{user: actor} do
+ ConfigMock
+ |> stub_with(Pleroma.Test.StaticConfig)
+
file = %Plug.Upload{
content_type: "image/jpeg",
path: Path.absname("test/fixtures/image.jpg"),
@@ -160,6 +185,9 @@ test "/api/v1/media/:id good request", %{conn: conn, object: object} do
setup do: oauth_access(["read:media"])
setup %{user: actor} do
+ ConfigMock
+ |> stub_with(Pleroma.Test.StaticConfig)
+
file = %Plug.Upload{
content_type: "image/jpeg",
path: Path.absname("test/fixtures/image.jpg"),
diff --git a/test/pleroma/web/mastodon_api/controllers/notification_controller_test.exs b/test/pleroma/web/mastodon_api/controllers/notification_controller_test.exs
index 1524df98fa..350b935d78 100644
--- a/test/pleroma/web/mastodon_api/controllers/notification_controller_test.exs
+++ b/test/pleroma/web/mastodon_api/controllers/notification_controller_test.exs
@@ -12,6 +12,11 @@ defmodule Pleroma.Web.MastodonAPI.NotificationControllerTest do
import Pleroma.Factory
+ setup do
+ Mox.stub_with(Pleroma.UnstubbedConfigMock, Pleroma.Config)
+ :ok
+ end
+
test "does NOT render account/pleroma/relationship by default" do
%{user: user, conn: conn} = oauth_access(["read:notifications"])
other_user = insert(:user)
diff --git a/test/pleroma/web/mastodon_api/controllers/report_controller_test.exs b/test/pleroma/web/mastodon_api/controllers/report_controller_test.exs
index c7aa761225..4ab5d07715 100644
--- a/test/pleroma/web/mastodon_api/controllers/report_controller_test.exs
+++ b/test/pleroma/web/mastodon_api/controllers/report_controller_test.exs
@@ -7,6 +7,7 @@ defmodule Pleroma.Web.MastodonAPI.ReportControllerTest do
alias Pleroma.Activity
alias Pleroma.Repo
+ alias Pleroma.Rule
alias Pleroma.Web.CommonAPI
import Pleroma.Factory
@@ -81,6 +82,44 @@ test "submit a report with statuses and comment", %{
|> json_response_and_validate_schema(200)
end
+ test "submit a report with rule_ids", %{
+ conn: conn,
+ target_user: target_user
+ } do
+ %{id: rule_id} = Rule.create(%{text: "There are no rules"})
+
+ rule_id = to_string(rule_id)
+
+ assert %{"action_taken" => false, "id" => id} =
+ conn
+ |> put_req_header("content-type", "application/json")
+ |> post("/api/v1/reports", %{
+ "account_id" => target_user.id,
+ "forward" => "false",
+ "rule_ids" => [rule_id]
+ })
+ |> json_response_and_validate_schema(200)
+
+ assert %Activity{data: %{"rules" => [^rule_id]}} = Activity.get_report(id)
+ end
+
+ test "rules field is empty if provided wrong rule id", %{
+ conn: conn,
+ target_user: target_user
+ } do
+ assert %{"id" => id} =
+ conn
+ |> put_req_header("content-type", "application/json")
+ |> post("/api/v1/reports", %{
+ "account_id" => target_user.id,
+ "forward" => "false",
+ "rule_ids" => ["-1"]
+ })
+ |> json_response_and_validate_schema(200)
+
+ assert %Activity{data: %{"rules" => []}} = Activity.get_report(id)
+ end
+
test "account_id is required", %{
conn: conn,
activity: activity
diff --git a/test/pleroma/web/mastodon_api/controllers/scheduled_activity_controller_test.exs b/test/pleroma/web/mastodon_api/controllers/scheduled_activity_controller_test.exs
index 21f2ea6f52..2d6b2aee23 100644
--- a/test/pleroma/web/mastodon_api/controllers/scheduled_activity_controller_test.exs
+++ b/test/pleroma/web/mastodon_api/controllers/scheduled_activity_controller_test.exs
@@ -3,15 +3,26 @@
# SPDX-License-Identifier: AGPL-3.0-only
defmodule Pleroma.Web.MastodonAPI.ScheduledActivityControllerTest do
- use Pleroma.Web.ConnCase
+ use Oban.Testing, repo: Pleroma.Repo
+ use Pleroma.Web.ConnCase, async: true
alias Pleroma.Repo
alias Pleroma.ScheduledActivity
+ alias Pleroma.UnstubbedConfigMock, as: ConfigMock
- import Pleroma.Factory
import Ecto.Query
+ import Mox
+ import Pleroma.Factory
- setup do: clear_config([ScheduledActivity, :enabled])
+ setup do
+ ConfigMock
+ |> stub(:get, fn
+ [ScheduledActivity, :enabled] -> true
+ path -> Pleroma.Test.StaticConfig.get(path)
+ end)
+
+ :ok
+ end
test "shows scheduled activities" do
%{user: user, conn: conn} = oauth_access(["read:statuses"])
@@ -55,7 +66,6 @@ test "shows a scheduled activity" do
end
test "updates a scheduled activity" do
- clear_config([ScheduledActivity, :enabled], true)
%{user: user, conn: conn} = oauth_access(["write:statuses"])
scheduled_at = Timex.shift(NaiveDateTime.utc_now(), minutes: 60)
@@ -69,7 +79,7 @@ test "updates a scheduled activity" do
}
)
- job = Repo.one(from(j in Oban.Job, where: j.queue == "scheduled_activities"))
+ job = Repo.one(from(j in Oban.Job, where: j.queue == "federator_outgoing"))
assert job.args == %{"activity_id" => scheduled_activity.id}
assert DateTime.truncate(job.scheduled_at, :second) == to_datetime(scheduled_at)
@@ -103,7 +113,6 @@ test "updates a scheduled activity" do
end
test "deletes a scheduled activity" do
- clear_config([ScheduledActivity, :enabled], true)
%{user: user, conn: conn} = oauth_access(["write:statuses"])
scheduled_at = Timex.shift(NaiveDateTime.utc_now(), minutes: 60)
@@ -116,9 +125,11 @@ test "deletes a scheduled activity" do
}
)
- job = Repo.one(from(j in Oban.Job, where: j.queue == "scheduled_activities"))
-
- assert job.args == %{"activity_id" => scheduled_activity.id}
+ assert_enqueued(
+ worker: Pleroma.Workers.ScheduledActivityWorker,
+ args: %{"activity_id" => scheduled_activity.id},
+ queue: :federator_outgoing
+ )
res_conn =
conn
@@ -127,7 +138,11 @@ test "deletes a scheduled activity" do
assert %{} = json_response_and_validate_schema(res_conn, 200)
refute Repo.get(ScheduledActivity, scheduled_activity.id)
- refute Repo.get(Oban.Job, job.id)
+
+ refute_enqueued(
+ worker: Pleroma.Workers.ScheduledActivityWorker,
+ args: %{"activity_id" => scheduled_activity.id}
+ )
res_conn =
conn
diff --git a/test/pleroma/web/mastodon_api/controllers/search_controller_test.exs b/test/pleroma/web/mastodon_api/controllers/search_controller_test.exs
index 0a9240b70f..ad4144da44 100644
--- a/test/pleroma/web/mastodon_api/controllers/search_controller_test.exs
+++ b/test/pleroma/web/mastodon_api/controllers/search_controller_test.exs
@@ -13,6 +13,11 @@ defmodule Pleroma.Web.MastodonAPI.SearchControllerTest do
import Tesla.Mock
import Mock
+ setup do
+ Mox.stub_with(Pleroma.UnstubbedConfigMock, Pleroma.Config)
+ :ok
+ end
+
setup_all do
mock_global(fn env -> apply(HttpRequestMock, :request, [env]) end)
:ok
@@ -37,7 +42,7 @@ test "it returns empty result if user or status search return undefined error",
end
end
- @tag :skip_on_mac
+ @tag :skip_darwin
test "search", %{conn: conn} do
user = insert(:user)
user_two = insert(:user, %{nickname: "shp@shitposter.club"})
@@ -317,26 +322,20 @@ test "search", %{conn: conn} do
end
test "search fetches remote statuses and prefers them over other results", %{conn: conn} do
- old_version = :persistent_term.get({Pleroma.Repo, :postgres_version})
- :persistent_term.put({Pleroma.Repo, :postgres_version}, 10.0)
- on_exit(fn -> :persistent_term.put({Pleroma.Repo, :postgres_version}, old_version) end)
+ {:ok, %{id: activity_id}} =
+ CommonAPI.post(insert(:user), %{
+ status: "check out http://mastodon.example.org/@admin/99541947525187367"
+ })
- capture_log(fn ->
- {:ok, %{id: activity_id}} =
- CommonAPI.post(insert(:user), %{
- status: "check out http://mastodon.example.org/@admin/99541947525187367"
- })
+ %{"url" => result_url, "id" => result_id} =
+ conn
+ |> get("/api/v1/search?q=http://mastodon.example.org/@admin/99541947525187367")
+ |> json_response_and_validate_schema(200)
+ |> Map.get("statuses")
+ |> List.first()
- results =
- conn
- |> get("/api/v1/search?q=http://mastodon.example.org/@admin/99541947525187367")
- |> json_response_and_validate_schema(200)
-
- assert [
- %{"url" => "http://mastodon.example.org/@admin/99541947525187367"},
- %{"id" => ^activity_id}
- ] = results["statuses"]
- end)
+ refute match?(^result_id, activity_id)
+ assert match?(^result_url, "http://mastodon.example.org/@admin/99541947525187367")
end
test "search doesn't show statuses that it shouldn't", %{conn: conn} do
diff --git a/test/pleroma/web/mastodon_api/controllers/status_controller_test.exs b/test/pleroma/web/mastodon_api/controllers/status_controller_test.exs
index 5bae2cd00d..f34911e5b7 100644
--- a/test/pleroma/web/mastodon_api/controllers/status_controller_test.exs
+++ b/test/pleroma/web/mastodon_api/controllers/status_controller_test.exs
@@ -12,6 +12,7 @@ defmodule Pleroma.Web.MastodonAPI.StatusControllerTest do
alias Pleroma.Object
alias Pleroma.Repo
alias Pleroma.ScheduledActivity
+ alias Pleroma.Tests.Helpers
alias Pleroma.Tests.ObanHelpers
alias Pleroma.User
alias Pleroma.Web.ActivityPub.ActivityPub
@@ -19,25 +20,38 @@ defmodule Pleroma.Web.MastodonAPI.StatusControllerTest do
alias Pleroma.Web.CommonAPI
alias Pleroma.Workers.ScheduledActivityWorker
+ import Mox
import Pleroma.Factory
setup do: clear_config([:instance, :federating])
setup do: clear_config([:instance, :allow_relay])
- setup do: clear_config([:rich_media, :enabled])
setup do: clear_config([:mrf, :policies])
setup do: clear_config([:mrf_keyword, :reject])
+ setup do
+ Pleroma.UnstubbedConfigMock
+ |> stub_with(Pleroma.Config)
+
+ Pleroma.StaticStubbedConfigMock
+ |> stub(:get, fn
+ [:rich_media, :enabled] -> false
+ path -> Pleroma.Test.StaticConfig.get(path)
+ end)
+
+ :ok
+ end
+
describe "posting statuses" do
setup do: oauth_access(["write:statuses"])
test "posting a status does not increment reblog_count when relaying", %{conn: conn} do
clear_config([:instance, :federating], true)
- Config.get([:instance, :allow_relay], true)
+ clear_config([:instance, :allow_relay], true)
response =
conn
|> put_req_header("content-type", "application/json")
- |> post("api/v1/statuses", %{
+ |> post("/api/v1/statuses", %{
"content_type" => "text/plain",
"source" => "Pleroma FE",
"status" => "Hello world",
@@ -50,7 +64,7 @@ test "posting a status does not increment reblog_count when relaying", %{conn: c
response =
conn
- |> get("api/v1/statuses/#{response["id"]}", %{})
+ |> get("/api/v1/statuses/#{response["id"]}", %{})
|> json_response_and_validate_schema(200)
assert response["reblogs_count"] == 0
@@ -109,7 +123,7 @@ test "posting a status", %{conn: conn} do
conn_four =
conn
|> put_req_header("content-type", "application/json")
- |> post("api/v1/statuses", %{
+ |> post("/api/v1/statuses", %{
"status" => "oolong",
"expires_in" => expires_in
})
@@ -125,6 +139,28 @@ test "posting a status", %{conn: conn} do
)
end
+ test "posting a quote post", %{conn: conn} do
+ user = insert(:user)
+
+ {:ok, %{id: activity_id} = activity} = CommonAPI.post(user, %{status: "yolo"})
+ %{data: %{"id" => quote_url}} = Object.normalize(activity)
+
+ conn =
+ conn
+ |> put_req_header("content-type", "application/json")
+ |> post("/api/v1/statuses", %{
+ "status" => "indeed",
+ "quote_id" => activity_id
+ })
+
+ assert %{
+ "id" => id,
+ "pleroma" => %{"quote" => %{"id" => ^activity_id}, "quote_url" => ^quote_url}
+ } = json_response_and_validate_schema(conn, 200)
+
+ assert Activity.get_by_id(id)
+ end
+
test "it fails to create a status if `expires_in` is less or equal than an hour", %{
conn: conn
} do
@@ -134,7 +170,7 @@ test "it fails to create a status if `expires_in` is less or equal than an hour"
assert %{"error" => "Expiry date is too soon"} =
conn
|> put_req_header("content-type", "application/json")
- |> post("api/v1/statuses", %{
+ |> post("/api/v1/statuses", %{
"status" => "oolong",
"expires_in" => expires_in
})
@@ -146,7 +182,7 @@ test "it fails to create a status if `expires_in` is less or equal than an hour"
assert %{"error" => "Expiry date is too soon"} =
conn
|> put_req_header("content-type", "application/json")
- |> post("api/v1/statuses", %{
+ |> post("/api/v1/statuses", %{
"status" => "oolong",
"expires_in" => expires_in
})
@@ -160,7 +196,7 @@ test "Get MRF reason when posting a status is rejected by one", %{conn: conn} do
assert %{"error" => "[KeywordPolicy] Matches with rejected keyword"} =
conn
|> put_req_header("content-type", "application/json")
- |> post("api/v1/statuses", %{"status" => "GNO/Linux"})
+ |> post("/api/v1/statuses", %{"status" => "GNO/Linux"})
|> json_response_and_validate_schema(422)
end
@@ -199,6 +235,16 @@ test "replying to a status", %{user: user, conn: conn} do
assert Activity.get_in_reply_to_activity(activity).id == replied_to.id
end
+ test "replying to a deleted status", %{user: user, conn: conn} do
+ {:ok, status} = CommonAPI.post(user, %{status: "cofe"})
+ {:ok, _deleted_status} = CommonAPI.delete(status.id, user)
+
+ conn
+ |> put_req_header("content-type", "application/json")
+ |> post("/api/v1/statuses", %{"status" => "xD", "in_reply_to_id" => status.id})
+ |> json_response_and_validate_schema(422)
+ end
+
test "replying to a direct message with visibility other than direct", %{
user: user,
conn: conn
@@ -293,59 +339,6 @@ test "posting a fake status", %{conn: conn} do
assert real_status == fake_status
end
- test "fake statuses' preview card is not cached", %{conn: conn} do
- clear_config([:rich_media, :enabled], true)
-
- Tesla.Mock.mock(fn
- %{
- method: :get,
- url: "https://example.com/twitter-card"
- } ->
- %Tesla.Env{status: 200, body: File.read!("test/fixtures/rich_media/twitter_card.html")}
-
- env ->
- apply(HttpRequestMock, :request, [env])
- end)
-
- conn1 =
- conn
- |> put_req_header("content-type", "application/json")
- |> post("/api/v1/statuses", %{
- "status" => "https://example.com/ogp",
- "preview" => true
- })
-
- conn2 =
- conn
- |> put_req_header("content-type", "application/json")
- |> post("/api/v1/statuses", %{
- "status" => "https://example.com/twitter-card",
- "preview" => true
- })
-
- assert %{"card" => %{"title" => "The Rock"}} = json_response_and_validate_schema(conn1, 200)
-
- assert %{"card" => %{"title" => "Small Island Developing States Photo Submission"}} =
- json_response_and_validate_schema(conn2, 200)
- end
-
- test "posting a status with OGP link preview", %{conn: conn} do
- Tesla.Mock.mock_global(fn env -> apply(HttpRequestMock, :request, [env]) end)
- clear_config([:rich_media, :enabled], true)
-
- conn =
- conn
- |> put_req_header("content-type", "application/json")
- |> post("/api/v1/statuses", %{
- "status" => "https://example.com/ogp"
- })
-
- assert %{"id" => id, "card" => %{"title" => "The Rock"}} =
- json_response_and_validate_schema(conn, 200)
-
- assert Activity.get_by_id(id)
- end
-
test "posting a direct status", %{conn: conn} do
user2 = insert(:user)
content = "direct cofe @#{user2.nickname}"
@@ -353,7 +346,7 @@ test "posting a direct status", %{conn: conn} do
conn =
conn
|> put_req_header("content-type", "application/json")
- |> post("api/v1/statuses", %{"status" => content, "visibility" => "direct"})
+ |> post("/api/v1/statuses", %{"status" => content, "visibility" => "direct"})
assert %{"id" => id} = response = json_response_and_validate_schema(conn, 200)
assert response["visibility"] == "direct"
@@ -390,7 +383,7 @@ test "discloses application metadata when enabled" do
result =
conn
- |> get("api/v1/statuses/#{activity}")
+ |> get("/api/v1/statuses/#{activity}")
assert %{
"content" => "cofe is my copilot",
@@ -419,7 +412,7 @@ test "hides application metadata when disabled" do
result =
conn
- |> get("api/v1/statuses/#{activity}")
+ |> get("/api/v1/statuses/#{activity}")
assert %{
"content" => "club mate is my wingman",
@@ -626,7 +619,10 @@ test "option limit is enforced", %{conn: conn} do
|> put_req_header("content-type", "application/json")
|> post("/api/v1/statuses", %{
"status" => "desu~",
- "poll" => %{"options" => Enum.map(0..limit, fn _ -> "desu" end), "expires_in" => 1}
+ "poll" => %{
+ "options" => Enum.map(0..limit, fn num -> "desu #{num}" end),
+ "expires_in" => 1
+ }
})
%{"error" => error} = json_response_and_validate_schema(conn, 422)
@@ -642,7 +638,7 @@ test "option character limit is enforced", %{conn: conn} do
|> post("/api/v1/statuses", %{
"status" => "...",
"poll" => %{
- "options" => [Enum.reduce(0..limit, "", fn _, acc -> acc <> "." end)],
+ "options" => [String.duplicate(".", limit + 1), "lol"],
"expires_in" => 1
}
})
@@ -724,6 +720,32 @@ test "scheduled poll", %{conn: conn} do
assert object.data["type"] == "Question"
assert length(object.data["oneOf"]) == 3
end
+
+ test "cannot have only one option", %{conn: conn} do
+ conn =
+ conn
+ |> put_req_header("content-type", "application/json")
+ |> post("/api/v1/statuses", %{
+ "status" => "desu~",
+ "poll" => %{"options" => ["mew"], "expires_in" => 1}
+ })
+
+ %{"error" => error} = json_response_and_validate_schema(conn, 422)
+ assert error == "Poll must contain at least 2 options"
+ end
+
+ test "cannot have only duplicated options", %{conn: conn} do
+ conn =
+ conn
+ |> put_req_header("content-type", "application/json")
+ |> post("/api/v1/statuses", %{
+ "status" => "desu~",
+ "poll" => %{"options" => ["mew", "mew"], "expires_in" => 1}
+ })
+
+ %{"error" => error} = json_response_and_validate_schema(conn, 422)
+ assert error == "Poll must contain at least 2 options"
+ end
end
test "get a status" do
@@ -742,6 +764,49 @@ defp local_and_remote_activities do
{:ok, local: local, remote: remote}
end
+ defp local_and_remote_context_activities do
+ local_user_1 = insert(:user)
+ local_user_2 = insert(:user)
+ remote_user = insert(:user, local: false)
+
+ {:ok, %{id: id1, data: %{"context" => context}}} =
+ CommonAPI.post(local_user_1, %{status: "post"})
+
+ {:ok, %{id: id2} = post} =
+ CommonAPI.post(local_user_2, %{status: "local reply", in_reply_to_status_id: id1})
+
+ params = %{
+ "@context" => "https://www.w3.org/ns/activitystreams",
+ "actor" => remote_user.ap_id,
+ "type" => "Create",
+ "context" => context,
+ "id" => "#{remote_user.ap_id}/activities/1",
+ "inReplyTo" => post.data["id"],
+ "object" => %{
+ "type" => "Note",
+ "content" => "remote reply",
+ "context" => context,
+ "id" => "#{remote_user.ap_id}/objects/1",
+ "attributedTo" => remote_user.ap_id,
+ "to" => [
+ local_user_1.ap_id,
+ local_user_2.ap_id,
+ "https://www.w3.org/ns/activitystreams#Public"
+ ]
+ },
+ "to" => [
+ local_user_1.ap_id,
+ local_user_2.ap_id,
+ "https://www.w3.org/ns/activitystreams#Public"
+ ]
+ }
+
+ {:ok, job} = Pleroma.Web.Federator.incoming_ap_doc(params)
+ {:ok, remote_activity} = ObanHelpers.perform(job)
+
+ %{locals: [id1, id2], remote: remote_activity.id, context: context}
+ end
+
describe "status with restrict unauthenticated activities for local and remote" do
setup do: local_and_remote_activities()
@@ -928,6 +993,230 @@ test "if user is authenticated", %{local: local, remote: remote} do
end
end
+ describe "getting status contexts restricted unauthenticated for local and remote" do
+ setup do: local_and_remote_context_activities()
+
+ setup do: clear_config([:restrict_unauthenticated, :activities, :local], true)
+
+ setup do: clear_config([:restrict_unauthenticated, :activities, :remote], true)
+
+ test "if user is unauthenticated", %{conn: conn, locals: [post_id, _]} do
+ res_conn = get(conn, "/api/v1/statuses/#{post_id}/context")
+
+ assert json_response_and_validate_schema(res_conn, 200) == %{
+ "ancestors" => [],
+ "descendants" => []
+ }
+ end
+
+ test "if user is unauthenticated reply", %{conn: conn, locals: [_, reply_id]} do
+ res_conn = get(conn, "/api/v1/statuses/#{reply_id}/context")
+
+ assert json_response_and_validate_schema(res_conn, 200) == %{
+ "ancestors" => [],
+ "descendants" => []
+ }
+ end
+
+ test "if user is authenticated", %{locals: [post_id, reply_id], remote: remote_reply_id} do
+ %{conn: conn} = oauth_access(["read"])
+ res_conn = get(conn, "/api/v1/statuses/#{post_id}/context")
+
+ %{"ancestors" => [], "descendants" => descendants} =
+ json_response_and_validate_schema(res_conn, 200)
+
+ descendant_ids =
+ descendants
+ |> Enum.map(& &1["id"])
+
+ assert reply_id in descendant_ids
+ assert remote_reply_id in descendant_ids
+ end
+
+ test "if user is authenticated reply", %{locals: [post_id, reply_id], remote: remote_reply_id} do
+ %{conn: conn} = oauth_access(["read"])
+ res_conn = get(conn, "/api/v1/statuses/#{reply_id}/context")
+
+ %{"ancestors" => ancestors, "descendants" => descendants} =
+ json_response_and_validate_schema(res_conn, 200)
+
+ ancestor_ids =
+ ancestors
+ |> Enum.map(& &1["id"])
+
+ descendant_ids =
+ descendants
+ |> Enum.map(& &1["id"])
+
+ assert post_id in ancestor_ids
+ assert remote_reply_id in descendant_ids
+ end
+ end
+
+ describe "getting status contexts restricted unauthenticated for local" do
+ setup do: local_and_remote_context_activities()
+
+ setup do: clear_config([:restrict_unauthenticated, :activities, :local], true)
+
+ setup do: clear_config([:restrict_unauthenticated, :activities, :remote], false)
+
+ test "if user is unauthenticated", %{
+ conn: conn,
+ locals: [post_id, reply_id],
+ remote: remote_reply_id
+ } do
+ res_conn = get(conn, "/api/v1/statuses/#{post_id}/context")
+
+ %{"ancestors" => [], "descendants" => descendants} =
+ json_response_and_validate_schema(res_conn, 200)
+
+ descendant_ids =
+ descendants
+ |> Enum.map(& &1["id"])
+
+ assert reply_id not in descendant_ids
+ assert remote_reply_id in descendant_ids
+ end
+
+ test "if user is unauthenticated reply", %{
+ conn: conn,
+ locals: [post_id, reply_id],
+ remote: remote_reply_id
+ } do
+ res_conn = get(conn, "/api/v1/statuses/#{reply_id}/context")
+
+ %{"ancestors" => ancestors, "descendants" => descendants} =
+ json_response_and_validate_schema(res_conn, 200)
+
+ ancestor_ids =
+ ancestors
+ |> Enum.map(& &1["id"])
+
+ descendant_ids =
+ descendants
+ |> Enum.map(& &1["id"])
+
+ assert post_id not in ancestor_ids
+ assert remote_reply_id in descendant_ids
+ end
+
+ test "if user is authenticated", %{locals: [post_id, reply_id], remote: remote_reply_id} do
+ %{conn: conn} = oauth_access(["read"])
+ res_conn = get(conn, "/api/v1/statuses/#{post_id}/context")
+
+ %{"ancestors" => [], "descendants" => descendants} =
+ json_response_and_validate_schema(res_conn, 200)
+
+ descendant_ids =
+ descendants
+ |> Enum.map(& &1["id"])
+
+ assert reply_id in descendant_ids
+ assert remote_reply_id in descendant_ids
+ end
+
+ test "if user is authenticated reply", %{locals: [post_id, reply_id], remote: remote_reply_id} do
+ %{conn: conn} = oauth_access(["read"])
+ res_conn = get(conn, "/api/v1/statuses/#{reply_id}/context")
+
+ %{"ancestors" => ancestors, "descendants" => descendants} =
+ json_response_and_validate_schema(res_conn, 200)
+
+ ancestor_ids =
+ ancestors
+ |> Enum.map(& &1["id"])
+
+ descendant_ids =
+ descendants
+ |> Enum.map(& &1["id"])
+
+ assert post_id in ancestor_ids
+ assert remote_reply_id in descendant_ids
+ end
+ end
+
+ describe "getting status contexts restricted unauthenticated for remote" do
+ setup do: local_and_remote_context_activities()
+
+ setup do: clear_config([:restrict_unauthenticated, :activities, :local], false)
+
+ setup do: clear_config([:restrict_unauthenticated, :activities, :remote], true)
+
+ test "if user is unauthenticated", %{
+ conn: conn,
+ locals: [post_id, reply_id],
+ remote: remote_reply_id
+ } do
+ res_conn = get(conn, "/api/v1/statuses/#{post_id}/context")
+
+ %{"ancestors" => [], "descendants" => descendants} =
+ json_response_and_validate_schema(res_conn, 200)
+
+ descendant_ids =
+ descendants
+ |> Enum.map(& &1["id"])
+
+ assert reply_id in descendant_ids
+ assert remote_reply_id not in descendant_ids
+ end
+
+ test "if user is unauthenticated reply", %{
+ conn: conn,
+ locals: [post_id, reply_id],
+ remote: remote_reply_id
+ } do
+ res_conn = get(conn, "/api/v1/statuses/#{reply_id}/context")
+
+ %{"ancestors" => ancestors, "descendants" => descendants} =
+ json_response_and_validate_schema(res_conn, 200)
+
+ ancestor_ids =
+ ancestors
+ |> Enum.map(& &1["id"])
+
+ descendant_ids =
+ descendants
+ |> Enum.map(& &1["id"])
+
+ assert post_id in ancestor_ids
+ assert remote_reply_id not in descendant_ids
+ end
+
+ test "if user is authenticated", %{locals: [post_id, reply_id], remote: remote_reply_id} do
+ %{conn: conn} = oauth_access(["read"])
+ res_conn = get(conn, "/api/v1/statuses/#{post_id}/context")
+
+ %{"ancestors" => [], "descendants" => descendants} =
+ json_response_and_validate_schema(res_conn, 200)
+
+ reply_ids =
+ descendants
+ |> Enum.map(& &1["id"])
+
+ assert reply_id in reply_ids
+ assert remote_reply_id in reply_ids
+ end
+
+ test "if user is authenticated reply", %{locals: [post_id, reply_id], remote: remote_reply_id} do
+ %{conn: conn} = oauth_access(["read"])
+ res_conn = get(conn, "/api/v1/statuses/#{reply_id}/context")
+
+ %{"ancestors" => ancestors, "descendants" => descendants} =
+ json_response_and_validate_schema(res_conn, 200)
+
+ ancestor_ids =
+ ancestors
+ |> Enum.map(& &1["id"])
+
+ descendant_ids =
+ descendants
+ |> Enum.map(& &1["id"])
+
+ assert post_id in ancestor_ids
+ assert remote_reply_id in descendant_ids
+ end
+ end
+
describe "deleting a status" do
test "when you created it" do
%{user: author, conn: conn} = oauth_access(["write:statuses"])
@@ -989,6 +1278,27 @@ test "when you're privileged to", %{conn: conn} do
refute Activity.get_by_id(activity.id)
end
+
+ test "when you're privileged and the user is banned", %{conn: conn} do
+ clear_config([:instance, :moderator_privileges], [:messages_delete])
+ posting_user = insert(:user, is_active: false)
+ refute posting_user.is_active
+ activity = insert(:note_activity, user: posting_user)
+ user = insert(:user, is_moderator: true)
+
+ res_conn =
+ conn
+ |> assign(:user, user)
+ |> assign(:token, insert(:oauth_token, user: user, scopes: ["write:statuses"]))
+ |> delete("/api/v1/statuses/#{activity.id}")
+
+ assert %{} = json_response_and_validate_schema(res_conn, 200)
+
+ assert ModerationLog |> Repo.one() |> ModerationLog.get_log_entry_message() ==
+ "@#{user.nickname} deleted status ##{activity.id}"
+
+ refute Activity.get_by_id(activity.id)
+ end
end
describe "reblogging" do
@@ -1305,7 +1615,7 @@ test "on pin removes deletion job, on unpin reschedule deletion" do
assert %{"id" => id} =
conn
|> put_req_header("content-type", "application/json")
- |> post("api/v1/statuses", %{
+ |> post("/api/v1/statuses", %{
"status" => "oolong",
"expires_in" => expires_in
})
@@ -1343,87 +1653,6 @@ test "on pin removes deletion job, on unpin reschedule deletion" do
end
end
- describe "cards" do
- setup do
- clear_config([:rich_media, :enabled], true)
-
- oauth_access(["read:statuses"])
- end
-
- test "returns rich-media card", %{conn: conn, user: user} do
- Tesla.Mock.mock_global(fn env -> apply(HttpRequestMock, :request, [env]) end)
-
- {:ok, activity} = CommonAPI.post(user, %{status: "https://example.com/ogp"})
-
- card_data = %{
- "image" => "http://ia.media-imdb.com/images/rock.jpg",
- "provider_name" => "example.com",
- "provider_url" => "https://example.com",
- "title" => "The Rock",
- "type" => "link",
- "url" => "https://example.com/ogp",
- "description" =>
- "Directed by Michael Bay. With Sean Connery, Nicolas Cage, Ed Harris, John Spencer.",
- "pleroma" => %{
- "opengraph" => %{
- "image" => "http://ia.media-imdb.com/images/rock.jpg",
- "title" => "The Rock",
- "type" => "video.movie",
- "url" => "https://example.com/ogp",
- "description" =>
- "Directed by Michael Bay. With Sean Connery, Nicolas Cage, Ed Harris, John Spencer."
- }
- }
- }
-
- response =
- conn
- |> get("/api/v1/statuses/#{activity.id}/card")
- |> json_response_and_validate_schema(200)
-
- assert response == card_data
-
- # works with private posts
- {:ok, activity} =
- CommonAPI.post(user, %{status: "https://example.com/ogp", visibility: "direct"})
-
- response_two =
- conn
- |> get("/api/v1/statuses/#{activity.id}/card")
- |> json_response_and_validate_schema(200)
-
- assert response_two == card_data
- end
-
- test "replaces missing description with an empty string", %{conn: conn, user: user} do
- Tesla.Mock.mock_global(fn env -> apply(HttpRequestMock, :request, [env]) end)
-
- {:ok, activity} = CommonAPI.post(user, %{status: "https://example.com/ogp-missing-data"})
-
- response =
- conn
- |> get("/api/v1/statuses/#{activity.id}/card")
- |> json_response_and_validate_schema(:ok)
-
- assert response == %{
- "type" => "link",
- "title" => "Pleroma",
- "description" => "",
- "image" => nil,
- "provider_name" => "example.com",
- "provider_url" => "https://example.com",
- "url" => "https://example.com/ogp-missing-data",
- "pleroma" => %{
- "opengraph" => %{
- "title" => "Pleroma",
- "type" => "website",
- "url" => "https://example.com/ogp-missing-data"
- }
- }
- }
- end
- end
-
test "bookmarks" do
bookmarks_uri = "/api/v1/bookmarks"
@@ -1468,6 +1697,60 @@ test "bookmarks" do
json_response_and_validate_schema(bookmarks, 200)
end
+ test "bookmark folders" do
+ %{conn: conn, user: user} = oauth_access(["write:bookmarks", "read:bookmarks"])
+
+ {:ok, folder} = Pleroma.BookmarkFolder.create(user.id, "folder")
+ author = insert(:user)
+
+ folder_bookmarks_uri = "/api/v1/bookmarks?folder_id=#{folder.id}"
+
+ {:ok, activity1} = CommonAPI.post(author, %{status: "heweoo?"})
+ {:ok, activity2} = CommonAPI.post(author, %{status: "heweoo!"})
+
+ # Add bookmark with a folder
+ response =
+ conn
+ |> put_req_header("content-type", "application/json")
+ |> post("/api/v1/statuses/#{activity1.id}/bookmark", %{folder_id: folder.id})
+
+ assert json_response_and_validate_schema(response, 200)["bookmarked"] == true
+
+ assert json_response_and_validate_schema(response, 200)["pleroma"]["bookmark_folder"] ==
+ folder.id
+
+ response =
+ conn
+ |> put_req_header("content-type", "application/json")
+ |> post("/api/v1/statuses/#{activity2.id}/bookmark")
+
+ assert json_response_and_validate_schema(response, 200)["bookmarked"] == true
+ assert json_response_and_validate_schema(response, 200)["pleroma"]["bookmark_folder"] == nil
+
+ bookmarks =
+ get(conn, folder_bookmarks_uri)
+ |> json_response_and_validate_schema(200)
+
+ assert length(bookmarks) == 1
+
+ # Update folder for existing bookmark
+ response =
+ conn
+ |> put_req_header("content-type", "application/json")
+ |> post("/api/v1/statuses/#{activity2.id}/bookmark", %{folder_id: folder.id})
+
+ assert json_response_and_validate_schema(response, 200)["bookmarked"] == true
+
+ assert json_response_and_validate_schema(response, 200)["pleroma"]["bookmark_folder"] ==
+ folder.id
+
+ bookmarks =
+ get(conn, folder_bookmarks_uri)
+ |> json_response_and_validate_schema(200)
+
+ assert length(bookmarks) == 2
+ end
+
describe "conversation muting" do
setup do: oauth_access(["write:mutes"])
@@ -1555,7 +1838,7 @@ test "Repeated posts that are replies incorrectly have in_reply_to_id null", %{c
conn
|> assign(:user, user3)
|> assign(:token, insert(:oauth_token, user: user3, scopes: ["read:statuses"]))
- |> get("api/v1/timelines/home")
+ |> get("/api/v1/timelines/home")
[reblogged_activity] = json_response_and_validate_schema(conn3, 200)
@@ -1826,7 +2109,10 @@ test "favorites paginate correctly" do
# Using the header for pagination works correctly
[next, _] = get_resp_header(result, "link") |> hd() |> String.split(", ")
- [_, max_id] = Regex.run(~r/max_id=([^&]+)/, next)
+ [next_url, _next_rel] = String.split(next, ";")
+ next_url = String.trim_trailing(next_url, ">") |> String.trim_leading("<")
+
+ max_id = Helpers.get_query_parameter(next_url, "max_id")
assert max_id == third_favorite.id
diff --git a/test/pleroma/web/mastodon_api/controllers/subscription_controller_test.exs b/test/pleroma/web/mastodon_api/controllers/subscription_controller_test.exs
index ce7cfa9c7d..837dc0dce2 100644
--- a/test/pleroma/web/mastodon_api/controllers/subscription_controller_test.exs
+++ b/test/pleroma/web/mastodon_api/controllers/subscription_controller_test.exs
@@ -3,7 +3,7 @@
# SPDX-License-Identifier: AGPL-3.0-only
defmodule Pleroma.Web.MastodonAPI.SubscriptionControllerTest do
- use Pleroma.Web.ConnCase, async: true
+ use Pleroma.Web.ConnCase, async: false
import Pleroma.Factory
@@ -35,17 +35,20 @@ defmodule Pleroma.Web.MastodonAPI.SubscriptionControllerTest do
defmacro assert_error_when_disable_push(do: yield) do
quote do
- vapid_details = Application.get_env(:web_push_encryption, :vapid_details, [])
- Application.put_env(:web_push_encryption, :vapid_details, [])
-
assert %{"error" => "Web push subscription is disabled on this Pleroma instance"} ==
unquote(yield)
-
- Application.put_env(:web_push_encryption, :vapid_details, vapid_details)
end
end
describe "when disabled" do
+ setup do
+ vapid_config = Application.get_env(:web_push_encryption, :vapid_details)
+
+ Application.put_env(:web_push_encryption, :vapid_details, [])
+
+ on_exit(fn -> Application.put_env(:web_push_encryption, :vapid_details, vapid_config) end)
+ end
+
test "POST returns error", %{conn: conn} do
assert_error_when_disable_push do
conn
diff --git a/test/pleroma/web/mastodon_api/controllers/timeline_controller_test.exs b/test/pleroma/web/mastodon_api/controllers/timeline_controller_test.exs
index b13a8033ba..c120dd53c2 100644
--- a/test/pleroma/web/mastodon_api/controllers/timeline_controller_test.exs
+++ b/test/pleroma/web/mastodon_api/controllers/timeline_controller_test.exs
@@ -527,7 +527,7 @@ test "direct timeline", %{conn: conn} do
|> assign(:token, insert(:oauth_token, user: user_two, scopes: ["read:statuses"]))
# Only direct should be visible here
- res_conn = get(conn_user_two, "api/v1/timelines/direct")
+ res_conn = get(conn_user_two, "/api/v1/timelines/direct")
assert [status] = json_response_and_validate_schema(res_conn, :ok)
@@ -539,14 +539,14 @@ test "direct timeline", %{conn: conn} do
build_conn()
|> assign(:user, user_one)
|> assign(:token, insert(:oauth_token, user: user_one, scopes: ["read:statuses"]))
- |> get("api/v1/timelines/direct")
+ |> get("/api/v1/timelines/direct")
[status] = json_response_and_validate_schema(res_conn, :ok)
assert %{"visibility" => "direct"} = status
# Both should be visible here
- res_conn = get(conn_user_two, "api/v1/timelines/home")
+ res_conn = get(conn_user_two, "/api/v1/timelines/home")
[_s1, _s2] = json_response_and_validate_schema(res_conn, :ok)
@@ -559,14 +559,14 @@ test "direct timeline", %{conn: conn} do
})
end)
- res_conn = get(conn_user_two, "api/v1/timelines/direct")
+ res_conn = get(conn_user_two, "/api/v1/timelines/direct")
statuses = json_response_and_validate_schema(res_conn, :ok)
assert length(statuses) == 20
max_id = List.last(statuses)["id"]
- res_conn = get(conn_user_two, "api/v1/timelines/direct?max_id=#{max_id}")
+ res_conn = get(conn_user_two, "/api/v1/timelines/direct?max_id=#{max_id}")
assert [status] = json_response_and_validate_schema(res_conn, :ok)
@@ -591,7 +591,7 @@ test "doesn't include DMs from blocked users" do
visibility: "direct"
})
- res_conn = get(conn, "api/v1/timelines/direct")
+ res_conn = get(conn, "/api/v1/timelines/direct")
[status] = json_response_and_validate_schema(res_conn, :ok)
assert status["id"] == direct.id
diff --git a/test/pleroma/web/mastodon_api/mastodon_api_test.exs b/test/pleroma/web/mastodon_api/mastodon_api_test.exs
index 250a20352f..190c136112 100644
--- a/test/pleroma/web/mastodon_api/mastodon_api_test.exs
+++ b/test/pleroma/web/mastodon_api/mastodon_api_test.exs
@@ -7,11 +7,13 @@ defmodule Pleroma.Web.MastodonAPI.MastodonAPITest do
alias Pleroma.Notification
alias Pleroma.ScheduledActivity
+ alias Pleroma.UnstubbedConfigMock, as: ConfigMock
alias Pleroma.User
alias Pleroma.Web.CommonAPI
alias Pleroma.Web.MastodonAPI.MastodonAPI
import Pleroma.Factory
+ import Mox
describe "follow/3" do
test "returns error when followed user is deactivated" do
@@ -88,6 +90,9 @@ test "returns notifications for user" do
describe "get_scheduled_activities/2" do
test "returns user scheduled activities" do
+ ConfigMock
+ |> stub_with(Pleroma.Test.StaticConfig)
+
user = insert(:user)
today =
diff --git a/test/pleroma/web/mastodon_api/update_credentials_test.exs b/test/pleroma/web/mastodon_api/update_credentials_test.exs
index d5fac7e253..bea0cae69c 100644
--- a/test/pleroma/web/mastodon_api/update_credentials_test.exs
+++ b/test/pleroma/web/mastodon_api/update_credentials_test.exs
@@ -4,13 +4,22 @@
defmodule Pleroma.Web.MastodonAPI.UpdateCredentialsTest do
alias Pleroma.Repo
+ alias Pleroma.UnstubbedConfigMock, as: ConfigMock
alias Pleroma.User
use Pleroma.Web.ConnCase
import Mock
+ import Mox
import Pleroma.Factory
+ setup do
+ ConfigMock
+ |> stub_with(Pleroma.Test.StaticConfig)
+
+ :ok
+ end
+
describe "updating credentials" do
setup do: oauth_access(["write:accounts"])
setup :request_content_type
@@ -97,6 +106,42 @@ test "updates the user's bio", %{conn: conn} do
assert user.raw_bio == raw_bio
end
+ test "updating bio honours bio limit", %{conn: conn} do
+ bio_limit = Config.get([:instance, :user_bio_length], 5000)
+
+ raw_bio = String.duplicate(".", bio_limit + 1)
+
+ conn = patch(conn, "/api/v1/accounts/update_credentials", %{"note" => raw_bio})
+
+ assert %{"error" => "Bio is too long"} = json_response_and_validate_schema(conn, 413)
+ end
+
+ test "updating name honours name limit", %{conn: conn} do
+ name_limit = Config.get([:instance, :user_name_length], 100)
+
+ name = String.duplicate(".", name_limit + 1)
+
+ conn = patch(conn, "/api/v1/accounts/update_credentials", %{"display_name" => name})
+
+ assert %{"error" => "Name is too long"} = json_response_and_validate_schema(conn, 413)
+ end
+
+ test "when both name and bio exceeds the limit, display name error", %{conn: conn} do
+ name_limit = Config.get([:instance, :user_name_length], 100)
+ bio_limit = Config.get([:instance, :user_bio_length], 5000)
+
+ name = String.duplicate(".", name_limit + 1)
+ raw_bio = String.duplicate(".", bio_limit + 1)
+
+ conn =
+ patch(conn, "/api/v1/accounts/update_credentials", %{
+ "display_name" => name,
+ "note" => raw_bio
+ })
+
+ assert %{"error" => "Name is too long"} = json_response_and_validate_schema(conn, 413)
+ end
+
test "updates the user's locking status", %{conn: conn} do
conn = patch(conn, "/api/v1/accounts/update_credentials", %{locked: "true"})
@@ -375,7 +420,9 @@ test "updates the user's background, upload_limit, returns a HTTP 413", %{
"pleroma_background_image" => new_background_oversized
})
- assert user_response = json_response_and_validate_schema(res, 413)
+ assert %{"error" => "File is too large"} == json_response_and_validate_schema(res, 413)
+
+ user = Repo.get(User, user.id)
assert user.background == %{}
clear_config([:instance, :upload_limit], upload_limit)
@@ -383,6 +430,34 @@ test "updates the user's background, upload_limit, returns a HTTP 413", %{
assert :ok == File.rm(Path.absname("test/tmp/large_binary.data"))
end
+ test "Strip / from upload files", %{user: user, conn: conn} do
+ new_image = %Plug.Upload{
+ content_type: "image/jpeg",
+ path: Path.absname("test/fixtures/image.jpg"),
+ filename: "../../../../nested/an_image.jpg"
+ }
+
+ assert user.avatar == %{}
+
+ res =
+ patch(conn, "/api/v1/accounts/update_credentials", %{
+ "avatar" => new_image,
+ "header" => new_image,
+ "pleroma_background_image" => new_image
+ })
+
+ assert user_response = json_response_and_validate_schema(res, 200)
+ assert user_response["avatar"]
+ assert user_response["header"]
+ assert user_response["pleroma"]["background_image"]
+ refute Regex.match?(~r"/nested/", user_response["avatar"])
+ refute Regex.match?(~r"/nested/", user_response["header"])
+ refute Regex.match?(~r"/nested/", user_response["pleroma"]["background_image"])
+
+ user = User.get_by_id(user.id)
+ refute user.avatar == %{}
+ end
+
test "requires 'write:accounts' permission" do
token1 = insert(:oauth_token, scopes: ["read"])
token2 = insert(:oauth_token, scopes: ["write", "follow"])
@@ -436,10 +511,15 @@ test "update fields", %{conn: conn} do
|> json_response_and_validate_schema(200)
assert account_data["fields"] == [
- %{"name" => "foo ", "value" => "bar"},
+ %{
+ "name" => "foo ",
+ "value" => "bar",
+ "verified_at" => nil
+ },
%{
"name" => "link.io",
- "value" => ~S(cofe.io )
+ "value" => ~S(cofe.io ),
+ "verified_at" => nil
}
]
@@ -498,8 +578,8 @@ test "emojis in fields labels", %{conn: conn} do
|> json_response_and_validate_schema(200)
assert account_data["fields"] == [
- %{"name" => ":firefox:", "value" => "is best 2hu"},
- %{"name" => "they wins", "value" => ":blank:"}
+ %{"name" => ":firefox:", "value" => "is best 2hu", "verified_at" => nil},
+ %{"name" => "they wins", "value" => ":blank:", "verified_at" => nil}
]
assert account_data["source"]["fields"] == [
@@ -527,10 +607,11 @@ test "update fields via x-www-form-urlencoded", %{conn: conn} do
|> json_response_and_validate_schema(200)
assert account["fields"] == [
- %{"name" => "foo", "value" => "bar"},
+ %{"name" => "foo", "value" => "bar", "verified_at" => nil},
%{
"name" => "link",
- "value" => ~S(http://cofe.io )
+ "value" => ~S(http://cofe.io ),
+ "verified_at" => nil
}
]
@@ -552,7 +633,7 @@ test "update fields with empty name", %{conn: conn} do
|> json_response_and_validate_schema(200)
assert account["fields"] == [
- %{"name" => "foo", "value" => ""}
+ %{"name" => "foo", "value" => "", "verified_at" => nil}
]
end
@@ -565,17 +646,17 @@ test "update fields when invalid request", %{conn: conn} do
fields = [%{"name" => "foo", "value" => long_value}]
- assert %{"error" => "Invalid request"} ==
+ assert %{"error" => "One or more field entries are too long"} ==
conn
|> patch("/api/v1/accounts/update_credentials", %{"fields_attributes" => fields})
- |> json_response_and_validate_schema(403)
+ |> json_response_and_validate_schema(413)
fields = [%{"name" => long_name, "value" => "bar"}]
- assert %{"error" => "Invalid request"} ==
+ assert %{"error" => "One or more field entries are too long"} ==
conn
|> patch("/api/v1/accounts/update_credentials", %{"fields_attributes" => fields})
- |> json_response_and_validate_schema(403)
+ |> json_response_and_validate_schema(413)
clear_config([:instance, :max_account_fields], 1)
@@ -584,10 +665,10 @@ test "update fields when invalid request", %{conn: conn} do
%{"name" => "link", "value" => "cofe.io"}
]
- assert %{"error" => "Invalid request"} ==
+ assert %{"error" => "Too many field entries"} ==
conn
|> patch("/api/v1/accounts/update_credentials", %{"fields_attributes" => fields})
- |> json_response_and_validate_schema(403)
+ |> json_response_and_validate_schema(413)
end
end
@@ -657,4 +738,20 @@ test "actor_type field has a higher priority than bot", %{conn: conn} do
assert account["source"]["pleroma"]["actor_type"] == "Person"
end
end
+
+ describe "Mark account as group" do
+ setup do: oauth_access(["write:accounts"])
+ setup :request_content_type
+
+ test "changing actor_type to Group makes account a Group and enables bot indicator for backward compatibility",
+ %{conn: conn} do
+ account =
+ conn
+ |> patch("/api/v1/accounts/update_credentials", %{actor_type: "Group"})
+ |> json_response_and_validate_schema(200)
+
+ assert account["bot"]
+ assert account["source"]["pleroma"]["actor_type"] == "Group"
+ end
+ end
end
diff --git a/test/pleroma/web/mastodon_api/views/account_view_test.exs b/test/pleroma/web/mastodon_api/views/account_view_test.exs
index 3bb4970caa..8dcdaf4472 100644
--- a/test/pleroma/web/mastodon_api/views/account_view_test.exs
+++ b/test/pleroma/web/mastodon_api/views/account_view_test.exs
@@ -5,11 +5,13 @@
defmodule Pleroma.Web.MastodonAPI.AccountViewTest do
use Pleroma.DataCase, async: false
+ alias Pleroma.UnstubbedConfigMock, as: ConfigMock
alias Pleroma.User
alias Pleroma.UserRelationship
alias Pleroma.Web.CommonAPI
alias Pleroma.Web.MastodonAPI.AccountView
+ import Mox
import Pleroma.Factory
import Tesla.Mock
@@ -35,7 +37,8 @@ test "Represent a user account" do
inserted_at: ~N[2017-08-15 15:47:06.597036],
emoji: %{"karjalanpiirakka" => "/file.png"},
raw_bio: "valid html. a\nb\nc\nd\nf '&<>\"",
- also_known_as: ["https://shitposter.zone/users/shp"]
+ also_known_as: ["https://shitposter.zone/users/shp"],
+ last_status_at: NaiveDateTime.utc_now()
})
expected = %{
@@ -74,7 +77,7 @@ test "Represent a user account" do
fields: []
},
fqn: "shp@shitposter.club",
- last_status_at: nil,
+ last_status_at: user.last_status_at |> NaiveDateTime.to_date() |> Date.to_iso8601(),
pleroma: %{
ap_id: user.ap_id,
also_known_as: ["https://shitposter.zone/users/shp"],
@@ -752,6 +755,9 @@ test "uses mediaproxy urls when it's enabled (regardless of media preview proxy
clear_config([:media_proxy, :enabled], true)
clear_config([:media_preview_proxy, :enabled])
+ ConfigMock
+ |> stub_with(Pleroma.Test.StaticConfig)
+
user =
insert(:user,
avatar: %{"url" => [%{"href" => "https://evil.website/avatar.png"}]},
@@ -759,7 +765,7 @@ test "uses mediaproxy urls when it's enabled (regardless of media preview proxy
emoji: %{"joker_smile" => "https://evil.website/society.png"}
)
- with media_preview_enabled <- [false, true] do
+ Enum.each([true, false], fn media_preview_enabled ->
clear_config([:media_preview_proxy, :enabled], media_preview_enabled)
AccountView.render("show.json", %{user: user, skip_visibility_check: true})
@@ -777,7 +783,7 @@ test "uses mediaproxy urls when it's enabled (regardless of media preview proxy
true
end)
|> assert()
- end
+ end)
end
test "renders mute expiration date" do
diff --git a/test/pleroma/web/mastodon_api/views/notification_view_test.exs b/test/pleroma/web/mastodon_api/views/notification_view_test.exs
index 6ea8946915..9896f81b61 100644
--- a/test/pleroma/web/mastodon_api/views/notification_view_test.exs
+++ b/test/pleroma/web/mastodon_api/views/notification_view_test.exs
@@ -22,6 +22,11 @@ defmodule Pleroma.Web.MastodonAPI.NotificationViewTest do
alias Pleroma.Web.PleromaAPI.Chat.MessageReferenceView
import Pleroma.Factory
+ setup do
+ Mox.stub_with(Pleroma.UnstubbedConfigMock, Pleroma.Config)
+ :ok
+ end
+
defp test_notifications_rendering(notifications, user, expected_result) do
result = NotificationView.render("index.json", %{notifications: notifications, for: user})
@@ -190,7 +195,47 @@ test "EmojiReact notification" do
emoji: "☕",
account: AccountView.render("show.json", %{user: other_user, for: user}),
status: StatusView.render("show.json", %{activity: activity, for: user}),
- created_at: Utils.to_masto_date(notification.inserted_at)
+ created_at: Utils.to_masto_date(notification.inserted_at),
+ emoji_url: nil
+ }
+
+ test_notifications_rendering([notification], user, [expected])
+ end
+
+ test "EmojiReact custom emoji notification" do
+ user = insert(:user)
+ other_user = insert(:user)
+
+ note =
+ insert(:note,
+ user: user,
+ data: %{
+ "reactions" => [
+ ["👍", [user.ap_id], nil],
+ ["dinosaur", [user.ap_id], "http://localhost:4001/emoji/dino walking.gif"]
+ ]
+ }
+ )
+
+ activity = insert(:note_activity, note: note, user: user)
+
+ {:ok, _activity} = CommonAPI.react_with_emoji(activity.id, other_user, "dinosaur")
+
+ activity = Repo.get(Activity, activity.id)
+
+ [notification] = Notification.for_user(user)
+
+ assert notification
+
+ expected = %{
+ id: to_string(notification.id),
+ pleroma: %{is_seen: false, is_muted: false},
+ type: "pleroma:emoji_reaction",
+ emoji: ":dinosaur:",
+ account: AccountView.render("show.json", %{user: other_user, for: user}),
+ status: StatusView.render("show.json", %{activity: activity, for: user}),
+ created_at: Utils.to_masto_date(notification.inserted_at),
+ emoji_url: "http://localhost:4001/emoji/dino walking.gif"
}
test_notifications_rendering([notification], user, [expected])
@@ -286,4 +331,31 @@ test "muted notification" do
test_notifications_rendering([notification], user, [expected])
end
+
+ test "Subscribed status notification" do
+ user = insert(:user)
+ subscriber = insert(:user)
+
+ User.subscribe(subscriber, user)
+
+ {:ok, activity} = CommonAPI.post(user, %{status: "hi"})
+ {:ok, [notification]} = Notification.create_notifications(activity)
+
+ user = User.get_cached_by_id(user.id)
+
+ expected = %{
+ id: to_string(notification.id),
+ pleroma: %{is_seen: false, is_muted: false},
+ type: "status",
+ account:
+ AccountView.render("show.json", %{
+ user: user,
+ for: subscriber
+ }),
+ status: StatusView.render("show.json", %{activity: activity, for: subscriber}),
+ created_at: Utils.to_masto_date(notification.inserted_at)
+ }
+
+ test_notifications_rendering([notification], subscriber, [expected])
+ end
end
diff --git a/test/pleroma/web/mastodon_api/views/poll_view_test.exs b/test/pleroma/web/mastodon_api/views/poll_view_test.exs
index a73d862fd6..3aa73c224e 100644
--- a/test/pleroma/web/mastodon_api/views/poll_view_test.exs
+++ b/test/pleroma/web/mastodon_api/views/poll_view_test.exs
@@ -43,7 +43,8 @@ test "renders a poll" do
%{title: "why are you even asking?", votes_count: 0}
],
votes_count: 0,
- voters_count: 0
+ voters_count: 0,
+ pleroma: %{non_anonymous: false}
}
result = PollView.render("show.json", %{object: object})
@@ -165,4 +166,11 @@ test "doesn't strips HTML tags" do
]
} = PollView.render("show.json", %{object: object})
end
+
+ test "that poll is non anonymous" do
+ object = Object.normalize("https://friends.grishka.me/posts/54642", fetch: true)
+ result = PollView.render("show.json", %{object: object})
+
+ assert result[:pleroma][:non_anonymous] == true
+ end
end
diff --git a/test/pleroma/web/mastodon_api/views/scheduled_activity_view_test.exs b/test/pleroma/web/mastodon_api/views/scheduled_activity_view_test.exs
index e5e510d33b..30b38c6c5f 100644
--- a/test/pleroma/web/mastodon_api/views/scheduled_activity_view_test.exs
+++ b/test/pleroma/web/mastodon_api/views/scheduled_activity_view_test.exs
@@ -4,12 +4,16 @@
defmodule Pleroma.Web.MastodonAPI.ScheduledActivityViewTest do
use Pleroma.DataCase, async: true
+
alias Pleroma.ScheduledActivity
+ alias Pleroma.UnstubbedConfigMock, as: ConfigMock
alias Pleroma.Web.ActivityPub.ActivityPub
alias Pleroma.Web.CommonAPI
alias Pleroma.Web.CommonAPI.Utils
alias Pleroma.Web.MastodonAPI.ScheduledActivityView
alias Pleroma.Web.MastodonAPI.StatusView
+
+ import Mox
import Pleroma.Factory
test "A scheduled activity with a media attachment" do
@@ -27,6 +31,9 @@ test "A scheduled activity with a media attachment" do
filename: "an_image.jpg"
}
+ ConfigMock
+ |> stub_with(Pleroma.Test.StaticConfig)
+
{:ok, upload} = ActivityPub.upload(file, actor: user.ap_id)
attrs = %{
@@ -48,7 +55,7 @@ test "A scheduled activity with a media attachment" do
id: to_string(scheduled_activity.id),
media_attachments:
%{media_ids: [upload.id]}
- |> Utils.attachments_from_ids()
+ |> Utils.attachments_from_ids(user)
|> Enum.map(&StatusView.render("attachment.json", %{attachment: &1})),
params: %{
in_reply_to_id: to_string(activity.id),
diff --git a/test/pleroma/web/mastodon_api/views/status_view_test.exs b/test/pleroma/web/mastodon_api/views/status_view_test.exs
index f76b115b7a..167692dfb7 100644
--- a/test/pleroma/web/mastodon_api/views/status_view_test.exs
+++ b/test/pleroma/web/mastodon_api/views/status_view_test.exs
@@ -11,17 +11,20 @@ defmodule Pleroma.Web.MastodonAPI.StatusViewTest do
alias Pleroma.HTML
alias Pleroma.Object
alias Pleroma.Repo
+ alias Pleroma.UnstubbedConfigMock, as: ConfigMock
alias Pleroma.User
alias Pleroma.UserRelationship
alias Pleroma.Web.CommonAPI
alias Pleroma.Web.MastodonAPI.AccountView
alias Pleroma.Web.MastodonAPI.StatusView
+ alias Pleroma.Web.RichMedia.Card
require Bitwise
+ import Mox
+ import OpenApiSpex.TestAssertions
import Pleroma.Factory
import Tesla.Mock
- import OpenApiSpex.TestAssertions
setup do
mock(fn env -> apply(HttpRequestMock, :request, [env]) end)
@@ -35,16 +38,26 @@ test "has an emoji reaction list" do
{:ok, activity} = CommonAPI.post(user, %{status: "dae cofe??"})
{:ok, _} = CommonAPI.react_with_emoji(activity.id, user, "☕")
+ {:ok, _} = CommonAPI.react_with_emoji(activity.id, user, ":dinosaur:")
{:ok, _} = CommonAPI.react_with_emoji(activity.id, third_user, "🍵")
{:ok, _} = CommonAPI.react_with_emoji(activity.id, other_user, "☕")
+ {:ok, _} = CommonAPI.react_with_emoji(activity.id, other_user, ":dinosaur:")
+
activity = Repo.get(Activity, activity.id)
status = StatusView.render("show.json", activity: activity)
assert_schema(status, "Status", Pleroma.Web.ApiSpec.spec())
assert status[:pleroma][:emoji_reactions] == [
- %{name: "☕", count: 2, me: false},
- %{name: "🍵", count: 1, me: false}
+ %{name: "☕", count: 2, me: false, url: nil, account_ids: [other_user.id, user.id]},
+ %{
+ count: 2,
+ me: false,
+ name: "dinosaur",
+ url: "http://localhost:4001/emoji/dino walking.gif",
+ account_ids: [other_user.id, user.id]
+ },
+ %{name: "🍵", count: 1, me: false, url: nil, account_ids: [third_user.id]}
]
status = StatusView.render("show.json", activity: activity, for: user)
@@ -52,8 +65,36 @@ test "has an emoji reaction list" do
assert_schema(status, "Status", Pleroma.Web.ApiSpec.spec())
assert status[:pleroma][:emoji_reactions] == [
- %{name: "☕", count: 2, me: true},
- %{name: "🍵", count: 1, me: false}
+ %{name: "☕", count: 2, me: true, url: nil, account_ids: [other_user.id, user.id]},
+ %{
+ count: 2,
+ me: true,
+ name: "dinosaur",
+ url: "http://localhost:4001/emoji/dino walking.gif",
+ account_ids: [other_user.id, user.id]
+ },
+ %{name: "🍵", count: 1, me: false, url: nil, account_ids: [third_user.id]}
+ ]
+ end
+
+ test "works with legacy-formatted reactions" do
+ user = insert(:user)
+ other_user = insert(:user)
+
+ note =
+ insert(:note,
+ user: user,
+ data: %{
+ "reactions" => [["😿", [other_user.ap_id]]]
+ }
+ )
+
+ activity = insert(:note_activity, user: user, note: note)
+
+ status = StatusView.render("show.json", activity: activity, for: user)
+
+ assert status[:pleroma][:emoji_reactions] == [
+ %{name: "😿", count: 1, me: false, url: nil, account_ids: [other_user.id]}
]
end
@@ -66,11 +107,10 @@ test "works correctly with badly formatted emojis" do
|> Object.update_data(%{"reactions" => %{"☕" => [user.ap_id], "x" => 1}})
activity = Activity.get_by_id(activity.id)
-
status = StatusView.render("show.json", activity: activity, for: user)
assert status[:pleroma][:emoji_reactions] == [
- %{name: "☕", count: 1, me: true}
+ %{name: "☕", count: 1, me: true, url: nil, account_ids: [user.id]}
]
end
@@ -90,7 +130,7 @@ test "doesn't show reactions from muted and blocked users" do
status = StatusView.render("show.json", activity: activity)
assert status[:pleroma][:emoji_reactions] == [
- %{name: "☕", count: 1, me: false}
+ %{name: "☕", count: 1, me: false, url: nil, account_ids: [other_user.id]}
]
status = StatusView.render("show.json", activity: activity, for: user)
@@ -102,19 +142,25 @@ test "doesn't show reactions from muted and blocked users" do
status = StatusView.render("show.json", activity: activity)
assert status[:pleroma][:emoji_reactions] == [
- %{name: "☕", count: 2, me: false}
+ %{
+ name: "☕",
+ count: 2,
+ me: false,
+ url: nil,
+ account_ids: [third_user.id, other_user.id]
+ }
]
status = StatusView.render("show.json", activity: activity, for: user)
assert status[:pleroma][:emoji_reactions] == [
- %{name: "☕", count: 1, me: false}
+ %{name: "☕", count: 1, me: false, url: nil, account_ids: [third_user.id]}
]
status = StatusView.render("show.json", activity: activity, for: other_user)
assert status[:pleroma][:emoji_reactions] == [
- %{name: "☕", count: 1, me: true}
+ %{name: "☕", count: 1, me: true, url: nil, account_ids: [other_user.id]}
]
end
@@ -155,6 +201,7 @@ test "returns the direct conversation id when given the `direct_conversation_id`
assert_schema(status, "Status", Pleroma.Web.ApiSpec.spec())
end
+ @tag capture_log: true
test "returns a temporary ap_id based user for activities missing db users" do
user = insert(:user)
@@ -283,6 +330,10 @@ test "a note activity" do
conversation_id: convo_id,
context: object_data["context"],
in_reply_to_account_acct: nil,
+ quote: nil,
+ quote_id: nil,
+ quote_url: nil,
+ quote_visible: false,
content: %{"text/plain" => HTML.strip_tags(object_data["content"])},
spoiler_text: %{"text/plain" => HTML.strip_tags(object_data["summary"])},
expires_at: nil,
@@ -290,7 +341,9 @@ test "a note activity" do
thread_muted: false,
emoji_reactions: [],
parent_visible: false,
- pinned_at: nil
+ pinned_at: nil,
+ quotes_count: 0,
+ bookmark_folder: nil
}
}
@@ -379,6 +432,88 @@ test "a reply" do
assert status.in_reply_to_id == to_string(note.id)
end
+ test "a quote post" do
+ post = insert(:note_activity)
+ user = insert(:user)
+
+ {:ok, quote_post} = CommonAPI.post(user, %{status: "he", quote_id: post.id})
+ {:ok, quoted_quote_post} = CommonAPI.post(user, %{status: "yo", quote_id: quote_post.id})
+
+ status = StatusView.render("show.json", %{activity: quoted_quote_post})
+
+ assert status.pleroma.quote.id == to_string(quote_post.id)
+ assert status.pleroma.quote_id == to_string(quote_post.id)
+ assert status.pleroma.quote_url == Object.normalize(quote_post).data["id"]
+ assert status.pleroma.quote_visible
+
+ # Quotes don't go more than one level deep
+ refute status.pleroma.quote.pleroma.quote
+ assert status.pleroma.quote.pleroma.quote_id == to_string(post.id)
+ assert status.pleroma.quote.pleroma.quote_url == Object.normalize(post).data["id"]
+ assert status.pleroma.quote.pleroma.quote_visible
+
+ # In an index
+ [status] = StatusView.render("index.json", %{activities: [quoted_quote_post], as: :activity})
+
+ assert status.pleroma.quote.id == to_string(quote_post.id)
+ end
+
+ test "quoted private post" do
+ user = insert(:user)
+
+ # Insert a private post
+ private = insert(:followers_only_note_activity, user: user)
+ private_object = Object.normalize(private)
+
+ # Create a public post quoting the private post
+ quote_private =
+ insert(:note_activity, note: insert(:note, data: %{"quoteUrl" => private_object.data["id"]}))
+
+ status = StatusView.render("show.json", %{activity: quote_private})
+
+ # The quote isn't rendered
+ refute status.pleroma.quote
+ assert status.pleroma.quote_url == private_object.data["id"]
+ refute status.pleroma.quote_visible
+
+ # After following the user, the quote is rendered
+ follower = insert(:user)
+ CommonAPI.follow(follower, user)
+
+ status = StatusView.render("show.json", %{activity: quote_private, for: follower})
+ assert status.pleroma.quote.id == to_string(private.id)
+ assert status.pleroma.quote_visible
+ end
+
+ test "quoted direct message" do
+ # Insert a direct message
+ direct = insert(:direct_note_activity)
+ direct_object = Object.normalize(direct)
+
+ # Create a public post quoting the direct message
+ quote_direct =
+ insert(:note_activity, note: insert(:note, data: %{"quoteUrl" => direct_object.data["id"]}))
+
+ status = StatusView.render("show.json", %{activity: quote_direct})
+
+ # The quote isn't rendered
+ refute status.pleroma.quote
+ assert status.pleroma.quote_url == direct_object.data["id"]
+ refute status.pleroma.quote_visible
+ end
+
+ test "repost of quote post" do
+ post = insert(:note_activity)
+ user = insert(:user)
+
+ {:ok, quote_post} = CommonAPI.post(user, %{status: "he", quote_id: post.id})
+ {:ok, repost} = CommonAPI.repeat(quote_post.id, user)
+
+ [status] = StatusView.render("index.json", %{activities: [repost], as: :activity})
+
+ assert status.reblog.pleroma.quote.id == to_string(post.id)
+ end
+
test "contains mentions" do
user = insert(:user)
mentioned = insert(:user)
@@ -456,45 +591,78 @@ test "create mentions from the 'tag' field" do
assert mention.url == recipient.ap_id
end
- test "attachments" do
- object = %{
- "type" => "Image",
- "url" => [
- %{
- "mediaType" => "image/png",
- "href" => "someurl",
- "width" => 200,
- "height" => 100
- }
- ],
- "blurhash" => "UJJ8X[xYW,%Jtq%NNFbXB5j]IVM|9GV=WHRn",
- "uuid" => 6
- }
+ describe "attachments" do
+ test "Complete Mastodon style" do
+ object = %{
+ "type" => "Image",
+ "url" => [
+ %{
+ "mediaType" => "image/png",
+ "href" => "someurl",
+ "width" => 200,
+ "height" => 100
+ }
+ ],
+ "blurhash" => "UJJ8X[xYW,%Jtq%NNFbXB5j]IVM|9GV=WHRn",
+ "uuid" => 6
+ }
- expected = %{
- id: "1638338801",
- type: "image",
- url: "someurl",
- remote_url: "someurl",
- preview_url: "someurl",
- text_url: "someurl",
- description: nil,
- pleroma: %{mime_type: "image/png"},
- meta: %{original: %{width: 200, height: 100, aspect: 2}},
- blurhash: "UJJ8X[xYW,%Jtq%NNFbXB5j]IVM|9GV=WHRn"
- }
+ expected = %{
+ id: "1638338801",
+ type: "image",
+ url: "someurl",
+ remote_url: "someurl",
+ preview_url: "someurl",
+ text_url: "someurl",
+ description: nil,
+ pleroma: %{mime_type: "image/png"},
+ meta: %{original: %{width: 200, height: 100, aspect: 2}},
+ blurhash: "UJJ8X[xYW,%Jtq%NNFbXB5j]IVM|9GV=WHRn"
+ }
- api_spec = Pleroma.Web.ApiSpec.spec()
+ api_spec = Pleroma.Web.ApiSpec.spec()
- assert expected == StatusView.render("attachment.json", %{attachment: object})
- assert_schema(expected, "Attachment", api_spec)
+ assert expected == StatusView.render("attachment.json", %{attachment: object})
+ assert_schema(expected, "Attachment", api_spec)
- # If theres a "id", use that instead of the generated one
- object = Map.put(object, "id", 2)
- result = StatusView.render("attachment.json", %{attachment: object})
+ # If theres a "id", use that instead of the generated one
+ object = Map.put(object, "id", 2)
+ result = StatusView.render("attachment.json", %{attachment: object})
- assert %{id: "2"} = result
- assert_schema(result, "Attachment", api_spec)
+ assert %{id: "2"} = result
+ assert_schema(result, "Attachment", api_spec)
+ end
+
+ test "Honkerific" do
+ object = %{
+ "type" => "Image",
+ "url" => [
+ %{
+ "mediaType" => "image/png",
+ "href" => "someurl"
+ }
+ ],
+ "name" => "fool.jpeg",
+ "summary" => "they have played us for absolute fools."
+ }
+
+ expected = %{
+ blurhash: nil,
+ description: "they have played us for absolute fools.",
+ id: "1638338801",
+ pleroma: %{mime_type: "image/png", name: "fool.jpeg"},
+ preview_url: "someurl",
+ remote_url: "someurl",
+ text_url: "someurl",
+ type: "image",
+ url: "someurl"
+ }
+
+ api_spec = Pleroma.Web.ApiSpec.spec()
+
+ assert expected == StatusView.render("attachment.json", %{attachment: object})
+ assert_schema(expected, "Attachment", api_spec)
+ end
end
test "put the url advertised in the Activity in to the url attribute" do
@@ -598,56 +766,105 @@ test "it returns a a dictionary tags" do
describe "rich media cards" do
test "a rich media card without a site name renders correctly" do
- page_url = "http://example.com"
+ page_url = "https://example.com"
- card = %{
- url: page_url,
- image: page_url <> "/example.jpg",
- title: "Example website"
- }
+ {:ok, card} =
+ Card.create(page_url, %{image: page_url <> "/example.jpg", title: "Example website"})
- %{provider_name: "example.com"} =
- StatusView.render("card.json", %{page_url: page_url, rich_media: card})
+ assert match?(%{provider_name: "example.com"}, StatusView.render("card.json", card))
end
test "a rich media card without a site name or image renders correctly" do
- page_url = "http://example.com"
+ page_url = "https://example.com"
- card = %{
- url: page_url,
- title: "Example website"
+ fields = %{
+ "url" => page_url,
+ "title" => "Example website"
}
- %{provider_name: "example.com"} =
- StatusView.render("card.json", %{page_url: page_url, rich_media: card})
+ {:ok, card} = Card.create(page_url, fields)
+
+ assert match?(%{provider_name: "example.com"}, StatusView.render("card.json", card))
end
test "a rich media card without an image renders correctly" do
- page_url = "http://example.com"
+ page_url = "https://example.com"
- card = %{
- url: page_url,
- site_name: "Example site name",
- title: "Example website"
+ fields = %{
+ "url" => page_url,
+ "site_name" => "Example site name",
+ "title" => "Example website"
}
- %{provider_name: "example.com"} =
- StatusView.render("card.json", %{page_url: page_url, rich_media: card})
+ {:ok, card} = Card.create(page_url, fields)
+
+ assert match?(%{provider_name: "example.com"}, StatusView.render("card.json", card))
+ end
+
+ test "a rich media card without descriptions returns the fields with empty strings" do
+ page_url = "https://example.com"
+
+ fields = %{
+ "url" => page_url,
+ "site_name" => "Example site name",
+ "title" => "Example website"
+ }
+
+ {:ok, card} = Card.create(page_url, fields)
+
+ assert match?(
+ %{description: "", image_description: ""},
+ StatusView.render("card.json", card)
+ )
end
test "a rich media card with all relevant data renders correctly" do
- page_url = "http://example.com"
+ page_url = "https://example.com"
- card = %{
- url: page_url,
- site_name: "Example site name",
- title: "Example website",
- image: page_url <> "/example.jpg",
- description: "Example description"
+ fields = %{
+ "url" => page_url,
+ "site_name" => "Example site name",
+ "title" => "Example website",
+ "image" => page_url <> "/example.jpg",
+ "description" => "Example description"
}
- %{provider_name: "example.com"} =
- StatusView.render("card.json", %{page_url: page_url, rich_media: card})
+ {:ok, card} = Card.create(page_url, fields)
+
+ assert match?(%{provider_name: "example.com"}, StatusView.render("card.json", card))
+ end
+
+ test "a rich media card has all media proxied" do
+ clear_config([:media_proxy, :enabled], true)
+ clear_config([:media_preview_proxy, :enabled])
+
+ ConfigMock
+ |> stub_with(Pleroma.Test.StaticConfig)
+
+ page_url = "https://example.com"
+
+ fields = %{
+ "url" => page_url,
+ "site_name" => "Example site name",
+ "title" => "Example website",
+ "image" => page_url <> "/example.jpg",
+ "audio" => page_url <> "/example.ogg",
+ "video" => page_url <> "/example.mp4",
+ "description" => "Example description"
+ }
+
+ {:ok, card} = Card.create(page_url, fields)
+
+ %{
+ provider_name: "example.com",
+ image: image,
+ pleroma: %{opengraph: og}
+ } = StatusView.render("card.json", card)
+
+ assert String.match?(image, ~r/\/proxy\//)
+ assert String.match?(og["image"], ~r/\/proxy\//)
+ assert String.match?(og["audio"], ~r/\/proxy\//)
+ assert String.match?(og["video"], ~r/\/proxy\//)
end
end
diff --git a/test/pleroma/web/media_proxy/media_proxy_controller_test.exs b/test/pleroma/web/media_proxy/media_proxy_controller_test.exs
index 5246bf0c4b..f0c1dd6406 100644
--- a/test/pleroma/web/media_proxy/media_proxy_controller_test.exs
+++ b/test/pleroma/web/media_proxy/media_proxy_controller_test.exs
@@ -6,10 +6,20 @@ defmodule Pleroma.Web.MediaProxy.MediaProxyControllerTest do
use Pleroma.Web.ConnCase
import Mock
+ import Mox
+ alias Pleroma.ReverseProxy.ClientMock
+ alias Pleroma.UnstubbedConfigMock, as: ConfigMock
alias Pleroma.Web.MediaProxy
alias Plug.Conn
+ setup do
+ ConfigMock
+ |> stub_with(Pleroma.Test.StaticConfig)
+
+ :ok
+ end
+
describe "Media Proxy" do
setup do
clear_config([:media_proxy, :enabled], true)
@@ -74,6 +84,20 @@ test "it returns 404 when url is in banned_urls cache", %{conn: conn, url: url}
assert %Conn{status: 404, resp_body: "Not Found"} = get(conn, url)
end
end
+
+ test "it applies sandbox CSP to MediaProxy requests", %{conn: conn} do
+ media_url = "https://lain.com/image.png"
+ media_proxy_url = MediaProxy.encode_url(media_url)
+
+ ClientMock
+ |> expect(:request, fn :get, ^media_url, _, _, _ ->
+ {:ok, 200, [{"content-type", "image/png"}]}
+ end)
+
+ %Conn{resp_headers: headers} = get(conn, media_proxy_url)
+
+ assert {"content-security-policy", "sandbox;"} in headers
+ end
end
describe "Media Preview Proxy" do
@@ -158,7 +182,7 @@ test "responds with 424 Failed Dependency if HEAD request to media proxy fails",
media_proxy_url: media_proxy_url
} do
Tesla.Mock.mock(fn
- %{method: "HEAD", url: ^media_proxy_url} ->
+ %{method: :head, url: ^media_proxy_url} ->
%Tesla.Env{status: 500, body: ""}
end)
@@ -173,7 +197,7 @@ test "redirects to media proxy URI on unsupported content type", %{
media_proxy_url: media_proxy_url
} do
Tesla.Mock.mock(fn
- %{method: "HEAD", url: ^media_proxy_url} ->
+ %{method: :head, url: ^media_proxy_url} ->
%Tesla.Env{status: 200, body: "", headers: [{"content-type", "application/pdf"}]}
end)
@@ -193,7 +217,7 @@ test "with `static=true` and GIF image preview requested, responds with JPEG ima
clear_config([:media_preview_proxy, :min_content_length], 1_000_000_000)
Tesla.Mock.mock(fn
- %{method: "HEAD", url: ^media_proxy_url} ->
+ %{method: :head, url: ^media_proxy_url} ->
%Tesla.Env{
status: 200,
body: "",
@@ -218,7 +242,7 @@ test "with GIF image preview requested and no `static` param, redirects to media
media_proxy_url: media_proxy_url
} do
Tesla.Mock.mock(fn
- %{method: "HEAD", url: ^media_proxy_url} ->
+ %{method: :head, url: ^media_proxy_url} ->
%Tesla.Env{status: 200, body: "", headers: [{"content-type", "image/gif"}]}
end)
@@ -236,7 +260,7 @@ test "with `static` param and non-GIF image preview requested, " <>
media_proxy_url: media_proxy_url
} do
Tesla.Mock.mock(fn
- %{method: "HEAD", url: ^media_proxy_url} ->
+ %{method: :head, url: ^media_proxy_url} ->
%Tesla.Env{status: 200, body: "", headers: [{"content-type", "image/jpeg"}]}
end)
@@ -256,7 +280,7 @@ test "with :min_content_length setting not matched by Content-Length header, " <
clear_config([:media_preview_proxy, :min_content_length], 100_000)
Tesla.Mock.mock(fn
- %{method: "HEAD", url: ^media_proxy_url} ->
+ %{method: :head, url: ^media_proxy_url} ->
%Tesla.Env{
status: 200,
body: "",
@@ -278,7 +302,7 @@ test "thumbnails PNG images into PNG", %{
assert_dependencies_installed()
Tesla.Mock.mock(fn
- %{method: "HEAD", url: ^media_proxy_url} ->
+ %{method: :head, url: ^media_proxy_url} ->
%Tesla.Env{status: 200, body: "", headers: [{"content-type", "image/png"}]}
%{method: :get, url: ^media_proxy_url} ->
@@ -300,7 +324,7 @@ test "thumbnails JPEG images into JPEG", %{
assert_dependencies_installed()
Tesla.Mock.mock(fn
- %{method: "HEAD", url: ^media_proxy_url} ->
+ %{method: :head, url: ^media_proxy_url} ->
%Tesla.Env{status: 200, body: "", headers: [{"content-type", "image/jpeg"}]}
%{method: :get, url: ^media_proxy_url} ->
@@ -320,7 +344,7 @@ test "redirects to media proxy URI in case of thumbnailing error", %{
media_proxy_url: media_proxy_url
} do
Tesla.Mock.mock(fn
- %{method: "HEAD", url: ^media_proxy_url} ->
+ %{method: :head, url: ^media_proxy_url} ->
%Tesla.Env{status: 200, body: "", headers: [{"content-type", "image/jpeg"}]}
%{method: :get, url: ^media_proxy_url} ->
diff --git a/test/pleroma/web/media_proxy_test.exs b/test/pleroma/web/media_proxy_test.exs
index ffab1247fc..718892665c 100644
--- a/test/pleroma/web/media_proxy_test.exs
+++ b/test/pleroma/web/media_proxy_test.exs
@@ -7,9 +7,19 @@ defmodule Pleroma.Web.MediaProxyTest do
use Pleroma.Tests.Helpers
alias Pleroma.Config
+ alias Pleroma.UnstubbedConfigMock, as: ConfigMock
alias Pleroma.Web.Endpoint
alias Pleroma.Web.MediaProxy
+ import Mox
+
+ setup do
+ ConfigMock
+ |> stub_with(Pleroma.Test.StaticConfig)
+
+ :ok
+ end
+
defp decode_result(encoded) do
{:ok, decoded} = MediaProxy.decode_url(encoded)
decoded
@@ -222,7 +232,12 @@ test "does not change whitelisted urls" do
test "ensure Pleroma.Upload base_url is always whitelisted" do
media_url = "https://media.pleroma.social"
- clear_config([Pleroma.Upload, :base_url], media_url)
+
+ ConfigMock
+ |> stub(:get, fn
+ [Pleroma.Upload, :base_url] -> media_url
+ path -> Pleroma.Test.StaticConfig.get(path)
+ end)
url = "#{media_url}/static/logo.png"
encoded = MediaProxy.url(url)
diff --git a/test/pleroma/web/metadata/providers/open_graph_test.exs b/test/pleroma/web/metadata/providers/open_graph_test.exs
index b7ce95f7db..6a0fc9b102 100644
--- a/test/pleroma/web/metadata/providers/open_graph_test.exs
+++ b/test/pleroma/web/metadata/providers/open_graph_test.exs
@@ -4,9 +4,19 @@
defmodule Pleroma.Web.Metadata.Providers.OpenGraphTest do
use Pleroma.DataCase
+ import Mox
import Pleroma.Factory
+
+ alias Pleroma.UnstubbedConfigMock, as: ConfigMock
alias Pleroma.Web.Metadata.Providers.OpenGraph
+ setup do
+ ConfigMock
+ |> stub_with(Pleroma.Test.StaticConfig)
+
+ :ok
+ end
+
setup do: clear_config([Pleroma.Web.Metadata, :unfurl_nsfw])
test "it renders all supported types of attachments and skips unknown types" do
diff --git a/test/pleroma/web/metadata/providers/rel_me_test.exs b/test/pleroma/web/metadata/providers/rel_me_test.exs
index cce4f3607b..793669037f 100644
--- a/test/pleroma/web/metadata/providers/rel_me_test.exs
+++ b/test/pleroma/web/metadata/providers/rel_me_test.exs
@@ -11,11 +11,24 @@ test "it renders all links with rel='me' from user bio" do
bio =
~s(https://some-link.com https://another-link.com )
- user = insert(:user, %{bio: bio})
+ fields = [
+ %{
+ "name" => "profile",
+ "value" => ~S(http://profile.com )
+ },
+ %{
+ "name" => "like",
+ "value" => ~S(http://cofe.io )
+ },
+ %{"name" => "foo", "value" => "bar"}
+ ]
+
+ user = insert(:user, %{bio: bio, fields: fields})
assert RelMe.build_tags(%{user: user}) == [
{:link, [rel: "me", href: "http://some3.com"], []},
- {:link, [rel: "me", href: "https://another-link.com"], []}
+ {:link, [rel: "me", href: "https://another-link.com"], []},
+ {:link, [rel: "me", href: "http://profile.com"], []}
]
end
end
diff --git a/test/pleroma/web/metadata/providers/twitter_card_test.exs b/test/pleroma/web/metadata/providers/twitter_card_test.exs
index be4cfbe7b2..f8d01c5c81 100644
--- a/test/pleroma/web/metadata/providers/twitter_card_test.exs
+++ b/test/pleroma/web/metadata/providers/twitter_card_test.exs
@@ -182,7 +182,8 @@ test "it renders supported types of attachments and skips unknown types" do
{:meta, [name: "twitter:title", content: Utils.user_name_string(user)], []},
{:meta, [name: "twitter:description", content: "pleroma in a nutshell"], []},
{:meta, [name: "twitter:card", content: "summary_large_image"], []},
- {:meta, [name: "twitter:player", content: "https://pleroma.gov/tenshi.png"], []},
+ {:meta, [name: "twitter:image", content: "https://pleroma.gov/tenshi.png"], []},
+ {:meta, [name: "twitter:image:alt", content: ""], []},
{:meta, [name: "twitter:player:width", content: "1280"], []},
{:meta, [name: "twitter:player:height", content: "1024"], []},
{:meta, [name: "twitter:card", content: "player"], []},
diff --git a/test/pleroma/web/metadata/utils_test.exs b/test/pleroma/web/metadata/utils_test.exs
index 85ef6033a7..3daf852fba 100644
--- a/test/pleroma/web/metadata/utils_test.exs
+++ b/test/pleroma/web/metadata/utils_test.exs
@@ -72,7 +72,7 @@ test "it does not return old content after editing" do
end
end
- describe "scrub_html_and_truncate/2" do
+ describe "scrub_html_and_truncate/3" do
test "it returns text without encode HTML" do
assert Utils.scrub_html_and_truncate("Pleroma's really cool!") == "Pleroma's really cool!"
end
diff --git a/test/pleroma/web/o_auth/mfa_controller_test.exs b/test/pleroma/web/o_auth/mfa_controller_test.exs
index 62404c768f..ac854e818d 100644
--- a/test/pleroma/web/o_auth/mfa_controller_test.exs
+++ b/test/pleroma/web/o_auth/mfa_controller_test.exs
@@ -214,7 +214,7 @@ test "returns error when otp code is invalid", %{conn: conn, user: user, app: ap
assert response == %{"error" => "Invalid code"}
end
- test "returns error when client credentails is wrong ", %{conn: conn, user: user} do
+ test "returns error when client credentials is wrong ", %{conn: conn, user: user} do
otp_token = TOTP.generate_token(user.multi_factor_authentication_settings.totp.secret)
mfa_token = insert(:mfa_token, user: user)
diff --git a/test/pleroma/web/o_auth/o_auth_controller_test.exs b/test/pleroma/web/o_auth/o_auth_controller_test.exs
index f41d6a322d..83a08d9fc2 100644
--- a/test/pleroma/web/o_auth/o_auth_controller_test.exs
+++ b/test/pleroma/web/o_auth/o_auth_controller_test.exs
@@ -186,7 +186,7 @@ test "on authentication error, GET /oauth//callback redirects to `redi
assert html_response(conn, 302)
assert redirected_to(conn) == app.redirect_uris
- assert get_flash(conn, :error) == "Failed to authenticate: (error description)."
+ assert conn.assigns.flash["error"] == "Failed to authenticate: (error description)."
end
test "GET /oauth/registration_details renders registration details form", %{
@@ -307,7 +307,7 @@ test "with invalid params, POST /oauth/register?op=register renders registration
|> post("/oauth/register", bad_params)
assert html_response(conn, 403) =~ ~r/name="op" type="submit" value="register"/
- assert get_flash(conn, :error) == "Error: #{bad_param} has already been taken."
+ assert conn.assigns.flash["error"] == "Error: #{bad_param} has already been taken."
end
end
@@ -398,7 +398,7 @@ test "with invalid params, POST /oauth/register?op=connect renders registration_
|> post("/oauth/register", params)
assert html_response(conn, 401) =~ ~r/name="op" type="submit" value="connect"/
- assert get_flash(conn, :error) == "Invalid Username/Password"
+ assert conn.assigns.flash["error"] == "Invalid Username/Password"
end
end
diff --git a/test/pleroma/web/o_auth/token/utils_test.exs b/test/pleroma/web/o_auth/token/utils_test.exs
index e688ad7504..f4027985d5 100644
--- a/test/pleroma/web/o_auth/token/utils_test.exs
+++ b/test/pleroma/web/o_auth/token/utils_test.exs
@@ -13,7 +13,7 @@ test "returns error when credentials is invalid" do
Utils.fetch_app(%Plug.Conn{params: %{"client_id" => 1, "client_secret" => "x"}})
end
- test "returns App by params credentails" do
+ test "returns App by params credentials" do
app = insert(:oauth_app)
assert {:ok, load_app} =
@@ -24,7 +24,7 @@ test "returns App by params credentails" do
assert load_app == app
end
- test "returns App by header credentails" do
+ test "returns App by header credentials" do
app = insert(:oauth_app)
header = "Basic " <> Base.encode64("#{app.client_id}:#{app.client_secret}")
diff --git a/test/pleroma/web/o_status/o_status_controller_test.exs b/test/pleroma/web/o_status/o_status_controller_test.exs
index 36e581f5ee..3e8fcd956a 100644
--- a/test/pleroma/web/o_status/o_status_controller_test.exs
+++ b/test/pleroma/web/o_status/o_status_controller_test.exs
@@ -196,7 +196,7 @@ test "render html for redirect for html format", %{conn: conn} do
|> get("/notice/#{like_activity.id}")
|> response(200)
- assert resp =~ ""
+ refute resp =~ ~r( Mox.stub_with(Pleroma.Config)
+
oauth_access(["read:backups"])
end
diff --git a/test/pleroma/web/pleroma_api/controllers/bookmark_folder_controller_test.exs b/test/pleroma/web/pleroma_api/controllers/bookmark_folder_controller_test.exs
new file mode 100644
index 0000000000..9bd90ed2e4
--- /dev/null
+++ b/test/pleroma/web/pleroma_api/controllers/bookmark_folder_controller_test.exs
@@ -0,0 +1,161 @@
+# Pleroma: A lightweight social networking server
+# Copyright © 2017-2024 Pleroma Authors
+# SPDX-License-Identifier: AGPL-3.0-only
+defmodule Pleroma.Web.PleromaAPI.BookmarkFolderControllerTest do
+ use Pleroma.Web.ConnCase
+
+ alias Pleroma.BookmarkFolder
+ # alias Pleroma.Object
+ # alias Pleroma.Tests.Helpers
+ # alias Pleroma.UnstubbedConfigMock, as: ConfigMock
+ # alias Pleroma.User
+ # alias Pleroma.Web.ActivityPub.ActivityPub
+ # alias Pleroma.Web.CommonAPI
+
+ # import Mox
+ import Pleroma.Factory
+
+ describe "GET /api/v1/pleroma/bookmark_folders" do
+ setup do: oauth_access(["read:bookmarks"])
+
+ test "it lists bookmark folders", %{conn: conn, user: user} do
+ {:ok, folder} = BookmarkFolder.create(user.id, "Bookmark folder")
+
+ folder_id = folder.id
+
+ result =
+ conn
+ |> get("/api/v1/pleroma/bookmark_folders")
+ |> json_response_and_validate_schema(200)
+
+ assert [
+ %{
+ "id" => ^folder_id,
+ "name" => "Bookmark folder",
+ "emoji" => nil,
+ "emoji_url" => nil
+ }
+ ] = result
+ end
+ end
+
+ describe "POST /api/v1/pleroma/bookmark_folders" do
+ setup do: oauth_access(["write:bookmarks"])
+
+ test "it creates a bookmark folder", %{conn: conn} do
+ result =
+ conn
+ |> put_req_header("content-type", "application/json")
+ |> post("/api/v1/pleroma/bookmark_folders", %{
+ name: "Bookmark folder",
+ emoji: "📁"
+ })
+ |> json_response_and_validate_schema(200)
+
+ assert %{
+ "name" => "Bookmark folder",
+ "emoji" => "📁",
+ "emoji_url" => nil
+ } = result
+ end
+
+ test "it creates a bookmark folder with custom emoji", %{conn: conn} do
+ result =
+ conn
+ |> put_req_header("content-type", "application/json")
+ |> post("/api/v1/pleroma/bookmark_folders", %{
+ name: "Bookmark folder",
+ emoji: ":firefox:"
+ })
+ |> json_response_and_validate_schema(200)
+
+ assert %{
+ "name" => "Bookmark folder",
+ "emoji" => ":firefox:",
+ "emoji_url" => "http://localhost:4001/emoji/Firefox.gif"
+ } = result
+ end
+
+ test "it returns error for invalid emoji", %{conn: conn} do
+ result =
+ conn
+ |> put_req_header("content-type", "application/json")
+ |> post("/api/v1/pleroma/bookmark_folders", %{
+ name: "Bookmark folder",
+ emoji: "not an emoji"
+ })
+ |> json_response_and_validate_schema(422)
+
+ assert %{"error" => "Invalid emoji"} = result
+ end
+ end
+
+ describe "PATCH /api/v1/pleroma/bookmark_folders/:id" do
+ setup do: oauth_access(["write:bookmarks"])
+
+ test "it updates a bookmark folder", %{conn: conn, user: user} do
+ {:ok, folder} = BookmarkFolder.create(user.id, "Bookmark folder")
+
+ result =
+ conn
+ |> put_req_header("content-type", "application/json")
+ |> patch("/api/v1/pleroma/bookmark_folders/#{folder.id}", %{
+ name: "bookmark folder"
+ })
+ |> json_response_and_validate_schema(200)
+
+ assert %{
+ "name" => "bookmark folder"
+ } = result
+ end
+
+ test "it returns error when updating others' folders", %{conn: conn} do
+ other_user = insert(:user)
+
+ {:ok, folder} = BookmarkFolder.create(other_user.id, "Bookmark folder")
+
+ result =
+ conn
+ |> put_req_header("content-type", "application/json")
+ |> patch("/api/v1/pleroma/bookmark_folders/#{folder.id}", %{
+ name: "bookmark folder"
+ })
+ |> json_response_and_validate_schema(403)
+
+ assert %{
+ "error" => "Access denied"
+ } = result
+ end
+ end
+
+ describe "DELETE /api/v1/pleroma/bookmark_folders/:id" do
+ setup do: oauth_access(["write:bookmarks"])
+
+ test "it deleting a bookmark folder", %{conn: conn, user: user} do
+ {:ok, folder} = BookmarkFolder.create(user.id, "Bookmark folder")
+
+ assert conn
+ |> delete("/api/v1/pleroma/bookmark_folders/#{folder.id}")
+ |> json_response_and_validate_schema(200)
+
+ folders = BookmarkFolder.for_user(user.id)
+
+ assert length(folders) == 0
+ end
+
+ test "it returns error when deleting others' folders", %{conn: conn} do
+ other_user = insert(:user)
+
+ {:ok, folder} = BookmarkFolder.create(other_user.id, "Bookmark folder")
+
+ result =
+ conn
+ |> patch("/api/v1/pleroma/bookmark_folders/#{folder.id}")
+ |> json_response_and_validate_schema(403)
+
+ assert %{
+ "error" => "Access denied"
+ } = result
+ end
+ end
+end
diff --git a/test/pleroma/web/pleroma_api/controllers/chat_controller_test.exs b/test/pleroma/web/pleroma_api/controllers/chat_controller_test.exs
index aa40c6f440..0d34525599 100644
--- a/test/pleroma/web/pleroma_api/controllers/chat_controller_test.exs
+++ b/test/pleroma/web/pleroma_api/controllers/chat_controller_test.exs
@@ -7,10 +7,13 @@ defmodule Pleroma.Web.PleromaAPI.ChatControllerTest do
alias Pleroma.Chat
alias Pleroma.Chat.MessageReference
alias Pleroma.Object
+ alias Pleroma.Tests.Helpers
+ alias Pleroma.UnstubbedConfigMock, as: ConfigMock
alias Pleroma.User
alias Pleroma.Web.ActivityPub.ActivityPub
alias Pleroma.Web.CommonAPI
+ import Mox
import Pleroma.Factory
describe "POST /api/v1/pleroma/chats/:id/messages/:message_id/read" do
@@ -112,6 +115,9 @@ test "it works with an attachment", %{conn: conn, user: user} do
filename: "an_image.jpg"
}
+ ConfigMock
+ |> stub_with(Pleroma.Test.StaticConfig)
+
{:ok, upload} = ActivityPub.upload(file, actor: user.ap_id)
other_user = insert(:user)
@@ -207,36 +213,63 @@ test "it paginates", %{conn: conn, user: user} do
result = json_response_and_validate_schema(response, 200)
[next, prev] = get_resp_header(response, "link") |> hd() |> String.split(", ")
- api_endpoint = "/api/v1/pleroma/chats/"
+ api_endpoint = Pleroma.Web.Endpoint.url() <> "/api/v1/pleroma/chats/"
+
+ [next_url, next_rel] = String.split(next, ";")
+ next_url = String.trim_trailing(next_url, ">") |> String.trim_leading("<")
+
+ next_url_sorted = Helpers.uri_query_sort(next_url)
assert String.match?(
- next,
- ~r(#{api_endpoint}.*/messages\?limit=\d+&max_id=.*; rel=\"next\"$)
+ next_url_sorted,
+ ~r(#{api_endpoint}.*/messages\?limit=\d+&max_id=.*&offset=\d+$)
)
+ assert next_rel =~ "next"
+
+ [prev_url, prev_rel] = String.split(prev, ";")
+ prev_url = String.trim_trailing(prev_url, ">") |> String.trim_leading("<")
+
+ prev_url_sorted = Helpers.uri_query_sort(prev_url)
+
assert String.match?(
- prev,
- ~r(#{api_endpoint}.*/messages\?limit=\d+&min_id=.*; rel=\"prev\"$)
+ prev_url_sorted,
+ ~r(#{api_endpoint}.*/messages\?limit=\d+&min_id=.*&offset=\d+$)
)
+ assert prev_rel =~ "prev"
+
assert length(result) == 20
- response =
- get(conn, "/api/v1/pleroma/chats/#{chat.id}/messages?max_id=#{List.last(result)["id"]}")
+ response = get(conn, "#{api_endpoint}#{chat.id}/messages?max_id=#{List.last(result)["id"]}")
result = json_response_and_validate_schema(response, 200)
[next, prev] = get_resp_header(response, "link") |> hd() |> String.split(", ")
- assert String.match?(
- next,
- ~r(#{api_endpoint}.*/messages\?limit=\d+&max_id=.*; rel=\"next\"$)
- )
+ [next_url, next_rel] = String.split(next, ";")
+ next_url = String.trim_trailing(next_url, ">") |> String.trim_leading("<")
+
+ next_url_sorted = Helpers.uri_query_sort(next_url)
assert String.match?(
- prev,
- ~r(#{api_endpoint}.*/messages\?limit=\d+&max_id=.*&min_id=.*; rel=\"prev\"$)
+ next_url_sorted,
+ ~r(#{api_endpoint}.*/messages\?limit=\d+&max_id=.*&offset=\d+$)
)
+ assert next_rel =~ "next"
+
+ [prev_url, prev_rel] = String.split(prev, ";")
+ prev_url = String.trim_trailing(prev_url, ">") |> String.trim_leading("<")
+
+ prev_url_sorted = Helpers.uri_query_sort(prev_url)
+
+ assert String.match?(
+ prev_url_sorted,
+ ~r(#{api_endpoint}.*/messages\?limit=\d+&max_id=.*&min_id=.*&offset=\d+$)
+ )
+
+ assert prev_rel =~ "prev"
+
assert length(result) == 10
end
diff --git a/test/pleroma/web/pleroma_api/controllers/emoji_pack_controller_test.exs b/test/pleroma/web/pleroma_api/controllers/emoji_pack_controller_test.exs
index 1d52406390..92334487c5 100644
--- a/test/pleroma/web/pleroma_api/controllers/emoji_pack_controller_test.exs
+++ b/test/pleroma/web/pleroma_api/controllers/emoji_pack_controller_test.exs
@@ -116,7 +116,7 @@ test "shareable instance", %{admin_conn: admin_conn, conn: conn} do
%{method: :get, url: "https://example.com/nodeinfo/2.1.json"} ->
json(%{metadata: %{features: ["shareable_emoji_packs"]}})
- %{method: :get, url: "https://example.com/api/pleroma/emoji/packs?page=2&page_size=1"} ->
+ %{method: :get, url: "https://example.com/api/v1/pleroma/emoji/packs?page=2&page_size=1"} ->
json(resp)
end)
@@ -199,7 +199,7 @@ test "shared pack from remote and non shared from fallback-src", %{
%{
method: :get,
- url: "https://example.com/api/pleroma/emoji/pack?name=test_pack"
+ url: "https://example.com/api/v1/pleroma/emoji/pack?name=test_pack&page_size=" <> _n
} ->
conn
|> get("/api/pleroma/emoji/pack?name=test_pack")
@@ -208,7 +208,7 @@ test "shared pack from remote and non shared from fallback-src", %{
%{
method: :get,
- url: "https://example.com/api/pleroma/emoji/packs/archive?name=test_pack"
+ url: "https://example.com/api/v1/pleroma/emoji/packs/archive?name=test_pack"
} ->
conn
|> get("/api/pleroma/emoji/packs/archive?name=test_pack")
@@ -217,7 +217,9 @@ test "shared pack from remote and non shared from fallback-src", %{
%{
method: :get,
- url: "https://example.com/api/pleroma/emoji/pack?name=test_pack_nonshared"
+ url:
+ "https://example.com/api/v1/pleroma/emoji/pack?name=test_pack_nonshared&page_size=" <>
+ _n
} ->
conn
|> get("/api/pleroma/emoji/pack?name=test_pack_nonshared")
@@ -305,14 +307,14 @@ test "checksum fail", %{admin_conn: admin_conn} do
%{
method: :get,
- url: "https://example.com/api/pleroma/emoji/pack?name=pack_bad_sha"
+ url: "https://example.com/api/v1/pleroma/emoji/pack?name=pack_bad_sha&page_size=" <> _n
} ->
{:ok, pack} = Pleroma.Emoji.Pack.load_pack("pack_bad_sha")
%Tesla.Env{status: 200, body: Jason.encode!(pack)}
%{
method: :get,
- url: "https://example.com/api/pleroma/emoji/packs/archive?name=pack_bad_sha"
+ url: "https://example.com/api/v1/pleroma/emoji/packs/archive?name=pack_bad_sha"
} ->
%Tesla.Env{
status: 200,
@@ -342,7 +344,7 @@ test "other error", %{admin_conn: admin_conn} do
%{
method: :get,
- url: "https://example.com/api/pleroma/emoji/pack?name=test_pack"
+ url: "https://example.com/api/v1/pleroma/emoji/pack?name=test_pack&page_size=" <> _n
} ->
{:ok, pack} = Pleroma.Emoji.Pack.load_pack("test_pack")
%Tesla.Env{status: 200, body: Jason.encode!(pack)}
diff --git a/test/pleroma/web/pleroma_api/controllers/emoji_reaction_controller_test.exs b/test/pleroma/web/pleroma_api/controllers/emoji_reaction_controller_test.exs
index 77c75b560a..8c2dcc1bb9 100644
--- a/test/pleroma/web/pleroma_api/controllers/emoji_reaction_controller_test.exs
+++ b/test/pleroma/web/pleroma_api/controllers/emoji_reaction_controller_test.exs
@@ -13,27 +13,122 @@ defmodule Pleroma.Web.PleromaAPI.EmojiReactionControllerTest do
import Pleroma.Factory
+ setup do
+ Mox.stub_with(Pleroma.UnstubbedConfigMock, Pleroma.Config)
+ :ok
+ end
+
test "PUT /api/v1/pleroma/statuses/:id/reactions/:emoji", %{conn: conn} do
user = insert(:user)
other_user = insert(:user)
- {:ok, activity} = CommonAPI.post(user, %{status: "#cofe"})
+ note = insert(:note, user: user, data: %{"reactions" => [["👍", [other_user.ap_id], nil]]})
+ activity = insert(:note_activity, note: note, user: user)
result =
conn
|> assign(:user, other_user)
|> assign(:token, insert(:oauth_token, user: other_user, scopes: ["write:statuses"]))
- |> put("/api/v1/pleroma/statuses/#{activity.id}/reactions/☕")
+ |> put("/api/v1/pleroma/statuses/#{activity.id}/reactions/\u26A0")
|> json_response_and_validate_schema(200)
- # We return the status, but this our implementation detail.
assert %{"id" => id} = result
assert to_string(activity.id) == id
assert result["pleroma"]["emoji_reactions"] == [
- %{"name" => "☕", "count" => 1, "me" => true}
+ %{
+ "name" => "👍",
+ "count" => 1,
+ "me" => true,
+ "url" => nil,
+ "account_ids" => [other_user.id]
+ },
+ %{
+ "name" => "\u26A0\uFE0F",
+ "count" => 1,
+ "me" => true,
+ "url" => nil,
+ "account_ids" => [other_user.id]
+ }
]
+ {:ok, activity} = CommonAPI.post(user, %{status: "#cofe"})
+
+ ObanHelpers.perform_all()
+
+ # Reacting with a custom emoji
+ result =
+ conn
+ |> assign(:user, other_user)
+ |> assign(:token, insert(:oauth_token, user: other_user, scopes: ["write:statuses"]))
+ |> put("/api/v1/pleroma/statuses/#{activity.id}/reactions/:dinosaur:")
+ |> json_response_and_validate_schema(200)
+
+ assert %{"id" => id} = result
+ assert to_string(activity.id) == id
+
+ assert result["pleroma"]["emoji_reactions"] == [
+ %{
+ "name" => "dinosaur",
+ "count" => 1,
+ "me" => true,
+ "url" => "http://localhost:4001/emoji/dino walking.gif",
+ "account_ids" => [other_user.id]
+ }
+ ]
+
+ # Reacting with a remote emoji
+ note =
+ insert(:note,
+ user: user,
+ data: %{
+ "reactions" => [
+ ["👍", [other_user.ap_id], nil],
+ ["wow", [other_user.ap_id], "https://remote/emoji/wow"]
+ ]
+ }
+ )
+
+ activity = insert(:note_activity, note: note, user: user)
+
+ result =
+ conn
+ |> assign(:user, user)
+ |> assign(:token, insert(:oauth_token, user: user, scopes: ["write:statuses"]))
+ |> put("/api/v1/pleroma/statuses/#{activity.id}/reactions/:wow@remote:")
+ |> json_response(200)
+
+ assert result["pleroma"]["emoji_reactions"] == [
+ %{
+ "account_ids" => [other_user.id],
+ "count" => 1,
+ "me" => false,
+ "name" => "👍",
+ "url" => nil
+ },
+ %{
+ "name" => "wow@remote",
+ "count" => 2,
+ "me" => true,
+ "url" => "https://remote/emoji/wow",
+ "account_ids" => [user.id, other_user.id]
+ }
+ ]
+
+ # Reacting with a remote custom emoji that hasn't been reacted with yet
+ note =
+ insert(:note,
+ user: user
+ )
+
+ activity = insert(:note_activity, note: note, user: user)
+
+ assert conn
+ |> assign(:user, user)
+ |> assign(:token, insert(:oauth_token, user: user, scopes: ["write:statuses"]))
+ |> put("/api/v1/pleroma/statuses/#{activity.id}/reactions/:wow@remote:")
+ |> json_response(400)
+
# Reacting with a non-emoji
assert conn
|> assign(:user, other_user)
@@ -46,8 +141,21 @@ test "DELETE /api/v1/pleroma/statuses/:id/reactions/:emoji", %{conn: conn} do
user = insert(:user)
other_user = insert(:user)
- {:ok, activity} = CommonAPI.post(user, %{status: "#cofe"})
+ note =
+ insert(:note,
+ user: user,
+ data: %{"reactions" => [["wow", [user.ap_id], "https://remote/emoji/wow"]]}
+ )
+
+ activity = insert(:note_activity, note: note, user: user)
+
+ ObanHelpers.perform_all()
+
{:ok, _reaction_activity} = CommonAPI.react_with_emoji(activity.id, other_user, "☕")
+ {:ok, _reaction_activity} = CommonAPI.react_with_emoji(activity.id, other_user, ":dinosaur:")
+
+ {:ok, _reaction_activity} =
+ CommonAPI.react_with_emoji(activity.id, other_user, ":wow@remote:")
ObanHelpers.perform_all()
@@ -60,11 +168,47 @@ test "DELETE /api/v1/pleroma/statuses/:id/reactions/:emoji", %{conn: conn} do
assert %{"id" => id} = json_response_and_validate_schema(result, 200)
assert to_string(activity.id) == id
+ # Remove custom emoji
+
+ result =
+ conn
+ |> assign(:user, other_user)
+ |> assign(:token, insert(:oauth_token, user: other_user, scopes: ["write:statuses"]))
+ |> delete("/api/v1/pleroma/statuses/#{activity.id}/reactions/:dinosaur:")
+
+ assert %{"id" => id} = json_response_and_validate_schema(result, 200)
+ assert to_string(activity.id) == id
+
ObanHelpers.perform_all()
object = Object.get_by_ap_id(activity.data["object"])
- assert object.data["reaction_count"] == 0
+ assert object.data["reaction_count"] == 2
+
+ # Remove custom remote emoji
+ result =
+ conn
+ |> assign(:user, other_user)
+ |> assign(:token, insert(:oauth_token, user: other_user, scopes: ["write:statuses"]))
+ |> delete("/api/v1/pleroma/statuses/#{activity.id}/reactions/:wow@remote:")
+ |> json_response(200)
+
+ assert result["pleroma"]["emoji_reactions"] == [
+ %{
+ "name" => "wow@remote",
+ "count" => 1,
+ "me" => false,
+ "url" => "https://remote/emoji/wow",
+ "account_ids" => [user.id]
+ }
+ ]
+
+ # Remove custom remote emoji that hasn't been reacted with yet
+ assert conn
+ |> assign(:user, other_user)
+ |> assign(:token, insert(:oauth_token, user: other_user, scopes: ["write:statuses"]))
+ |> delete("/api/v1/pleroma/statuses/#{activity.id}/reactions/:zoop@remote:")
+ |> json_response(400)
end
test "GET /api/v1/pleroma/statuses/:id/reactions", %{conn: conn} do
@@ -106,6 +250,38 @@ test "GET /api/v1/pleroma/statuses/:id/reactions", %{conn: conn} do
result
end
+ test "GET /api/v1/pleroma/statuses/:id/reactions with legacy format", %{conn: conn} do
+ user = insert(:user)
+ other_user = insert(:user)
+
+ note =
+ insert(:note,
+ user: user,
+ data: %{
+ "reactions" => [["😿", [other_user.ap_id]]]
+ }
+ )
+
+ activity = insert(:note_activity, user: user, note: note)
+
+ result =
+ conn
+ |> get("/api/v1/pleroma/statuses/#{activity.id}/reactions")
+ |> json_response_and_validate_schema(200)
+
+ other_user_id = other_user.id
+
+ assert [
+ %{
+ "name" => "😿",
+ "count" => 1,
+ "me" => false,
+ "url" => nil,
+ "accounts" => [%{"id" => ^other_user_id}]
+ }
+ ] = result
+ end
+
test "GET /api/v1/pleroma/statuses/:id/reactions?with_muted=true", %{conn: conn} do
user = insert(:user)
user2 = insert(:user)
@@ -181,7 +357,15 @@ test "GET /api/v1/pleroma/statuses/:id/reactions/:emoji", %{conn: conn} do
{:ok, _} = CommonAPI.react_with_emoji(activity.id, other_user, "🎅")
{:ok, _} = CommonAPI.react_with_emoji(activity.id, other_user, "☕")
- assert [%{"name" => "🎅", "count" => 1, "accounts" => [represented_user], "me" => false}] =
+ assert [
+ %{
+ "name" => "🎅",
+ "count" => 1,
+ "accounts" => [represented_user],
+ "me" => false,
+ "url" => nil
+ }
+ ] =
conn
|> get("/api/v1/pleroma/statuses/#{activity.id}/reactions/🎅")
|> json_response_and_validate_schema(200)
diff --git a/test/pleroma/web/pleroma_api/controllers/instances_controller_test.exs b/test/pleroma/web/pleroma_api/controllers/instances_controller_test.exs
index 365d26ab19..0d4951a73d 100644
--- a/test/pleroma/web/pleroma_api/controllers/instances_controller_test.exs
+++ b/test/pleroma/web/pleroma_api/controllers/instances_controller_test.exs
@@ -16,7 +16,7 @@ defmodule Pleroma.Web.PleromaApi.InstancesControllerTest do
{:ok, %Pleroma.Instances.Instance{unreachable_since: constant_unreachable}} =
Instances.set_consistently_unreachable(constant)
- _eventual_unrechable = Instances.set_unreachable(eventual)
+ _eventual_unreachable = Instances.set_unreachable(eventual)
%{constant_unreachable: constant_unreachable, constant: constant}
end
@@ -26,6 +26,8 @@ test "GET /api/v1/pleroma/federation_status", %{
constant_unreachable: constant_unreachable,
constant: constant
} do
+ clear_config([:instance, :public], false)
+
constant_host = URI.parse(constant).host
assert conn
diff --git a/test/pleroma/web/pleroma_api/controllers/mascot_controller_test.exs b/test/pleroma/web/pleroma_api/controllers/mascot_controller_test.exs
index b72569d4bb..81f09cdd1a 100644
--- a/test/pleroma/web/pleroma_api/controllers/mascot_controller_test.exs
+++ b/test/pleroma/web/pleroma_api/controllers/mascot_controller_test.exs
@@ -5,8 +5,11 @@
defmodule Pleroma.Web.PleromaAPI.MascotControllerTest do
use Pleroma.Web.ConnCase, async: true
+ alias Pleroma.UnstubbedConfigMock, as: ConfigMock
alias Pleroma.User
+ import Mox
+
test "mascot upload" do
%{conn: conn} = oauth_access(["write:accounts"])
@@ -29,6 +32,9 @@ test "mascot upload" do
filename: "an_image.jpg"
}
+ ConfigMock
+ |> stub_with(Pleroma.Test.StaticConfig)
+
conn =
conn
|> put_req_header("content-type", "multipart/form-data")
@@ -53,6 +59,9 @@ test "mascot retrieving" do
filename: "an_image.jpg"
}
+ ConfigMock
+ |> stub_with(Pleroma.Test.StaticConfig)
+
ret_conn =
conn
|> put_req_header("content-type", "multipart/form-data")
diff --git a/test/pleroma/web/pleroma_api/controllers/notification_controller_test.exs b/test/pleroma/web/pleroma_api/controllers/notification_controller_test.exs
index b8c7964f9c..036cbf1767 100644
--- a/test/pleroma/web/pleroma_api/controllers/notification_controller_test.exs
+++ b/test/pleroma/web/pleroma_api/controllers/notification_controller_test.exs
@@ -21,13 +21,11 @@ test "it marks a single notification as read", %{user: user1, conn: conn} do
{:ok, [notification1]} = Notification.create_notifications(activity1)
{:ok, [notification2]} = Notification.create_notifications(activity2)
- response =
- conn
- |> put_req_header("content-type", "application/json")
- |> post("/api/v1/pleroma/notifications/read", %{id: notification1.id})
- |> json_response_and_validate_schema(:ok)
+ conn
+ |> put_req_header("content-type", "application/json")
+ |> post("/api/v1/pleroma/notifications/read", %{id: notification1.id})
+ |> json_response_and_validate_schema(:ok)
- assert %{"pleroma" => %{"is_seen" => true}} = response
assert Repo.get(Notification, notification1.id).seen
refute Repo.get(Notification, notification2.id).seen
end
@@ -40,14 +38,17 @@ test "it marks multiple notifications as read", %{user: user1, conn: conn} do
[notification3, notification2, notification1] = Notification.for_user(user1, %{limit: 3})
- [response1, response2] =
- conn
- |> put_req_header("content-type", "application/json")
- |> post("/api/v1/pleroma/notifications/read", %{max_id: notification2.id})
- |> json_response_and_validate_schema(:ok)
+ refute Repo.get(Notification, notification1.id).seen
+ refute Repo.get(Notification, notification2.id).seen
+ refute Repo.get(Notification, notification3.id).seen
+
+ conn
+ |> put_req_header("content-type", "application/json")
+ |> post("/api/v1/pleroma/notifications/read", %{max_id: notification2.id})
+ |> json_response_and_validate_schema(:ok)
+
+ [notification3, notification2, notification1] = Notification.for_user(user1, %{limit: 3})
- assert %{"pleroma" => %{"is_seen" => true}} = response1
- assert %{"pleroma" => %{"is_seen" => true}} = response2
assert Repo.get(Notification, notification1.id).seen
assert Repo.get(Notification, notification2.id).seen
refute Repo.get(Notification, notification3.id).seen
diff --git a/test/pleroma/web/pleroma_api/controllers/scrobble_controller_test.exs b/test/pleroma/web/pleroma_api/controllers/scrobble_controller_test.exs
index 908ce962dc..be94a02ade 100644
--- a/test/pleroma/web/pleroma_api/controllers/scrobble_controller_test.exs
+++ b/test/pleroma/web/pleroma_api/controllers/scrobble_controller_test.exs
@@ -18,7 +18,8 @@ test "works correctly" do
"title" => "lain radio episode 1",
"artist" => "lain",
"album" => "lain radio",
- "length" => "180000"
+ "length" => "180000",
+ "externalLink" => "https://www.last.fm/music/lain/lain+radio/lain+radio+episode+1"
})
assert %{"title" => "lain radio episode 1"} = json_response_and_validate_schema(conn, 200)
@@ -33,21 +34,24 @@ test "works correctly" do
CommonAPI.listen(user, %{
title: "lain radio episode 1",
artist: "lain",
- album: "lain radio"
+ album: "lain radio",
+ externalLink: "https://www.last.fm/music/lain/lain+radio/lain+radio+episode+1"
})
{:ok, _activity} =
CommonAPI.listen(user, %{
title: "lain radio episode 2",
artist: "lain",
- album: "lain radio"
+ album: "lain radio",
+ externalLink: "https://www.last.fm/music/lain/lain+radio/lain+radio+episode+2"
})
{:ok, _activity} =
CommonAPI.listen(user, %{
title: "lain radio episode 3",
artist: "lain",
- album: "lain radio"
+ album: "lain radio",
+ externalLink: "https://www.last.fm/music/lain/lain+radio/lain+radio+episode+3"
})
conn = get(conn, "/api/v1/pleroma/accounts/#{user.id}/scrobbles")
diff --git a/test/pleroma/web/pleroma_api/controllers/status_controller_test.exs b/test/pleroma/web/pleroma_api/controllers/status_controller_test.exs
new file mode 100644
index 0000000000..f942f05567
--- /dev/null
+++ b/test/pleroma/web/pleroma_api/controllers/status_controller_test.exs
@@ -0,0 +1,54 @@
+# Pleroma: A lightweight social networking server
+# Copyright © 2017-2022 Pleroma Authors
+# SPDX-License-Identifier: AGPL-3.0-only
+
+defmodule Pleroma.Web.PleromaAPI.StatusControllerTest do
+ use Pleroma.Web.ConnCase
+
+ alias Pleroma.Web.CommonAPI
+
+ import Pleroma.Factory
+
+ describe "getting quotes of a specified post" do
+ setup do
+ [current_user, user] = insert_pair(:user)
+ %{user: current_user, conn: conn} = oauth_access(["read:statuses"], user: current_user)
+ [current_user: current_user, user: user, conn: conn]
+ end
+
+ test "shows quotes of a post", %{conn: conn} do
+ user = insert(:user)
+ activity = insert(:note_activity)
+
+ {:ok, quote_post} = CommonAPI.post(user, %{status: "quoat", quote_id: activity.id})
+
+ response =
+ conn
+ |> get("/api/v1/pleroma/statuses/#{activity.id}/quotes")
+ |> json_response_and_validate_schema(:ok)
+
+ [status] = response
+
+ assert length(response) == 1
+ assert status["id"] == quote_post.id
+ end
+
+ test "returns 404 error when a post can't be seen", %{conn: conn} do
+ activity = insert(:direct_note_activity)
+
+ response =
+ conn
+ |> get("/api/v1/pleroma/statuses/#{activity.id}/quotes")
+
+ assert json_response_and_validate_schema(response, 404) == %{"error" => "Record not found"}
+ end
+
+ test "returns 404 error when a post does not exist", %{conn: conn} do
+ response =
+ conn
+ |> get("/api/v1/pleroma/statuses/idontexist/quotes")
+
+ assert json_response_and_validate_schema(response, 404) == %{"error" => "Record not found"}
+ end
+ end
+end
diff --git a/test/pleroma/web/pleroma_api/views/backup_view_test.exs b/test/pleroma/web/pleroma_api/views/backup_view_test.exs
index a86688bc43..b125b88726 100644
--- a/test/pleroma/web/pleroma_api/views/backup_view_test.exs
+++ b/test/pleroma/web/pleroma_api/views/backup_view_test.exs
@@ -4,10 +4,21 @@
defmodule Pleroma.Web.PleromaAPI.BackupViewTest do
use Pleroma.DataCase, async: true
+
+ alias Pleroma.UnstubbedConfigMock, as: ConfigMock
alias Pleroma.User.Backup
alias Pleroma.Web.PleromaAPI.BackupView
+
+ import Mox
import Pleroma.Factory
+ setup do
+ ConfigMock
+ |> stub_with(Pleroma.Test.StaticConfig)
+
+ :ok
+ end
+
test "it renders the ID" do
user = insert(:user)
backup = Backup.new(user)
@@ -15,4 +26,43 @@ test "it renders the ID" do
result = BackupView.render("show.json", backup: backup)
assert result.id == backup.id
end
+
+ test "it renders the state and processed_number" do
+ user = insert(:user)
+ backup = Backup.new(user)
+
+ result = BackupView.render("show.json", backup: backup)
+ assert result.state == to_string(backup.state)
+ assert result.processed_number == backup.processed_number
+ end
+
+ test "it renders failed state with legacy records" do
+ backup = %Backup{
+ id: 0,
+ content_type: "application/zip",
+ file_name: "dummy",
+ file_size: 1,
+ state: :invalid,
+ processed: true,
+ processed_number: 1,
+ inserted_at: NaiveDateTime.utc_now()
+ }
+
+ result = BackupView.render("show.json", backup: backup)
+ assert result.state == "complete"
+
+ backup = %Backup{
+ id: 0,
+ content_type: "application/zip",
+ file_name: "dummy",
+ file_size: 1,
+ state: :invalid,
+ processed: false,
+ processed_number: 1,
+ inserted_at: NaiveDateTime.utc_now()
+ }
+
+ result = BackupView.render("show.json", backup: backup)
+ assert result.state == "failed"
+ end
end
diff --git a/test/pleroma/web/pleroma_api/views/chat_message_reference_view_test.exs b/test/pleroma/web/pleroma_api/views/chat_message_reference_view_test.exs
index 017c9c5c0d..f17add774a 100644
--- a/test/pleroma/web/pleroma_api/views/chat_message_reference_view_test.exs
+++ b/test/pleroma/web/pleroma_api/views/chat_message_reference_view_test.exs
@@ -3,28 +3,36 @@
# SPDX-License-Identifier: AGPL-3.0-only
defmodule Pleroma.Web.PleromaAPI.ChatMessageReferenceViewTest do
- use Pleroma.DataCase
+ alias Pleroma.NullCache
+ use Pleroma.DataCase, async: true
alias Pleroma.Chat
alias Pleroma.Chat.MessageReference
alias Pleroma.Object
+ alias Pleroma.UnstubbedConfigMock, as: ConfigMock
alias Pleroma.Web.ActivityPub.ActivityPub
alias Pleroma.Web.CommonAPI
alias Pleroma.Web.PleromaAPI.Chat.MessageReferenceView
+ import Mox
import Pleroma.Factory
+ setup do: clear_config([:rich_media, :enabled], true)
+
test "it displays a chat message" do
user = insert(:user)
recipient = insert(:user)
+ ConfigMock
+ |> stub_with(Pleroma.Test.StaticConfig)
+
file = %Plug.Upload{
content_type: "image/jpeg",
path: Path.absname("test/fixtures/image.jpg"),
filename: "an_image.jpg"
}
- {:ok, upload} = ActivityPub.upload(file, actor: user.ap_id)
+ {:ok, upload} = ActivityPub.upload(file, actor: recipient.ap_id)
{:ok, activity} =
CommonAPI.post_chat_message(user, recipient, "kippis :firefox:", idempotency_key: "123")
@@ -35,6 +43,15 @@ test "it displays a chat message" do
cm_ref = MessageReference.for_chat_and_object(chat, object)
+ id = cm_ref.id
+
+ Pleroma.CachexMock
+ |> stub(:get, fn
+ :chat_message_id_idempotency_key_cache, ^id -> {:ok, "123"}
+ cache, key -> NullCache.get(cache, key)
+ end)
+ |> stub(:fetch, fn :rich_media_cache, _, _ -> {:ok, {:ok, %{}}} end)
+
chat_message = MessageReferenceView.render("show.json", chat_message_reference: cm_ref)
assert chat_message[:id] == cm_ref.id
@@ -46,12 +63,7 @@ test "it displays a chat message" do
assert match?([%{shortcode: "firefox"}], chat_message[:emojis])
assert chat_message[:idempotency_key] == "123"
- clear_config([:rich_media, :enabled], true)
-
- Tesla.Mock.mock_global(fn
- %{url: "https://example.com/ogp"} ->
- %Tesla.Env{status: 200, body: File.read!("test/fixtures/rich_media/ogp.html")}
- end)
+ Tesla.Mock.mock_global(fn env -> apply(HttpRequestMock, :request, [env]) end)
{:ok, activity} =
CommonAPI.post_chat_message(recipient, user, "gkgkgk https://example.com/ogp",
diff --git a/test/pleroma/web/plugs/authentication_plug_test.exs b/test/pleroma/web/plugs/authentication_plug_test.exs
index 41fdb93bc9..b8acd01c59 100644
--- a/test/pleroma/web/plugs/authentication_plug_test.exs
+++ b/test/pleroma/web/plugs/authentication_plug_test.exs
@@ -70,28 +70,6 @@ test "with a bcrypt hash, it updates to a pkbdf2 hash", %{conn: conn} do
assert "$pbkdf2" <> _ = user.password_hash
end
- @tag :skip_on_mac
- test "with a crypt hash, it updates to a pkbdf2 hash", %{conn: conn} do
- user =
- insert(:user,
- password_hash:
- "$6$9psBWV8gxkGOZWBz$PmfCycChoxeJ3GgGzwvhlgacb9mUoZ.KUXNCssekER4SJ7bOK53uXrHNb2e4i8yPFgSKyzaW9CcmrDXWIEMtD1"
- )
-
- conn =
- conn
- |> assign(:auth_user, user)
- |> assign(:auth_credentials, %{password: "password"})
- |> AuthenticationPlug.call(%{})
-
- assert conn.assigns.user.id == conn.assigns.auth_user.id
- assert conn.assigns.token == nil
- assert PlugHelper.plug_skipped?(conn, OAuthScopesPlug)
-
- user = User.get_by_id(user.id)
- assert "$pbkdf2" <> _ = user.password_hash
- end
-
describe "checkpw/2" do
test "check pbkdf2 hash" do
hash =
@@ -101,14 +79,6 @@ test "check pbkdf2 hash" do
refute AuthenticationPlug.checkpw("test-password1", hash)
end
- @tag :skip_on_mac
- test "check sha512-crypt hash" do
- hash =
- "$6$9psBWV8gxkGOZWBz$PmfCycChoxeJ3GgGzwvhlgacb9mUoZ.KUXNCssekER4SJ7bOK53uXrHNb2e4i8yPFgSKyzaW9CcmrDXWIEMtD1"
-
- assert AuthenticationPlug.checkpw("password", hash)
- end
-
test "check bcrypt hash" do
hash = "$2a$10$uyhC/R/zoE1ndwwCtMusK.TLVzkQ/Ugsbqp3uXI.CTTz0gBw.24jS"
diff --git a/test/pleroma/web/plugs/ensure_privileged_plug_test.exs b/test/pleroma/web/plugs/ensure_privileged_plug_test.exs
index 4b6679b661..bba972fad3 100644
--- a/test/pleroma/web/plugs/ensure_privileged_plug_test.exs
+++ b/test/pleroma/web/plugs/ensure_privileged_plug_test.exs
@@ -3,7 +3,7 @@
# SPDX-License-Identifier: AGPL-3.0-only
defmodule Pleroma.Web.Plugs.EnsurePrivilegedPlugTest do
- use Pleroma.Web.ConnCase, async: true
+ use Pleroma.Web.ConnCase
alias Pleroma.Web.Plugs.EnsurePrivilegedPlug
import Pleroma.Factory
diff --git a/test/pleroma/web/plugs/frontend_static_plug_test.exs b/test/pleroma/web/plugs/frontend_static_plug_test.exs
index ab31c5f228..6f4d24d9e6 100644
--- a/test/pleroma/web/plugs/frontend_static_plug_test.exs
+++ b/test/pleroma/web/plugs/frontend_static_plug_test.exs
@@ -4,7 +4,11 @@
defmodule Pleroma.Web.Plugs.FrontendStaticPlugTest do
use Pleroma.Web.ConnCase
+
import Mock
+ import Mox
+
+ alias Pleroma.UnstubbedConfigMock, as: ConfigMock
@dir "test/tmp/instance_static"
@@ -66,6 +70,9 @@ test "exclude invalid path", %{conn: conn} do
File.mkdir_p!("#{path}/proxy/rr/ss")
File.write!("#{path}/proxy/rr/ss/Ek7w8WPVcAApOvN.jpg:large", "FB image")
+ ConfigMock
+ |> stub_with(Pleroma.Test.StaticConfig)
+
url =
Pleroma.Web.MediaProxy.encode_url("https://pbs.twimg.com/media/Ek7w8WPVcAApOvN.jpg:large")
@@ -82,6 +89,7 @@ test "api routes are detected correctly" do
"api",
"main",
"ostatus_subscribe",
+ "authorize_interaction",
"oauth",
"objects",
"activities",
diff --git a/test/pleroma/web/plugs/http_security_plug_test.exs b/test/pleroma/web/plugs/http_security_plug_test.exs
index c79170382c..11a351a41f 100644
--- a/test/pleroma/web/plugs/http_security_plug_test.exs
+++ b/test/pleroma/web/plugs/http_security_plug_test.exs
@@ -3,14 +3,52 @@
# SPDX-License-Identifier: AGPL-3.0-only
defmodule Pleroma.Web.Plugs.HTTPSecurityPlugTest do
- use Pleroma.Web.ConnCase
+ use Pleroma.Web.ConnCase, async: true
alias Plug.Conn
- describe "http security enabled" do
- setup do: clear_config([:http_security, :enabled], true)
+ import Mox
- test "it sends CSP headers when enabled", %{conn: conn} do
+ setup do
+ base_config = Pleroma.Config.get([:http_security])
+ %{base_config: base_config}
+ end
+
+ defp mock_config(config, additional \\ %{}) do
+ Pleroma.StaticStubbedConfigMock
+ |> stub(:get, fn
+ [:http_security, key] -> config[key]
+ key -> additional[key]
+ end)
+ end
+
+ describe "http security enabled" do
+ setup %{base_config: base_config} do
+ %{base_config: Keyword.put(base_config, :enabled, true)}
+ end
+
+ test "it does not contain unsafe-eval", %{conn: conn, base_config: base_config} do
+ mock_config(base_config)
+
+ conn = get(conn, "/api/v1/instance")
+ [header] = Conn.get_resp_header(conn, "content-security-policy")
+ refute header =~ ~r/unsafe-eval/
+ end
+
+ test "with allow_unsafe_eval set, it does contain it", %{conn: conn, base_config: base_config} do
+ base_config =
+ base_config
+ |> Keyword.put(:allow_unsafe_eval, true)
+
+ mock_config(base_config)
+
+ conn = get(conn, "/api/v1/instance")
+ [header] = Conn.get_resp_header(conn, "content-security-policy")
+ assert header =~ ~r/unsafe-eval/
+ end
+
+ test "it sends CSP headers when enabled", %{conn: conn, base_config: base_config} do
+ mock_config(base_config)
conn = get(conn, "/api/v1/instance")
refute Conn.get_resp_header(conn, "x-xss-protection") == []
@@ -22,8 +60,10 @@ test "it sends CSP headers when enabled", %{conn: conn} do
refute Conn.get_resp_header(conn, "content-security-policy") == []
end
- test "it sends STS headers when enabled", %{conn: conn} do
- clear_config([:http_security, :sts], true)
+ test "it sends STS headers when enabled", %{conn: conn, base_config: base_config} do
+ base_config
+ |> Keyword.put(:sts, true)
+ |> mock_config()
conn = get(conn, "/api/v1/instance")
@@ -31,8 +71,10 @@ test "it sends STS headers when enabled", %{conn: conn} do
refute Conn.get_resp_header(conn, "expect-ct") == []
end
- test "it does not send STS headers when disabled", %{conn: conn} do
- clear_config([:http_security, :sts], false)
+ test "it does not send STS headers when disabled", %{conn: conn, base_config: base_config} do
+ base_config
+ |> Keyword.put(:sts, false)
+ |> mock_config()
conn = get(conn, "/api/v1/instance")
@@ -40,19 +82,30 @@ test "it does not send STS headers when disabled", %{conn: conn} do
assert Conn.get_resp_header(conn, "expect-ct") == []
end
- test "referrer-policy header reflects configured value", %{conn: conn} do
- resp = get(conn, "/api/v1/instance")
+ test "referrer-policy header reflects configured value", %{
+ conn: conn,
+ base_config: base_config
+ } do
+ mock_config(base_config)
+ resp = get(conn, "/api/v1/instance")
assert Conn.get_resp_header(resp, "referrer-policy") == ["same-origin"]
- clear_config([:http_security, :referrer_policy], "no-referrer")
+ base_config
+ |> Keyword.put(:referrer_policy, "no-referrer")
+ |> mock_config
resp = get(conn, "/api/v1/instance")
assert Conn.get_resp_header(resp, "referrer-policy") == ["no-referrer"]
end
- test "it sends `report-to` & `report-uri` CSP response headers", %{conn: conn} do
+ test "it sends `report-to` & `report-uri` CSP response headers", %{
+ conn: conn,
+ base_config: base_config
+ } do
+ mock_config(base_config)
+
conn = get(conn, "/api/v1/instance")
[csp] = Conn.get_resp_header(conn, "content-security-policy")
@@ -65,7 +118,11 @@ test "it sends `report-to` & `report-uri` CSP response headers", %{conn: conn} d
"{\"endpoints\":[{\"url\":\"https://endpoint.com\"}],\"group\":\"csp-endpoint\",\"max-age\":10886400}"
end
- test "default values for img-src and media-src with disabled media proxy", %{conn: conn} do
+ test "default values for img-src and media-src with disabled media proxy", %{
+ conn: conn,
+ base_config: base_config
+ } do
+ mock_config(base_config)
conn = get(conn, "/api/v1/instance")
[csp] = Conn.get_resp_header(conn, "content-security-policy")
@@ -73,60 +130,129 @@ test "default values for img-src and media-src with disabled media proxy", %{con
assert csp =~ "img-src 'self' data: blob: https:;"
end
- test "it sets the Service-Worker-Allowed header", %{conn: conn} do
- clear_config([:http_security, :enabled], true)
- clear_config([:frontends, :primary], %{"name" => "fedi-fe", "ref" => "develop"})
+ test "it sets the Service-Worker-Allowed header", %{conn: conn, base_config: base_config} do
+ base_config
+ |> Keyword.put(:enabled, true)
- clear_config([:frontends, :available], %{
- "fedi-fe" => %{
- "name" => "fedi-fe",
- "custom-http-headers" => [{"service-worker-allowed", "/"}]
- }
- })
+ additional_config =
+ %{}
+ |> Map.put([:frontends, :primary], %{"name" => "fedi-fe", "ref" => "develop"})
+ |> Map.put(
+ [:frontends, :available],
+ %{
+ "fedi-fe" => %{
+ "name" => "fedi-fe",
+ "custom-http-headers" => [{"service-worker-allowed", "/"}]
+ }
+ }
+ )
+ mock_config(base_config, additional_config)
conn = get(conn, "/api/v1/instance")
assert Conn.get_resp_header(conn, "service-worker-allowed") == ["/"]
end
end
describe "img-src and media-src" do
- setup do
- clear_config([:http_security, :enabled], true)
- clear_config([:media_proxy, :enabled], true)
- clear_config([:media_proxy, :proxy_opts, :redirect_on_failure], false)
+ setup %{base_config: base_config} do
+ base_config =
+ base_config
+ |> Keyword.put(:enabled, true)
+
+ additional_config =
+ %{}
+ |> Map.put([:media_proxy, :enabled], true)
+ |> Map.put([:media_proxy, :proxy_opts, :redirect_on_failure], false)
+ |> Map.put([:media_proxy, :whitelist], [])
+
+ %{base_config: base_config, additional_config: additional_config}
end
- test "media_proxy with base_url", %{conn: conn} do
+ test "media_proxy with base_url", %{
+ conn: conn,
+ base_config: base_config,
+ additional_config: additional_config
+ } do
url = "https://example.com"
- clear_config([:media_proxy, :base_url], url)
+
+ additional_config =
+ additional_config
+ |> Map.put([:media_proxy, :base_url], url)
+
+ mock_config(base_config, additional_config)
+
assert_media_img_src(conn, url)
end
- test "upload with base url", %{conn: conn} do
+ test "upload with base url", %{
+ conn: conn,
+ base_config: base_config,
+ additional_config: additional_config
+ } do
url = "https://example2.com"
- clear_config([Pleroma.Upload, :base_url], url)
+
+ additional_config =
+ additional_config
+ |> Map.put([Pleroma.Upload, :base_url], url)
+
+ mock_config(base_config, additional_config)
+
assert_media_img_src(conn, url)
end
- test "with S3 public endpoint", %{conn: conn} do
+ test "with S3 public endpoint", %{
+ conn: conn,
+ base_config: base_config,
+ additional_config: additional_config
+ } do
url = "https://example3.com"
- clear_config([Pleroma.Uploaders.S3, :public_endpoint], url)
+
+ additional_config =
+ additional_config
+ |> Map.put([Pleroma.Uploaders.S3, :public_endpoint], url)
+
+ mock_config(base_config, additional_config)
assert_media_img_src(conn, url)
end
- test "with captcha endpoint", %{conn: conn} do
- clear_config([Pleroma.Captcha.Mock, :endpoint], "https://captcha.com")
+ test "with captcha endpoint", %{
+ conn: conn,
+ base_config: base_config,
+ additional_config: additional_config
+ } do
+ additional_config =
+ additional_config
+ |> Map.put([Pleroma.Captcha.Mock, :endpoint], "https://captcha.com")
+ |> Map.put([Pleroma.Captcha, :method], Pleroma.Captcha.Mock)
+
+ mock_config(base_config, additional_config)
assert_media_img_src(conn, "https://captcha.com")
end
- test "with media_proxy whitelist", %{conn: conn} do
- clear_config([:media_proxy, :whitelist], ["https://example6.com", "https://example7.com"])
+ test "with media_proxy whitelist", %{
+ conn: conn,
+ base_config: base_config,
+ additional_config: additional_config
+ } do
+ additional_config =
+ additional_config
+ |> Map.put([:media_proxy, :whitelist], ["https://example6.com", "https://example7.com"])
+
+ mock_config(base_config, additional_config)
assert_media_img_src(conn, "https://example7.com https://example6.com")
end
# TODO: delete after removing support bare domains for media proxy whitelist
- test "with media_proxy bare domains whitelist (deprecated)", %{conn: conn} do
- clear_config([:media_proxy, :whitelist], ["example4.com", "example5.com"])
+ test "with media_proxy bare domains whitelist (deprecated)", %{
+ conn: conn,
+ base_config: base_config,
+ additional_config: additional_config
+ } do
+ additional_config =
+ additional_config
+ |> Map.put([:media_proxy, :whitelist], ["example4.com", "example5.com"])
+
+ mock_config(base_config, additional_config)
assert_media_img_src(conn, "example5.com example4.com")
end
end
@@ -138,8 +264,10 @@ defp assert_media_img_src(conn, url) do
assert csp =~ "img-src 'self' data: blob: #{url};"
end
- test "it does not send CSP headers when disabled", %{conn: conn} do
- clear_config([:http_security, :enabled], false)
+ test "it does not send CSP headers when disabled", %{conn: conn, base_config: base_config} do
+ base_config
+ |> Keyword.put(:enabled, false)
+ |> mock_config
conn = get(conn, "/api/v1/instance")
diff --git a/test/pleroma/web/plugs/http_signature_plug_test.exs b/test/pleroma/web/plugs/http_signature_plug_test.exs
index de68e8823a..b871d956e6 100644
--- a/test/pleroma/web/plugs/http_signature_plug_test.exs
+++ b/test/pleroma/web/plugs/http_signature_plug_test.exs
@@ -93,6 +93,25 @@ test "halts the connection when `signature` header is not present", %{conn: conn
assert conn.state == :sent
assert conn.resp_body == "Request not signed"
end
+
+ test "exempts specific IPs from `authorized_fetch_mode_exceptions`", %{conn: conn} do
+ clear_config([:activitypub, :authorized_fetch_mode_exceptions], ["192.168.0.0/24"])
+
+ with_mock HTTPSignatures, validate_conn: fn _ -> false end do
+ conn =
+ conn
+ |> Map.put(:remote_ip, {192, 168, 0, 1})
+ |> put_req_header(
+ "signature",
+ "keyId=\"http://mastodon.example.org/users/admin#main-key"
+ )
+ |> HTTPSignaturePlug.call(%{})
+
+ assert conn.remote_ip == {192, 168, 0, 1}
+ assert conn.halted == false
+ assert called(HTTPSignatures.validate_conn(:_))
+ end
+ end
end
test "rejects requests from `rejected_instances` when `authorized_fetch_mode` is enabled" do
diff --git a/test/pleroma/web/plugs/uploaded_media_plug_test.exs b/test/pleroma/web/plugs/uploaded_media_plug_test.exs
index ec46b05377..6a9366e28e 100644
--- a/test/pleroma/web/plugs/uploaded_media_plug_test.exs
+++ b/test/pleroma/web/plugs/uploaded_media_plug_test.exs
@@ -4,10 +4,18 @@
defmodule Pleroma.Web.Plugs.UploadedMediaPlugTest do
use Pleroma.Web.ConnCase, async: true
+
+ alias Pleroma.UnstubbedConfigMock, as: ConfigMock
alias Pleroma.Upload
+ import Mox
+
defp upload_file(context) do
+ ConfigMock
+ |> stub_with(Pleroma.Test.StaticConfig)
+
Pleroma.DataCase.ensure_local_uploader(context)
+
File.cp!("test/fixtures/image.jpg", "test/fixtures/image_tmp.jpg")
file = %Plug.Upload{
@@ -23,6 +31,13 @@ defp upload_file(context) do
setup_all :upload_file
+ setup do
+ ConfigMock
+ |> stub_with(Pleroma.Test.StaticConfig)
+
+ :ok
+ end
+
test "does not send Content-Disposition header when name param is not set", %{
attachment_url: attachment_url
} do
@@ -33,11 +48,11 @@ test "does not send Content-Disposition header when name param is not set", %{
test "sends Content-Disposition header when name param is set", %{
attachment_url: attachment_url
} do
- conn = get(build_conn(), attachment_url <> "?name=\"cofe\".gif")
+ conn = get(build_conn(), attachment_url <> ~s[?name="cofe".gif])
assert Enum.any?(
conn.resp_headers,
- &(&1 == {"content-disposition", "filename=\"\\\"cofe\\\".gif\""})
+ &(&1 == {"content-disposition", ~s[inline; filename="\\"cofe\\".gif"]})
)
end
end
diff --git a/test/pleroma/web/push/impl_test.exs b/test/pleroma/web/push/impl_test.exs
index 2eee0acd91..3ceea3d718 100644
--- a/test/pleroma/web/push/impl_test.exs
+++ b/test/pleroma/web/push/impl_test.exs
@@ -5,10 +5,12 @@
defmodule Pleroma.Web.Push.ImplTest do
use Pleroma.DataCase, async: true
+ import Mox
import Pleroma.Factory
alias Pleroma.Notification
alias Pleroma.Object
+ alias Pleroma.UnstubbedConfigMock, as: ConfigMock
alias Pleroma.User
alias Pleroma.Web.ActivityPub.ActivityPub
alias Pleroma.Web.CommonAPI
@@ -257,6 +259,9 @@ test "builds content for chat messages with no content" do
filename: "an_image.jpg"
}
+ ConfigMock
+ |> stub_with(Pleroma.Test.StaticConfig)
+
{:ok, upload} = ActivityPub.upload(file, actor: user.ap_id)
{:ok, chat} = CommonAPI.post_chat_message(user, recipient, nil, media_id: upload.id)
diff --git a/test/pleroma/web/rich_media/card_test.exs b/test/pleroma/web/rich_media/card_test.exs
new file mode 100644
index 0000000000..516ac99512
--- /dev/null
+++ b/test/pleroma/web/rich_media/card_test.exs
@@ -0,0 +1,71 @@
+# Pleroma: A lightweight social networking server
+# Copyright © 2017-2024 Pleroma Authors
+# SPDX-License-Identifier: AGPL-3.0-only
+
+defmodule Pleroma.Web.RichMedia.CardTest do
+ use Pleroma.DataCase, async: true
+
+ alias Pleroma.UnstubbedConfigMock, as: ConfigMock
+ alias Pleroma.Web.CommonAPI
+ alias Pleroma.Web.RichMedia.Card
+
+ import Mox
+ import Pleroma.Factory
+ import Tesla.Mock
+
+ setup do
+ mock_global(fn env -> apply(HttpRequestMock, :request, [env]) end)
+
+ ConfigMock
+ |> stub_with(Pleroma.Test.StaticConfig)
+
+ :ok
+ end
+
+ setup do: clear_config([:rich_media, :enabled], true)
+
+ test "crawls URL in activity" do
+ user = insert(:user)
+
+ url = "https://example.com/ogp"
+ url_hash = Card.url_to_hash(url)
+
+ {:ok, activity} =
+ CommonAPI.post(user, %{
+ status: "[test](#{url})",
+ content_type: "text/markdown"
+ })
+
+ assert %Card{url_hash: ^url_hash, fields: _} = Card.get_by_activity(activity)
+ end
+
+ test "recrawls URLs on status edits/updates" do
+ original_url = "https://google.com/"
+ original_url_hash = Card.url_to_hash(original_url)
+ updated_url = "https://yahoo.com/"
+ updated_url_hash = Card.url_to_hash(updated_url)
+
+ user = insert(:user)
+ {:ok, activity} = CommonAPI.post(user, %{status: "I like this site #{original_url}"})
+
+ # Force a backfill
+ Card.get_by_activity(activity)
+
+ assert match?(
+ %Card{url_hash: ^original_url_hash, fields: _},
+ Card.get_by_activity(activity)
+ )
+
+ {:ok, _} = CommonAPI.update(user, activity, %{status: "I like this site #{updated_url}"})
+
+ activity = Pleroma.Activity.get_by_id(activity.id)
+
+ # Force a backfill
+ Card.get_by_activity(activity)
+
+ assert match?(
+ %Card{url_hash: ^updated_url_hash, fields: _},
+ Card.get_by_activity(activity)
+ )
+ end
+end
diff --git a/test/pleroma/web/rich_media/helpers_test.exs b/test/pleroma/web/rich_media/helpers_test.exs
deleted file mode 100644
index 630b3ca959..0000000000
--- a/test/pleroma/web/rich_media/helpers_test.exs
+++ /dev/null
@@ -1,84 +0,0 @@
-# Pleroma: A lightweight social networking server
-# Copyright © 2017-2022 Pleroma Authors
-# SPDX-License-Identifier: AGPL-3.0-only
-
-defmodule Pleroma.Web.RichMedia.HelpersTest do
- use Pleroma.DataCase
-
- alias Pleroma.Web.CommonAPI
- alias Pleroma.Web.RichMedia.Helpers
-
- import Pleroma.Factory
- import Tesla.Mock
-
- setup do
- mock(fn env -> apply(HttpRequestMock, :request, [env]) end)
-
- :ok
- end
-
- setup do: clear_config([:rich_media, :enabled])
-
- test "refuses to crawl incomplete URLs" do
- user = insert(:user)
-
- {:ok, activity} =
- CommonAPI.post(user, %{
- status: "[test](example.com/ogp)",
- content_type: "text/markdown"
- })
-
- clear_config([:rich_media, :enabled], true)
-
- assert %{} == Pleroma.Web.RichMedia.Helpers.fetch_data_for_activity(activity)
- end
-
- test "refuses to crawl malformed URLs" do
- user = insert(:user)
-
- {:ok, activity} =
- CommonAPI.post(user, %{
- status: "[test](example.com[]/ogp)",
- content_type: "text/markdown"
- })
-
- clear_config([:rich_media, :enabled], true)
-
- assert %{} == Pleroma.Web.RichMedia.Helpers.fetch_data_for_activity(activity)
- end
-
- test "crawls valid, complete URLs" do
- user = insert(:user)
-
- {:ok, activity} =
- CommonAPI.post(user, %{
- status: "[test](https://example.com/ogp)",
- content_type: "text/markdown"
- })
-
- clear_config([:rich_media, :enabled], true)
-
- assert %{page_url: "https://example.com/ogp", rich_media: _} =
- Pleroma.Web.RichMedia.Helpers.fetch_data_for_activity(activity)
- end
-
- test "refuses to crawl URLs of private network from posts" do
- user = insert(:user)
-
- {:ok, activity} =
- CommonAPI.post(user, %{status: "http://127.0.0.1:4000/notice/9kCP7VNyPJXFOXDrgO"})
-
- {:ok, activity2} = CommonAPI.post(user, %{status: "https://10.111.10.1/notice/9kCP7V"})
- {:ok, activity3} = CommonAPI.post(user, %{status: "https://172.16.32.40/notice/9kCP7V"})
- {:ok, activity4} = CommonAPI.post(user, %{status: "https://192.168.10.40/notice/9kCP7V"})
- {:ok, activity5} = CommonAPI.post(user, %{status: "https://pleroma.local/notice/9kCP7V"})
-
- clear_config([:rich_media, :enabled], true)
-
- assert %{} = Helpers.fetch_data_for_activity(activity)
- assert %{} = Helpers.fetch_data_for_activity(activity2)
- assert %{} = Helpers.fetch_data_for_activity(activity3)
- assert %{} = Helpers.fetch_data_for_activity(activity4)
- assert %{} = Helpers.fetch_data_for_activity(activity5)
- end
-end
diff --git a/test/pleroma/web/rich_media/parser/ttl/aws_signed_url_test.exs b/test/pleroma/web/rich_media/parser/ttl/aws_signed_url_test.exs
index 59b3330ba8..cc28aa7f39 100644
--- a/test/pleroma/web/rich_media/parser/ttl/aws_signed_url_test.exs
+++ b/test/pleroma/web/rich_media/parser/ttl/aws_signed_url_test.exs
@@ -3,8 +3,23 @@
# SPDX-License-Identifier: AGPL-3.0-only
defmodule Pleroma.Web.RichMedia.Parser.TTL.AwsSignedUrlTest do
- # Relies on Cachex, needs to be synchronous
- use Pleroma.DataCase
+ use Pleroma.DataCase, async: false
+ use Oban.Testing, repo: Pleroma.Repo
+
+ import Mox
+
+ alias Pleroma.UnstubbedConfigMock, as: ConfigMock
+ alias Pleroma.Web.RichMedia.Card
+ alias Pleroma.Web.RichMedia.Parser.TTL.AwsSignedUrl
+
+ setup do
+ ConfigMock
+ |> stub_with(Pleroma.Test.StaticConfig)
+
+ clear_config([:rich_media, :enabled], true)
+
+ :ok
+ end
test "s3 signed url is parsed correct for expiration time" do
url = "https://pleroma.social/amz"
@@ -22,7 +37,7 @@ test "s3 signed url is parsed correct for expiration time" do
expire_time =
Timex.parse!(timestamp, "{ISO:Basic:Z}") |> Timex.to_unix() |> Kernel.+(valid_till)
- assert {:ok, expire_time} == Pleroma.Web.RichMedia.Parser.TTL.AwsSignedUrl.ttl(metadata, url)
+ assert expire_time == Pleroma.Web.RichMedia.Parser.TTL.AwsSignedUrl.ttl(metadata, url)
end
test "s3 signed url is parsed and correct ttl is set for rich media" do
@@ -43,26 +58,35 @@ test "s3 signed url is parsed and correct ttl is set for rich media" do
-
+
"""
Tesla.Mock.mock(fn
%{
method: :get,
- url: "https://pleroma.social/amz"
+ url: ^url
} ->
%Tesla.Env{status: 200, body: body}
+
+ %{method: :head} ->
+ %Tesla.Env{status: 200}
end)
- Cachex.put(:rich_media_cache, url, metadata)
+ Card.get_or_backfill_by_url(url)
- Pleroma.Web.RichMedia.Parser.set_ttl_based_on_image(metadata, url)
+ assert_enqueued(worker: Pleroma.Workers.RichMediaExpirationWorker, args: %{"url" => url})
- {:ok, cache_ttl} = Cachex.ttl(:rich_media_cache, url)
+ [%Oban.Job{scheduled_at: scheduled_at}] = all_enqueued()
- # as there is delay in setting and pulling the data from cache we ignore 1 second
- # make it 2 seconds for flakyness
- assert_in_delta(valid_till * 1000, cache_ttl, 2000)
+ timestamp_dt = Timex.parse!(timestamp, "{ISO:Basic:Z}")
+
+ assert DateTime.diff(scheduled_at, timestamp_dt) == valid_till
+ end
+
+ test "AWS URL for an image without expiration works" do
+ og_data = %{"image" => "https://amazonaws.com/image.png"}
+
+ assert is_nil(AwsSignedUrl.ttl(og_data, ""))
end
defp construct_s3_url(timestamp, valid_till) do
@@ -71,11 +95,11 @@ defp construct_s3_url(timestamp, valid_till) do
defp construct_metadata(timestamp, valid_till, url) do
%{
- image: construct_s3_url(timestamp, valid_till),
- site: "Pleroma",
- title: "Pleroma",
- description: "Pleroma",
- url: url
+ "image" => construct_s3_url(timestamp, valid_till),
+ "site" => "Pleroma",
+ "title" => "Pleroma",
+ "description" => "Pleroma",
+ "url" => url
}
end
end
diff --git a/test/pleroma/web/rich_media/parser/ttl/opengraph_test.exs b/test/pleroma/web/rich_media/parser/ttl/opengraph_test.exs
new file mode 100644
index 0000000000..770968d477
--- /dev/null
+++ b/test/pleroma/web/rich_media/parser/ttl/opengraph_test.exs
@@ -0,0 +1,41 @@
+# Pleroma: A lightweight social networking server
+# Copyright © 2017-2024 Pleroma Authors
+# SPDX-License-Identifier: AGPL-3.0-only
+
+defmodule Pleroma.Web.RichMedia.Parser.TTL.OpengraphTest do
+ use Pleroma.DataCase
+ use Oban.Testing, repo: Pleroma.Repo
+
+ import Mox
+
+ alias Pleroma.UnstubbedConfigMock, as: ConfigMock
+ alias Pleroma.Web.RichMedia.Card
+
+ setup do
+ ConfigMock
+ |> stub_with(Pleroma.Test.StaticConfig)
+
+ clear_config([:rich_media, :enabled], true)
+
+ :ok
+ end
+
+ test "OpenGraph TTL value is honored" do
+ url = "https://reddit.com/r/somepost"
+
+ Tesla.Mock.mock(fn
+ %{
+ method: :get,
+ url: ^url
+ } ->
+ %Tesla.Env{status: 200, body: File.read!("test/fixtures/rich_media/reddit.html")}
+
+ %{method: :head} ->
+ %Tesla.Env{status: 200}
+ end)
+
+ Card.get_or_backfill_by_url(url)
+
+ assert_enqueued(worker: Pleroma.Workers.RichMediaExpirationWorker, args: %{"url" => url})
+ end
+end
diff --git a/test/pleroma/web/rich_media/parser_test.exs b/test/pleroma/web/rich_media/parser_test.exs
index ffdc4e5d78..3fcb5c8089 100644
--- a/test/pleroma/web/rich_media/parser_test.exs
+++ b/test/pleroma/web/rich_media/parser_test.exs
@@ -3,95 +3,26 @@
# SPDX-License-Identifier: AGPL-3.0-only
defmodule Pleroma.Web.RichMedia.ParserTest do
- use ExUnit.Case, async: true
+ use Pleroma.DataCase
alias Pleroma.Web.RichMedia.Parser
+ import Tesla.Mock
+
setup do
- Tesla.Mock.mock(fn
- %{
- method: :get,
- url: "http://example.com/ogp"
- } ->
- %Tesla.Env{status: 200, body: File.read!("test/fixtures/rich_media/ogp.html")}
-
- %{
- method: :get,
- url: "http://example.com/non-ogp"
- } ->
- %Tesla.Env{status: 200, body: File.read!("test/fixtures/rich_media/non_ogp_embed.html")}
-
- %{
- method: :get,
- url: "http://example.com/ogp-missing-title"
- } ->
- %Tesla.Env{
- status: 200,
- body: File.read!("test/fixtures/rich_media/ogp-missing-title.html")
- }
-
- %{
- method: :get,
- url: "http://example.com/twitter-card"
- } ->
- %Tesla.Env{status: 200, body: File.read!("test/fixtures/rich_media/twitter_card.html")}
-
- %{
- method: :get,
- url: "http://example.com/oembed"
- } ->
- %Tesla.Env{status: 200, body: File.read!("test/fixtures/rich_media/oembed.html")}
-
- %{
- method: :get,
- url: "http://example.com/oembed.json"
- } ->
- %Tesla.Env{status: 200, body: File.read!("test/fixtures/rich_media/oembed.json")}
-
- %{method: :get, url: "http://example.com/empty"} ->
- %Tesla.Env{status: 200, body: "hello"}
-
- %{method: :get, url: "http://example.com/malformed"} ->
- %Tesla.Env{status: 200, body: File.read!("test/fixtures/rich_media/malformed-data.html")}
-
- %{method: :get, url: "http://example.com/error"} ->
- {:error, :overload}
-
- %{
- method: :head,
- url: "http://example.com/huge-page"
- } ->
- %Tesla.Env{
- status: 200,
- headers: [{"content-length", "2000001"}, {"content-type", "text/html"}]
- }
-
- %{
- method: :head,
- url: "http://example.com/pdf-file"
- } ->
- %Tesla.Env{
- status: 200,
- headers: [{"content-length", "1000000"}, {"content-type", "application/pdf"}]
- }
-
- %{method: :head} ->
- %Tesla.Env{status: 404, body: "", headers: []}
- end)
-
- :ok
+ mock_global(fn env -> apply(HttpRequestMock, :request, [env]) end)
end
test "returns error when no metadata present" do
- assert {:error, _} = Parser.parse("http://example.com/empty")
+ assert {:error, _} = Parser.parse("https://example.com/empty")
end
test "doesn't just add a title" do
- assert {:error, {:invalid_metadata, _}} = Parser.parse("http://example.com/non-ogp")
+ assert {:error, {:invalid_metadata, _}} = Parser.parse("https://example.com/non-ogp")
end
test "parses ogp" do
- assert Parser.parse("http://example.com/ogp") ==
+ assert Parser.parse("https://example.com/ogp") ==
{:ok,
%{
"image" => "http://ia.media-imdb.com/images/rock.jpg",
@@ -99,12 +30,12 @@ test "parses ogp" do
"description" =>
"Directed by Michael Bay. With Sean Connery, Nicolas Cage, Ed Harris, John Spencer.",
"type" => "video.movie",
- "url" => "http://example.com/ogp"
+ "url" => "https://example.com/ogp"
}}
end
test "falls back to when ogp:title is missing" do
- assert Parser.parse("http://example.com/ogp-missing-title") ==
+ assert Parser.parse("https://example.com/ogp-missing-title") ==
{:ok,
%{
"image" => "http://ia.media-imdb.com/images/rock.jpg",
@@ -112,12 +43,12 @@ test "falls back to when ogp:title is missing" do
"description" =>
"Directed by Michael Bay. With Sean Connery, Nicolas Cage, Ed Harris, John Spencer.",
"type" => "video.movie",
- "url" => "http://example.com/ogp-missing-title"
+ "url" => "https://example.com/ogp-missing-title"
}}
end
test "parses twitter card" do
- assert Parser.parse("http://example.com/twitter-card") ==
+ assert Parser.parse("https://example.com/twitter-card") ==
{:ok,
%{
"card" => "summary",
@@ -125,12 +56,12 @@ test "parses twitter card" do
"image" => "https://farm6.staticflickr.com/5510/14338202952_93595258ff_z.jpg",
"title" => "Small Island Developing States Photo Submission",
"description" => "View the album on Flickr.",
- "url" => "http://example.com/twitter-card"
+ "url" => "https://example.com/twitter-card"
}}
end
- test "parses OEmbed" do
- assert Parser.parse("http://example.com/oembed") ==
+ test "parses OEmbed and filters HTML tags" do
+ assert Parser.parse("https://example.com/oembed") ==
{:ok,
%{
"author_name" => "\u202E\u202D\u202Cbees\u202C",
@@ -139,7 +70,7 @@ test "parses OEmbed" do
"flickr_type" => "photo",
"height" => "768",
"html" =>
- " ",
+ " ",
"license" => "All Rights Reserved",
"license_id" => 0,
"provider_name" => "Flickr",
@@ -150,7 +81,7 @@ test "parses OEmbed" do
"thumbnail_width" => 150,
"title" => "Bacon Lollys",
"type" => "photo",
- "url" => "http://example.com/oembed",
+ "url" => "https://example.com/oembed",
"version" => "1.0",
"web_page" => "https://www.flickr.com/photos/bees/2362225867/",
"web_page_short_url" => "https://flic.kr/p/4AK2sc",
@@ -159,18 +90,41 @@ test "parses OEmbed" do
end
test "rejects invalid OGP data" do
- assert {:error, _} = Parser.parse("http://example.com/malformed")
+ assert {:error, _} = Parser.parse("https://example.com/malformed")
end
test "returns error if getting page was not successful" do
- assert {:error, :overload} = Parser.parse("http://example.com/error")
+ assert {:error, :overload} = Parser.parse("https://example.com/error")
end
test "does a HEAD request to check if the body is too large" do
- assert {:error, :body_too_large} = Parser.parse("http://example.com/huge-page")
+ assert {:error, :body_too_large} = Parser.parse("https://example.com/huge-page")
end
test "does a HEAD request to check if the body is html" do
- assert {:error, {:content_type, _}} = Parser.parse("http://example.com/pdf-file")
+ assert {:error, {:content_type, _}} = Parser.parse("https://example.com/pdf-file")
+ end
+
+ test "refuses to crawl incomplete URLs" do
+ url = "example.com/ogp"
+ assert :error == Parser.parse(url)
+ end
+
+ test "refuses to crawl malformed URLs" do
+ url = "example.com[]/ogp"
+ assert :error == Parser.parse(url)
+ end
+
+ test "refuses to crawl URLs of private network from posts" do
+ [
+ "http://127.0.0.1:4000/notice/9kCP7VNyPJXFOXDrgO",
+ "https://10.111.10.1/notice/9kCP7V",
+ "https://172.16.32.40/notice/9kCP7V",
+ "https://192.168.10.40/notice/9kCP7V",
+ "https://pleroma.local/notice/9kCP7V"
+ ]
+ |> Enum.each(fn url ->
+ assert :error == Parser.parse(url)
+ end)
end
end
diff --git a/test/pleroma/web/streamer_test.exs b/test/pleroma/web/streamer_test.exs
index 8b0c84164d..d85358fd4d 100644
--- a/test/pleroma/web/streamer_test.exs
+++ b/test/pleroma/web/streamer_test.exs
@@ -22,6 +22,10 @@ defmodule Pleroma.Web.StreamerTest do
setup do: clear_config([:instance, :skip_thread_containment])
describe "get_topic/_ (unauthenticated)" do
+ test "allows no stream" do
+ assert {:ok, nil} = Streamer.get_topic(nil, nil, nil)
+ end
+
test "allows public" do
assert {:ok, "public"} = Streamer.get_topic("public", nil, nil)
assert {:ok, "public:local"} = Streamer.get_topic("public:local", nil, nil)
@@ -29,6 +33,26 @@ test "allows public" do
assert {:ok, "public:local:media"} = Streamer.get_topic("public:local:media", nil, nil)
end
+ test "rejects local public streams if restricted_unauthenticated is on" do
+ clear_config([:restrict_unauthenticated, :timelines, :local], true)
+
+ assert {:error, :unauthorized} = Streamer.get_topic("public:local", nil, nil)
+ assert {:error, :unauthorized} = Streamer.get_topic("public:local:media", nil, nil)
+ end
+
+ test "rejects remote public streams if restricted_unauthenticated is on" do
+ clear_config([:restrict_unauthenticated, :timelines, :federated], true)
+
+ assert {:error, :unauthorized} = Streamer.get_topic("public", nil, nil)
+ assert {:error, :unauthorized} = Streamer.get_topic("public:media", nil, nil)
+
+ assert {:error, :unauthorized} =
+ Streamer.get_topic("public:remote", nil, nil, %{"instance" => "lain.com"})
+
+ assert {:error, :unauthorized} =
+ Streamer.get_topic("public:remote:media", nil, nil, %{"instance" => "lain.com"})
+ end
+
test "allows instance streams" do
assert {:ok, "public:remote:lain.com"} =
Streamer.get_topic("public:remote", nil, nil, %{"instance" => "lain.com"})
@@ -69,6 +93,63 @@ test "allows public streams (regardless of OAuth token scopes)", %{
end
end
+ test "allows local public streams if restricted_unauthenticated is on", %{
+ user: user,
+ token: oauth_token
+ } do
+ clear_config([:restrict_unauthenticated, :timelines, :local], true)
+
+ %{token: read_notifications_token} = oauth_access(["read:notifications"], user: user)
+ %{token: badly_scoped_token} = oauth_access(["irrelevant:scope"], user: user)
+
+ assert {:ok, "public:local"} = Streamer.get_topic("public:local", user, oauth_token)
+
+ assert {:ok, "public:local:media"} =
+ Streamer.get_topic("public:local:media", user, oauth_token)
+
+ for token <- [read_notifications_token, badly_scoped_token] do
+ assert {:error, :unauthorized} = Streamer.get_topic("public:local", user, token)
+
+ assert {:error, :unauthorized} = Streamer.get_topic("public:local:media", user, token)
+ end
+ end
+
+ test "allows remote public streams if restricted_unauthenticated is on", %{
+ user: user,
+ token: oauth_token
+ } do
+ clear_config([:restrict_unauthenticated, :timelines, :federated], true)
+
+ %{token: read_notifications_token} = oauth_access(["read:notifications"], user: user)
+ %{token: badly_scoped_token} = oauth_access(["irrelevant:scope"], user: user)
+
+ assert {:ok, "public"} = Streamer.get_topic("public", user, oauth_token)
+ assert {:ok, "public:media"} = Streamer.get_topic("public:media", user, oauth_token)
+
+ assert {:ok, "public:remote:lain.com"} =
+ Streamer.get_topic("public:remote", user, oauth_token, %{"instance" => "lain.com"})
+
+ assert {:ok, "public:remote:media:lain.com"} =
+ Streamer.get_topic("public:remote:media", user, oauth_token, %{
+ "instance" => "lain.com"
+ })
+
+ for token <- [read_notifications_token, badly_scoped_token] do
+ assert {:error, :unauthorized} = Streamer.get_topic("public", user, token)
+ assert {:error, :unauthorized} = Streamer.get_topic("public:media", user, token)
+
+ assert {:error, :unauthorized} =
+ Streamer.get_topic("public:remote", user, token, %{
+ "instance" => "lain.com"
+ })
+
+ assert {:error, :unauthorized} =
+ Streamer.get_topic("public:remote:media", user, token, %{
+ "instance" => "lain.com"
+ })
+ end
+ end
+
test "allows user streams (with proper OAuth token scopes)", %{
user: user,
token: read_oauth_token
@@ -165,7 +246,7 @@ test "it streams the user's post in the 'user' stream", %{user: user, token: oau
Streamer.get_topic_and_add_socket("user", user, oauth_token)
{:ok, activity} = CommonAPI.post(user, %{status: "hey"})
- assert_receive {:render_with_user, _, _, ^activity}
+ assert_receive {:render_with_user, _, _, ^activity, _}
refute Streamer.filtered_by_user?(user, activity)
end
@@ -176,7 +257,7 @@ test "it streams boosts of the user in the 'user' stream", %{user: user, token:
{:ok, activity} = CommonAPI.post(other_user, %{status: "hey"})
{:ok, announce} = CommonAPI.repeat(activity.id, user)
- assert_receive {:render_with_user, Pleroma.Web.StreamerView, "update.json", ^announce}
+ assert_receive {:render_with_user, Pleroma.Web.StreamerView, "update.json", ^announce, _}
refute Streamer.filtered_by_user?(user, announce)
end
@@ -229,7 +310,7 @@ test "it streams boosts of mastodon user in the 'user' stream", %{
{:ok, %Pleroma.Activity{data: _data, local: false} = announce} =
Pleroma.Web.ActivityPub.Transmogrifier.handle_incoming(data)
- assert_receive {:render_with_user, Pleroma.Web.StreamerView, "update.json", ^announce}
+ assert_receive {:render_with_user, Pleroma.Web.StreamerView, "update.json", ^announce, _}
refute Streamer.filtered_by_user?(user, announce)
end
@@ -241,7 +322,7 @@ test "it sends notify to in the 'user' stream", %{
Streamer.get_topic_and_add_socket("user", user, oauth_token)
Streamer.stream("user", notify)
- assert_receive {:render_with_user, _, _, ^notify}
+ assert_receive {:render_with_user, _, _, ^notify, _}
refute Streamer.filtered_by_user?(user, notify)
end
@@ -253,7 +334,7 @@ test "it sends notify to in the 'user:notification' stream", %{
Streamer.get_topic_and_add_socket("user:notification", user, oauth_token)
Streamer.stream("user:notification", notify)
- assert_receive {:render_with_user, _, _, ^notify}
+ assert_receive {:render_with_user, _, _, ^notify, _}
refute Streamer.filtered_by_user?(user, notify)
end
@@ -274,7 +355,12 @@ test "it sends chat messages to the 'user:pleroma_chat' stream", %{
Streamer.get_topic_and_add_socket("user:pleroma_chat", user, oauth_token)
Streamer.stream("user:pleroma_chat", {user, cm_ref})
- text = StreamerView.render("chat_update.json", %{chat_message_reference: cm_ref})
+ text =
+ StreamerView.render(
+ "chat_update.json",
+ %{chat_message_reference: cm_ref},
+ "user:pleroma_chat:#{user.id}"
+ )
assert text =~ "hey cirno"
assert_receive {:text, ^text}
@@ -292,7 +378,12 @@ test "it sends chat messages to the 'user' stream", %{user: user, token: oauth_t
Streamer.get_topic_and_add_socket("user", user, oauth_token)
Streamer.stream("user", {user, cm_ref})
- text = StreamerView.render("chat_update.json", %{chat_message_reference: cm_ref})
+ text =
+ StreamerView.render(
+ "chat_update.json",
+ %{chat_message_reference: cm_ref},
+ "user:#{user.id}"
+ )
assert text =~ "hey cirno"
assert_receive {:text, ^text}
@@ -313,7 +404,7 @@ test "it sends chat message notifications to the 'user:notification' stream", %{
Streamer.get_topic_and_add_socket("user:notification", user, oauth_token)
Streamer.stream("user:notification", notify)
- assert_receive {:render_with_user, _, _, ^notify}
+ assert_receive {:render_with_user, _, _, ^notify, _}
refute Streamer.filtered_by_user?(user, notify)
end
@@ -359,7 +450,7 @@ test "it sends favorite to 'user:notification' stream'", %{
Streamer.get_topic_and_add_socket("user:notification", user, oauth_token)
{:ok, favorite_activity} = CommonAPI.favorite(user2, activity.id)
- assert_receive {:render_with_user, _, "notification.json", notif}
+ assert_receive {:render_with_user, _, "notification.json", notif, _}
assert notif.activity.id == favorite_activity.id
refute Streamer.filtered_by_user?(user, notif)
end
@@ -388,7 +479,7 @@ test "it sends follow activities to the 'user:notification' stream", %{
Streamer.get_topic_and_add_socket("user:notification", user, oauth_token)
{:ok, _follower, _followed, follow_activity} = CommonAPI.follow(user2, user)
- assert_receive {:render_with_user, _, "notification.json", notif}
+ assert_receive {:render_with_user, _, "notification.json", notif, _}
assert notif.activity.id == follow_activity.id
refute Streamer.filtered_by_user?(user, notif)
end
@@ -453,7 +544,7 @@ test "it streams edits in the 'user' stream", %{user: user, token: oauth_token}
{:ok, edited} = CommonAPI.update(sender, activity, %{status: "mew mew"})
create = Pleroma.Activity.get_create_by_object_ap_id_with_object(activity.object.data["id"])
- assert_receive {:render_with_user, _, "status_update.json", ^create}
+ assert_receive {:render_with_user, _, "status_update.json", ^create, _}
refute Streamer.filtered_by_user?(user, edited)
end
@@ -464,7 +555,7 @@ test "it streams own edits in the 'user' stream", %{user: user, token: oauth_tok
{:ok, edited} = CommonAPI.update(user, activity, %{status: "mew mew"})
create = Pleroma.Activity.get_create_by_object_ap_id_with_object(activity.object.data["id"])
- assert_receive {:render_with_user, _, "status_update.json", ^create}
+ assert_receive {:render_with_user, _, "status_update.json", ^create, _}
refute Streamer.filtered_by_user?(user, edited)
end
end
@@ -477,7 +568,7 @@ test "it sends to public (authenticated)" do
Streamer.get_topic_and_add_socket("public", user, oauth_token)
{:ok, activity} = CommonAPI.post(other_user, %{status: "Test"})
- assert_receive {:render_with_user, _, _, ^activity}
+ assert_receive {:render_with_user, _, _, ^activity, _}
refute Streamer.filtered_by_user?(other_user, activity)
end
@@ -577,7 +668,7 @@ test "it filters to user if recipients invalid and thread containment is enabled
Streamer.get_topic_and_add_socket("public", user, oauth_token)
Streamer.stream("public", activity)
- assert_receive {:render_with_user, _, _, ^activity}
+ assert_receive {:render_with_user, _, _, ^activity, _}
assert Streamer.filtered_by_user?(user, activity)
end
@@ -599,7 +690,7 @@ test "it sends message if recipients invalid and thread containment is disabled"
Streamer.get_topic_and_add_socket("public", user, oauth_token)
Streamer.stream("public", activity)
- assert_receive {:render_with_user, _, _, ^activity}
+ assert_receive {:render_with_user, _, _, ^activity, _}
refute Streamer.filtered_by_user?(user, activity)
end
@@ -622,7 +713,7 @@ test "it sends message if recipients invalid and thread containment is enabled b
Streamer.get_topic_and_add_socket("public", user, oauth_token)
Streamer.stream("public", activity)
- assert_receive {:render_with_user, _, _, ^activity}
+ assert_receive {:render_with_user, _, _, ^activity, _}
refute Streamer.filtered_by_user?(user, activity)
end
end
@@ -636,7 +727,7 @@ test "it filters messages involving blocked users", %{user: user, token: oauth_t
Streamer.get_topic_and_add_socket("public", user, oauth_token)
{:ok, activity} = CommonAPI.post(blocked_user, %{status: "Test"})
- assert_receive {:render_with_user, _, _, ^activity}
+ assert_receive {:render_with_user, _, _, ^activity, _}
assert Streamer.filtered_by_user?(user, activity)
end
@@ -653,17 +744,17 @@ test "it filters messages transitively involving blocked users", %{
{:ok, activity_one} = CommonAPI.post(friend, %{status: "hey! @#{blockee.nickname}"})
- assert_receive {:render_with_user, _, _, ^activity_one}
+ assert_receive {:render_with_user, _, _, ^activity_one, _}
assert Streamer.filtered_by_user?(blocker, activity_one)
{:ok, activity_two} = CommonAPI.post(blockee, %{status: "hey! @#{friend.nickname}"})
- assert_receive {:render_with_user, _, _, ^activity_two}
+ assert_receive {:render_with_user, _, _, ^activity_two, _}
assert Streamer.filtered_by_user?(blocker, activity_two)
{:ok, activity_three} = CommonAPI.post(blockee, %{status: "hey! @#{blocker.nickname}"})
- assert_receive {:render_with_user, _, _, ^activity_three}
+ assert_receive {:render_with_user, _, _, ^activity_three, _}
assert Streamer.filtered_by_user?(blocker, activity_three)
end
end
@@ -724,7 +815,7 @@ test "it sends wanted private posts to list", %{user: user_a, token: user_a_toke
visibility: "private"
})
- assert_receive {:render_with_user, _, _, ^activity}
+ assert_receive {:render_with_user, _, _, ^activity, _}
refute Streamer.filtered_by_user?(user_a, activity)
end
end
@@ -742,7 +833,7 @@ test "it filters muted reblogs", %{user: user1, token: user1_token} do
Streamer.get_topic_and_add_socket("user", user1, user1_token)
{:ok, announce_activity} = CommonAPI.repeat(create_activity.id, user2)
- assert_receive {:render_with_user, _, _, ^announce_activity}
+ assert_receive {:render_with_user, _, _, ^announce_activity, _}
assert Streamer.filtered_by_user?(user1, announce_activity)
end
@@ -758,7 +849,7 @@ test "it filters reblog notification for reblog-muted actors", %{
Streamer.get_topic_and_add_socket("user", user1, user1_token)
{:ok, _announce_activity} = CommonAPI.repeat(create_activity.id, user2)
- assert_receive {:render_with_user, _, "notification.json", notif}
+ assert_receive {:render_with_user, _, "notification.json", notif, _}
assert Streamer.filtered_by_user?(user1, notif)
end
@@ -774,7 +865,7 @@ test "it send non-reblog notification for reblog-muted actors", %{
Streamer.get_topic_and_add_socket("user", user1, user1_token)
{:ok, _favorite_activity} = CommonAPI.favorite(user2, create_activity.id)
- assert_receive {:render_with_user, _, "notification.json", notif}
+ assert_receive {:render_with_user, _, "notification.json", notif, _}
refute Streamer.filtered_by_user?(user1, notif)
end
end
@@ -789,7 +880,7 @@ test "it filters posts from muted threads" do
{:ok, activity} = CommonAPI.post(user, %{status: "super hot take"})
{:ok, _} = CommonAPI.add_mute(user2, activity)
- assert_receive {:render_with_user, _, _, ^activity}
+ assert_receive {:render_with_user, _, _, ^activity, _}
assert Streamer.filtered_by_user?(user2, activity)
end
end
@@ -831,7 +922,7 @@ test "it doesn't send conversation update to the 'direct' stream when the last m
})
create_activity_id = create_activity.id
- assert_receive {:render_with_user, _, _, ^create_activity}
+ assert_receive {:render_with_user, _, _, ^create_activity, _}
assert_receive {:text, received_conversation1}
assert %{"event" => "conversation", "payload" => _} = Jason.decode!(received_conversation1)
@@ -866,8 +957,8 @@ test "it sends conversation update to the 'direct' stream when a message is dele
visibility: "direct"
})
- assert_receive {:render_with_user, _, _, ^create_activity}
- assert_receive {:render_with_user, _, _, ^create_activity2}
+ assert_receive {:render_with_user, _, _, ^create_activity, _}
+ assert_receive {:render_with_user, _, _, ^create_activity2, _}
assert_receive {:text, received_conversation1}
assert %{"event" => "conversation", "payload" => _} = Jason.decode!(received_conversation1)
assert_receive {:text, received_conversation1}
@@ -896,7 +987,7 @@ test "it sends conversation update to the 'direct' stream when a message is dele
receive do
{StreamerTest, :ready} ->
- assert_receive {:render_with_user, _, "update.json", _}
+ assert_receive {:render_with_user, _, "update.json", _, _}
receive do
{StreamerTest, :revoked} -> finalize.()
diff --git a/test/pleroma/web/twitter_api/remote_follow_controller_test.exs b/test/pleroma/web/twitter_api/remote_follow_controller_test.exs
index 1194e0afea..c6ecb53f44 100644
--- a/test/pleroma/web/twitter_api/remote_follow_controller_test.exs
+++ b/test/pleroma/web/twitter_api/remote_follow_controller_test.exs
@@ -3,16 +3,18 @@
# SPDX-License-Identifier: AGPL-3.0-only
defmodule Pleroma.Web.TwitterAPI.RemoteFollowControllerTest do
- use Pleroma.Web.ConnCase, async: true
+ use Pleroma.Web.ConnCase
alias Pleroma.MFA
alias Pleroma.MFA.TOTP
+ alias Pleroma.UnstubbedConfigMock, as: ConfigMock
alias Pleroma.User
alias Pleroma.Web.CommonAPI
- import ExUnit.CaptureLog
- import Pleroma.Factory
import Ecto.Query
+ import ExUnit.CaptureLog
+ import Mox
+ import Pleroma.Factory
setup_all do: clear_config([:instance, :federating], true)
setup do: clear_config([:user, :deny_follow_blocked])
@@ -135,7 +137,7 @@ test "show follow page with error when user can not be fetched by `acct` link",
|> html_response(200)
assert response =~ "Error fetching user"
- end) =~ "Object has been deleted"
+ end) =~ ":not_found"
end
end
@@ -429,6 +431,9 @@ test "without media proxy" do
test "with media proxy" do
clear_config([:media_proxy, :enabled], true)
+ ConfigMock
+ |> stub_with(Pleroma.Test.StaticConfig)
+
user =
insert(:user, %{
local: false,
@@ -455,4 +460,38 @@ test "local avatar is not proxied" do
assert avatar_url == "#{Pleroma.Web.Endpoint.url()}/localuser/avatar.png"
end
end
+
+ describe "GET /authorize_interaction - authorize_interaction/2" do
+ test "redirects to /ostatus_subscribe", %{conn: conn} do
+ Tesla.Mock.mock(fn
+ %{method: :get, url: "https://mastodon.social/users/emelie"} ->
+ %Tesla.Env{
+ status: 200,
+ headers: [{"content-type", "application/activity+json"}],
+ body: File.read!("test/fixtures/tesla_mock/emelie.json")
+ }
+
+ %{method: :get, url: "https://mastodon.social/users/emelie/collections/featured"} ->
+ %Tesla.Env{
+ status: 200,
+ headers: [{"content-type", "application/activity+json"}],
+ body:
+ File.read!("test/fixtures/users_mock/masto_featured.json")
+ |> String.replace("{{domain}}", "mastodon.social")
+ |> String.replace("{{nickname}}", "emelie")
+ }
+ end)
+
+ conn =
+ conn
+ |> get(
+ remote_follow_path(conn, :authorize_interaction, %{
+ uri: "https://mastodon.social/users/emelie"
+ })
+ )
+
+ assert redirected_to(conn) ==
+ remote_follow_path(conn, :follow, %{acct: "https://mastodon.social/users/emelie"})
+ end
+ end
end
diff --git a/test/pleroma/web/twitter_api/util_controller_test.exs b/test/pleroma/web/twitter_api/util_controller_test.exs
index a4da236359..d06ae71aa4 100644
--- a/test/pleroma/web/twitter_api/util_controller_test.exs
+++ b/test/pleroma/web/twitter_api/util_controller_test.exs
@@ -106,7 +106,7 @@ test "returns 503 when healthcheck disabled", %{conn: conn} do
|> get("/api/pleroma/healthcheck")
|> json_response_and_validate_schema(503)
- assert response == %{}
+ assert response == %{"error" => "Healthcheck disabled"}
end
test "returns 200 when healthcheck enabled and all ok", %{conn: conn} do
diff --git a/test/pleroma/web/web_finger/web_finger_controller_test.exs b/test/pleroma/web/web_finger/web_finger_controller_test.exs
index 5e3ac26f98..80e072163d 100644
--- a/test/pleroma/web/web_finger/web_finger_controller_test.exs
+++ b/test/pleroma/web/web_finger/web_finger_controller_test.exs
@@ -23,8 +23,15 @@ test "GET host-meta" do
assert response.status == 200
- assert response.resp_body ==
- ~s( )
+ response_xml =
+ response.resp_body
+ |> Floki.parse_document!(html_parser: Floki.HTMLParser.Mochiweb, attributes_as_maps: true)
+
+ expected_xml =
+ ~s( )
+ |> Floki.parse_document!(html_parser: Floki.HTMLParser.Mochiweb, attributes_as_maps: true)
+
+ assert match?(^response_xml, expected_xml)
end
test "Webfinger JRD" do
@@ -48,12 +55,7 @@ test "Webfinger JRD" do
]
end
- test "reach user on tld, while pleroma is runned on subdomain" do
- Pleroma.Web.Endpoint.config_change(
- [{Pleroma.Web.Endpoint, url: [host: "sub.example.com"]}],
- []
- )
-
+ test "reach user on tld, while pleroma is running on subdomain" do
clear_config([Pleroma.Web.Endpoint, :url, :host], "sub.example.com")
clear_config([Pleroma.Web.WebFinger, :domain], "example.com")
@@ -68,13 +70,6 @@ test "reach user on tld, while pleroma is runned on subdomain" do
assert response["subject"] == "acct:#{user.nickname}@example.com"
assert response["aliases"] == ["https://sub.example.com/users/#{user.nickname}"]
-
- on_exit(fn ->
- Pleroma.Web.Endpoint.config_change(
- [{Pleroma.Web.Endpoint, url: [host: "localhost"]}],
- []
- )
- end)
end
test "it returns 404 when user isn't found (JSON)" do
diff --git a/test/pleroma/web/web_finger_test.exs b/test/pleroma/web/web_finger_test.exs
index fafef54fe7..8a550a6ba4 100644
--- a/test/pleroma/web/web_finger_test.exs
+++ b/test/pleroma/web/web_finger_test.exs
@@ -76,15 +76,6 @@ test "returns the ActivityPub actor URI for an ActivityPub user" do
{:ok, _data} = WebFinger.finger(user)
end
- test "returns the ActivityPub actor URI and subscribe address for an ActivityPub user with the ld+json mimetype" do
- user = "kaniini@gerzilla.de"
-
- {:ok, data} = WebFinger.finger(user)
-
- assert data["ap_id"] == "https://gerzilla.de/channel/kaniini"
- assert data["subscribe_address"] == "https://gerzilla.de/follow?f=&url={uri}"
- end
-
test "it work for AP-only user" do
user = "kpherox@mstdn.jp"
@@ -99,12 +90,6 @@ test "it work for AP-only user" do
assert data["subscribe_address"] == "https://mstdn.jp/authorize_interaction?acct={uri}"
end
- test "it works for friendica" do
- user = "lain@squeet.me"
-
- {:ok, _data} = WebFinger.finger(user)
- end
-
test "it gets the xrd endpoint" do
{:ok, template} = WebFinger.find_lrdd_template("social.heldscal.la")
@@ -180,5 +165,67 @@ test "respects xml content-type" do
{:ok, _data} = WebFinger.finger("pekorino@pawoo.net")
end
+
+ test "refuses to process XML remote entities" do
+ Tesla.Mock.mock(fn
+ %{
+ url: "https://pawoo.net/.well-known/webfinger?resource=acct:pekorino@pawoo.net"
+ } ->
+ {:ok,
+ %Tesla.Env{
+ status: 200,
+ body: File.read!("test/fixtures/xml_external_entities.xml"),
+ headers: [{"content-type", "application/xrd+xml"}]
+ }}
+
+ %{url: "https://pawoo.net/.well-known/host-meta"} ->
+ {:ok,
+ %Tesla.Env{
+ status: 200,
+ body: File.read!("test/fixtures/tesla_mock/pawoo.net_host_meta")
+ }}
+ end)
+
+ assert :error = WebFinger.finger("pekorino@pawoo.net")
+ end
+
+ test "prevents spoofing" do
+ Tesla.Mock.mock(fn
+ %{
+ url: "https://gleasonator.com/.well-known/webfinger?resource=acct:alex@gleasonator.com"
+ } ->
+ {:ok,
+ %Tesla.Env{
+ status: 200,
+ body: File.read!("test/fixtures/tesla_mock/webfinger_spoof.json"),
+ headers: [{"content-type", "application/jrd+json"}]
+ }}
+
+ %{url: "https://gleasonator.com/.well-known/host-meta"} ->
+ {:ok,
+ %Tesla.Env{
+ status: 200,
+ body: File.read!("test/fixtures/tesla_mock/gleasonator.com_host_meta")
+ }}
+ end)
+
+ {:error, _data} = WebFinger.finger("alex@gleasonator.com")
+ end
+ end
+
+ @tag capture_log: true
+ test "prevents forgeries" do
+ Tesla.Mock.mock(fn
+ %{url: "https://fba.ryona.agency/.well-known/webfinger?resource=acct:graf@fba.ryona.agency"} ->
+ fake_webfinger =
+ File.read!("test/fixtures/webfinger/graf-imposter-webfinger.json") |> Jason.decode!()
+
+ Tesla.Mock.json(fake_webfinger)
+
+ %{url: "https://fba.ryona.agency/.well-known/host-meta"} ->
+ {:ok, %Tesla.Env{status: 404}}
+ end)
+
+ assert {:error, _} = WebFinger.finger("graf@fba.ryona.agency")
end
end
diff --git a/test/pleroma/web/xml_test.exs b/test/pleroma/web/xml_test.exs
new file mode 100644
index 0000000000..49306430b7
--- /dev/null
+++ b/test/pleroma/web/xml_test.exs
@@ -0,0 +1,15 @@
+defmodule Pleroma.Web.XMLTest do
+ use Pleroma.DataCase, async: true
+
+ alias Pleroma.Web.XML
+
+ test "refuses to parse any entities from XML" do
+ data = File.read!("test/fixtures/xml_billion_laughs.xml")
+ assert(:error == XML.parse_document(data))
+ end
+
+ test "refuses to load external entities from XML" do
+ data = File.read!("test/fixtures/xml_external_entities.xml")
+ assert(:error == XML.parse_document(data))
+ end
+end
diff --git a/test/pleroma/workers/cron/digest_emails_worker_test.exs b/test/pleroma/workers/cron/digest_emails_worker_test.exs
index 851f4d63ab..e0bdf303e8 100644
--- a/test/pleroma/workers/cron/digest_emails_worker_test.exs
+++ b/test/pleroma/workers/cron/digest_emails_worker_test.exs
@@ -13,6 +13,11 @@ defmodule Pleroma.Workers.Cron.DigestEmailsWorkerTest do
setup do: clear_config([:email_notifications, :digest])
+ setup do
+ Mox.stub_with(Pleroma.UnstubbedConfigMock, Pleroma.Config)
+ :ok
+ end
+
setup do
clear_config([:email_notifications, :digest], %{
active: true,
diff --git a/test/pleroma/workers/cron/new_users_digest_worker_test.exs b/test/pleroma/workers/cron/new_users_digest_worker_test.exs
index 84914876cc..0e4234cc8e 100644
--- a/test/pleroma/workers/cron/new_users_digest_worker_test.exs
+++ b/test/pleroma/workers/cron/new_users_digest_worker_test.exs
@@ -10,6 +10,11 @@ defmodule Pleroma.Workers.Cron.NewUsersDigestWorkerTest do
alias Pleroma.Web.CommonAPI
alias Pleroma.Workers.Cron.NewUsersDigestWorker
+ setup do
+ Mox.stub_with(Pleroma.UnstubbedConfigMock, Pleroma.Config)
+ :ok
+ end
+
test "it sends new users digest emails" do
yesterday = NaiveDateTime.utc_now() |> Timex.shift(days: -1)
admin = insert(:user, %{is_admin: true})
diff --git a/test/pleroma/workers/purge_expired_token_test.exs b/test/pleroma/workers/purge_expired_token_test.exs
index d891eb8bbc..add572bb86 100644
--- a/test/pleroma/workers/purge_expired_token_test.exs
+++ b/test/pleroma/workers/purge_expired_token_test.exs
@@ -3,7 +3,7 @@
# SPDX-License-Identifier: AGPL-3.0-only
defmodule Pleroma.Workers.PurgeExpiredTokenTest do
- use Pleroma.DataCase, async: true
+ use Pleroma.DataCase
use Oban.Testing, repo: Pleroma.Repo
import Pleroma.Factory
diff --git a/test/pleroma/workers/receiver_worker_test.exs b/test/pleroma/workers/receiver_worker_test.exs
index 283beee4d5..b9b6d6af2c 100644
--- a/test/pleroma/workers/receiver_worker_test.exs
+++ b/test/pleroma/workers/receiver_worker_test.exs
@@ -3,7 +3,7 @@
# SPDX-License-Identifier: AGPL-3.0-only
defmodule Pleroma.Workers.ReceiverWorkerTest do
- use Pleroma.DataCase, async: true
+ use Pleroma.DataCase
use Oban.Testing, repo: Pleroma.Repo
import Mock
@@ -11,7 +11,7 @@ defmodule Pleroma.Workers.ReceiverWorkerTest do
alias Pleroma.Workers.ReceiverWorker
- test "it ignores MRF reject" do
+ test "it does not retry MRF reject" do
params = insert(:note).data
with_mock Pleroma.Web.ActivityPub.Transmogrifier,
@@ -22,4 +22,31 @@ test "it ignores MRF reject" do
})
end
end
+
+ test "it does not retry ObjectValidator reject" do
+ params =
+ insert(:note_activity).data
+ |> Map.put("id", Pleroma.Web.ActivityPub.Utils.generate_activity_id())
+ |> Map.put("object", %{
+ "type" => "Note",
+ "id" => Pleroma.Web.ActivityPub.Utils.generate_object_id()
+ })
+
+ with_mock Pleroma.Web.ActivityPub.ObjectValidator, [:passthrough],
+ validate: fn _, _ -> {:error, %Ecto.Changeset{}} end do
+ assert {:cancel, {:error, %Ecto.Changeset{}}} =
+ ReceiverWorker.perform(%Oban.Job{
+ args: %{"op" => "incoming_ap_doc", "params" => params}
+ })
+ end
+ end
+
+ test "it does not retry duplicates" do
+ params = insert(:note_activity).data
+
+ assert {:cancel, :already_present} =
+ ReceiverWorker.perform(%Oban.Job{
+ args: %{"op" => "incoming_ap_doc", "params" => params}
+ })
+ end
end
diff --git a/test/pleroma/workers/remote_fetcher_worker_test.exs b/test/pleroma/workers/remote_fetcher_worker_test.exs
new file mode 100644
index 0000000000..c30e773d46
--- /dev/null
+++ b/test/pleroma/workers/remote_fetcher_worker_test.exs
@@ -0,0 +1,69 @@
+# Pleroma: A lightweight social networking server
+# Copyright © 2017-2023 Pleroma Authors
+# SPDX-License-Identifier: AGPL-3.0-only
+
+defmodule Pleroma.Workers.RemoteFetcherWorkerTest do
+ use Pleroma.DataCase
+ use Oban.Testing, repo: Pleroma.Repo
+
+ alias Pleroma.Workers.RemoteFetcherWorker
+
+ @deleted_object_one "https://deleted-404.example.com/"
+ @deleted_object_two "https://deleted-410.example.com/"
+ @unauthorized_object "https://unauthorized.example.com/"
+ @depth_object "https://depth.example.com/"
+
+ describe "RemoteFetcherWorker" do
+ setup do
+ Tesla.Mock.mock(fn
+ %{method: :get, url: @deleted_object_one} ->
+ %Tesla.Env{
+ status: 404
+ }
+
+ %{method: :get, url: @deleted_object_two} ->
+ %Tesla.Env{
+ status: 410
+ }
+
+ %{method: :get, url: @unauthorized_object} ->
+ %Tesla.Env{
+ status: 403
+ }
+
+ %{method: :get, url: @depth_object} ->
+ %Tesla.Env{
+ status: 200
+ }
+ end)
+ end
+
+ test "does not requeue a deleted object" do
+ assert {:discard, _} =
+ RemoteFetcherWorker.perform(%Oban.Job{
+ args: %{"op" => "fetch_remote", "id" => @deleted_object_one}
+ })
+
+ assert {:discard, _} =
+ RemoteFetcherWorker.perform(%Oban.Job{
+ args: %{"op" => "fetch_remote", "id" => @deleted_object_two}
+ })
+ end
+
+ test "does not requeue an unauthorized object" do
+ assert {:discard, _} =
+ RemoteFetcherWorker.perform(%Oban.Job{
+ args: %{"op" => "fetch_remote", "id" => @unauthorized_object}
+ })
+ end
+
+ test "does not requeue an object that exceeded depth" do
+ clear_config([:instance, :federation_incoming_replies_max_depth], 0)
+
+ assert {:discard, _} =
+ RemoteFetcherWorker.perform(%Oban.Job{
+ args: %{"op" => "fetch_remote", "id" => @depth_object, "depth" => 1}
+ })
+ end
+ end
+end
diff --git a/test/support/cachex_proxy.ex b/test/support/cachex_proxy.ex
index 83ae5610f4..8f27986a9c 100644
--- a/test/support/cachex_proxy.ex
+++ b/test/support/cachex_proxy.ex
@@ -26,9 +26,15 @@ defmodule Pleroma.CachexProxy do
@impl true
defdelegate fetch!(cache, key, func), to: Cachex
+ @impl true
+ defdelegate fetch(cache, key, func), to: Cachex
+
@impl true
defdelegate expire_at(cache, str, num), to: Cachex
+ @impl true
+ defdelegate expire(cache, str, num), to: Cachex
+
@impl true
defdelegate exists?(cache, key), to: Cachex
diff --git a/test/support/cluster.ex b/test/support/cluster.ex
index 1c923fb0c5..a0ec91168a 100644
--- a/test/support/cluster.ex
+++ b/test/support/cluster.ex
@@ -127,7 +127,10 @@ def eval_quoted(block, binding) do
defp start_slave({node_host, override_configs}) do
log(node_host, "booting federated VM")
- {:ok, node} = :slave.start(~c"127.0.0.1", node_name(node_host), vm_args())
+
+ {:ok, node} =
+ do_start_slave(%{host: "127.0.0.1", name: node_name(node_host), args: vm_args()})
+
add_code_paths(node)
load_apps_and_transfer_configuration(node, override_configs)
ensure_apps_started(node)
@@ -219,4 +222,14 @@ defp node_name(node_host) do
|> Enum.at(0)
|> String.to_atom()
end
+
+ defp do_start_slave(%{host: host, name: name, args: args} = opts) do
+ peer_module = Application.get_env(__MODULE__, :peer_module)
+
+ if peer_module == :peer do
+ peer_module.start(opts)
+ else
+ peer_module.start(host, name, args)
+ end
+ end
end
diff --git a/test/support/data_case.ex b/test/support/data_case.ex
index 3c9cab061a..14403f0b81 100644
--- a/test/support/data_case.ex
+++ b/test/support/data_case.ex
@@ -115,6 +115,7 @@ def stub_pipeline do
Mox.stub_with(Pleroma.Web.ActivityPub.ActivityPubMock, Pleroma.Web.ActivityPub.ActivityPub)
Mox.stub_with(Pleroma.Web.FederatorMock, Pleroma.Web.Federator)
Mox.stub_with(Pleroma.ConfigMock, Pleroma.Config)
+ Mox.stub_with(Pleroma.StaticStubbedConfigMock, Pleroma.Test.StaticConfig)
end
def ensure_local_uploader(context) do
diff --git a/test/support/factory.ex b/test/support/factory.ex
index 09f02458cf..20bc5162e1 100644
--- a/test/support/factory.ex
+++ b/test/support/factory.ex
@@ -50,7 +50,6 @@ def user_factory(attrs \\ %{}) do
last_refreshed_at: NaiveDateTime.utc_now(),
notification_settings: %Pleroma.User.NotificationSetting{},
multi_factor_authentication_settings: %Pleroma.MFA.Settings{},
- ap_enabled: true,
keys: pem
}
@@ -213,7 +212,7 @@ def listen_factory do
end
def direct_note_factory do
- user2 = insert(:user)
+ user2 = insert(:user, local: false, inbox: "http://example.com/inbox")
%Pleroma.Object{data: data} = note_factory()
%Pleroma.Object{data: Map.merge(data, %{"to" => [user2.ap_id]})}
diff --git a/test/support/helpers.ex b/test/support/helpers.ex
index 0bd487f391..7fa6c31a45 100644
--- a/test/support/helpers.ex
+++ b/test/support/helpers.ex
@@ -10,6 +10,39 @@ defmodule Pleroma.Tests.Helpers do
require Logger
+ @doc "Accepts two URLs/URIs and sorts the query parameters before comparing"
+ def uri_equal?(a, b) do
+ a_sorted = uri_query_sort(a)
+ b_sorted = uri_query_sort(b)
+
+ match?(^a_sorted, b_sorted)
+ end
+
+ @doc "Accepts a URL/URI and sorts the query parameters"
+ def uri_query_sort(uri) do
+ parsed = URI.parse(uri)
+
+ sorted_query =
+ String.split(parsed.query, "&")
+ |> Enum.sort()
+ |> Enum.join("&")
+
+ parsed
+ |> Map.put(:query, sorted_query)
+ |> URI.to_string()
+ end
+
+ @doc "Returns the value of the specified query parameter for the provided URL"
+ def get_query_parameter(url, param) do
+ url
+ |> URI.parse()
+ |> Map.get(:query)
+ |> URI.query_decoder()
+ |> Enum.to_list()
+ |> Enum.into(%{}, fn {x, y} -> {x, y} end)
+ |> Map.get(param)
+ end
+
defmacro clear_config(config_path) do
quote do
clear_config(unquote(config_path)) do
@@ -41,7 +74,7 @@ defmacro clear_config(config_path, temp_setting) do
# NOTE: `clear_config([section, key], value)` != `clear_config([section], key: value)` (!)
# Displaying a warning to prevent unintentional clearing of all but one keys in section
if Keyword.keyword?(temp_setting) and length(temp_setting) == 1 do
- Logger.warn(
+ Logger.warning(
"Please change `clear_config([section], key: value)` to `clear_config([section, key], value)`"
)
end
diff --git a/test/support/http_request_mock.ex b/test/support/http_request_mock.ex
index b0cf613ac5..20e410424b 100644
--- a/test/support/http_request_mock.ex
+++ b/test/support/http_request_mock.ex
@@ -21,7 +21,7 @@ def request(
else
error ->
with {:error, message} <- error do
- Logger.warn(to_string(message))
+ Logger.warning(to_string(message))
end
{_, _r} = error
@@ -178,7 +178,7 @@ def get(
end
def get(
- "https://social.heldscal.la/.well-known/webfinger?resource=nonexistant@social.heldscal.la",
+ "https://social.heldscal.la/.well-known/webfinger?resource=nonexistent@social.heldscal.la",
_,
_,
[{"accept", "application/xrd+xml,application/jrd+json"}]
@@ -186,7 +186,7 @@ def get(
{:ok,
%Tesla.Env{
status: 200,
- body: File.read!("test/fixtures/tesla_mock/nonexistant@social.heldscal.la.xml")
+ body: File.read!("test/fixtures/tesla_mock/nonexistent@social.heldscal.la.xml")
}}
end
@@ -1059,7 +1059,7 @@ def get("https://example.com/ogp-missing-data", _, _, _) do
}}
end
- def get("http://example.com/malformed", _, _, _) do
+ def get("https://example.com/malformed", _, _, _) do
{:ok,
%Tesla.Env{status: 200, body: File.read!("test/fixtures/rich_media/malformed-data.html")}}
end
@@ -1380,6 +1380,15 @@ def get("https://gleasonator.com/objects/102eb097-a18b-4cd5-abfc-f952efcb70bb",
}}
end
+ def get("https://misskey.io/users/83ssedkv53", _, _, _) do
+ {:ok,
+ %Tesla.Env{
+ status: 200,
+ body: File.read!("test/fixtures/tesla_mock/aimu@misskey.io.json"),
+ headers: activitypub_object_headers()
+ }}
+ end
+
def get("https://gleasonator.com/users/macgirvin", _, _, _) do
{:ok,
%Tesla.Env{
@@ -1446,6 +1455,186 @@ def get("https://p.helene.moe/objects/fd5910ac-d9dc-412e-8d1d-914b203296c4", _,
}}
end
+ def get("https://misskey.io/notes/8vs6wxufd0", _, _, _) do
+ {:ok,
+ %Tesla.Env{
+ status: 200,
+ body: File.read!("test/fixtures/tesla_mock/misskey.io_8vs6wxufd0.json"),
+ headers: activitypub_object_headers()
+ }}
+ end
+
+ def get("https://google.com/", _, _, _) do
+ {:ok, %Tesla.Env{status: 200, body: File.read!("test/fixtures/rich_media/google.html")}}
+ end
+
+ def get("https://yahoo.com/", _, _, _) do
+ {:ok, %Tesla.Env{status: 200, body: File.read!("test/fixtures/rich_media/yahoo.html")}}
+ end
+
+ def get("https://example.com/error", _, _, _), do: {:error, :overload}
+
+ def get("https://example.com/ogp-missing-title", _, _, _) do
+ {:ok,
+ %Tesla.Env{
+ status: 200,
+ body: File.read!("test/fixtures/rich_media/ogp-missing-title.html")
+ }}
+ end
+
+ def get("https://example.com/oembed", _, _, _) do
+ {:ok, %Tesla.Env{status: 200, body: File.read!("test/fixtures/rich_media/oembed.html")}}
+ end
+
+ def get("https://example.com/oembed.json", _, _, _) do
+ {:ok, %Tesla.Env{status: 200, body: File.read!("test/fixtures/rich_media/oembed.json")}}
+ end
+
+ def get("https://example.com/twitter-card", _, _, _) do
+ {:ok, %Tesla.Env{status: 200, body: File.read!("test/fixtures/rich_media/twitter_card.html")}}
+ end
+
+ def get("https://example.com/non-ogp", _, _, _) do
+ {:ok,
+ %Tesla.Env{status: 200, body: File.read!("test/fixtures/rich_media/non_ogp_embed.html")}}
+ end
+
+ def get("https://example.com/empty", _, _, _) do
+ {:ok, %Tesla.Env{status: 200, body: "hello"}}
+ end
+
+ def get("https://friends.grishka.me/posts/54642", _, _, _) do
+ {:ok,
+ %Tesla.Env{
+ status: 200,
+ body: File.read!("test/fixtures/tesla_mock/smithereen_non_anonymous_poll.json"),
+ headers: activitypub_object_headers()
+ }}
+ end
+
+ def get("https://friends.grishka.me/users/1", _, _, _) do
+ {:ok,
+ %Tesla.Env{
+ status: 200,
+ body: File.read!("test/fixtures/tesla_mock/smithereen_user.json"),
+ headers: activitypub_object_headers()
+ }}
+ end
+
+ def get("https://mastodon.example/.well-known/host-meta", _, _, _) do
+ {:ok,
+ %Tesla.Env{
+ status: 302,
+ headers: [{"location", "https://sub.mastodon.example/.well-known/host-meta"}]
+ }}
+ end
+
+ def get("https://sub.mastodon.example/.well-known/host-meta", _, _, _) do
+ {:ok,
+ %Tesla.Env{
+ status: 200,
+ body:
+ "test/fixtures/webfinger/masto-host-meta.xml"
+ |> File.read!()
+ |> String.replace("{{domain}}", "sub.mastodon.example")
+ }}
+ end
+
+ def get(
+ "https://sub.mastodon.example/.well-known/webfinger?resource=acct:a@mastodon.example",
+ _,
+ _,
+ _
+ ) do
+ {:ok,
+ %Tesla.Env{
+ status: 200,
+ body:
+ "test/fixtures/webfinger/masto-webfinger.json"
+ |> File.read!()
+ |> String.replace("{{nickname}}", "a")
+ |> String.replace("{{domain}}", "mastodon.example")
+ |> String.replace("{{subdomain}}", "sub.mastodon.example"),
+ headers: [{"content-type", "application/jrd+json"}]
+ }}
+ end
+
+ def get("https://sub.mastodon.example/users/a", _, _, _) do
+ {:ok,
+ %Tesla.Env{
+ status: 200,
+ body:
+ "test/fixtures/webfinger/masto-user.json"
+ |> File.read!()
+ |> String.replace("{{nickname}}", "a")
+ |> String.replace("{{domain}}", "sub.mastodon.example"),
+ headers: [{"content-type", "application/activity+json"}]
+ }}
+ end
+
+ def get("https://sub.mastodon.example/users/a/collections/featured", _, _, _) do
+ {:ok,
+ %Tesla.Env{
+ status: 200,
+ body:
+ File.read!("test/fixtures/users_mock/masto_featured.json")
+ |> String.replace("{{domain}}", "sub.mastodon.example")
+ |> String.replace("{{nickname}}", "a"),
+ headers: [{"content-type", "application/activity+json"}]
+ }}
+ end
+
+ def get("https://pleroma.example/.well-known/host-meta", _, _, _) do
+ {:ok,
+ %Tesla.Env{
+ status: 302,
+ headers: [{"location", "https://sub.pleroma.example/.well-known/host-meta"}]
+ }}
+ end
+
+ def get("https://sub.pleroma.example/.well-known/host-meta", _, _, _) do
+ {:ok,
+ %Tesla.Env{
+ status: 200,
+ body:
+ "test/fixtures/webfinger/pleroma-host-meta.xml"
+ |> File.read!()
+ |> String.replace("{{domain}}", "sub.pleroma.example")
+ }}
+ end
+
+ def get(
+ "https://sub.pleroma.example/.well-known/webfinger?resource=acct:a@pleroma.example",
+ _,
+ _,
+ _
+ ) do
+ {:ok,
+ %Tesla.Env{
+ status: 200,
+ body:
+ "test/fixtures/webfinger/pleroma-webfinger.json"
+ |> File.read!()
+ |> String.replace("{{nickname}}", "a")
+ |> String.replace("{{domain}}", "pleroma.example")
+ |> String.replace("{{subdomain}}", "sub.pleroma.example"),
+ headers: [{"content-type", "application/jrd+json"}]
+ }}
+ end
+
+ def get("https://sub.pleroma.example/users/a", _, _, _) do
+ {:ok,
+ %Tesla.Env{
+ status: 200,
+ body:
+ "test/fixtures/webfinger/pleroma-user.json"
+ |> File.read!()
+ |> String.replace("{{nickname}}", "a")
+ |> String.replace("{{domain}}", "sub.pleroma.example"),
+ headers: [{"content-type", "application/activity+json"}]
+ }}
+ end
+
def get(url, query, body, headers) do
{:error,
"Mock response not implemented for GET #{inspect(url)}, #{query}, #{inspect(body)}, #{inspect(headers)}"}
@@ -1519,14 +1708,41 @@ def post(url, query, body, headers) do
# Most of the rich media mocks are missing HEAD requests, so we just return 404.
@rich_media_mocks [
+ "https://example.com/empty",
+ "https://example.com/error",
+ "https://example.com/malformed",
+ "https://example.com/non-ogp",
+ "https://example.com/oembed",
+ "https://example.com/oembed.json",
"https://example.com/ogp",
"https://example.com/ogp-missing-data",
- "https://example.com/twitter-card"
+ "https://example.com/ogp-missing-title",
+ "https://example.com/twitter-card",
+ "https://google.com/",
+ "https://pleroma.local/notice/9kCP7V",
+ "https://yahoo.com/"
]
+
def head(url, _query, _body, _headers) when url in @rich_media_mocks do
{:ok, %Tesla.Env{status: 404, body: ""}}
end
+ def head("https://example.com/pdf-file", _, _, _) do
+ {:ok,
+ %Tesla.Env{
+ status: 200,
+ headers: [{"content-length", "1000000"}, {"content-type", "application/pdf"}]
+ }}
+ end
+
+ def head("https://example.com/huge-page", _, _, _) do
+ {:ok,
+ %Tesla.Env{
+ status: 200,
+ headers: [{"content-length", "2000001"}, {"content-type", "text/html"}]
+ }}
+ end
+
def head(url, query, body, headers) do
{:error,
"Mock response not implemented for HEAD #{inspect(url)}, #{query}, #{inspect(body)}, #{inspect(headers)}"}
diff --git a/test/support/mocks.ex b/test/support/mocks.ex
index d167996bd8..d906f0e1da 100644
--- a/test/support/mocks.ex
+++ b/test/support/mocks.ex
@@ -26,5 +26,11 @@
Mox.defmock(Pleroma.Web.FederatorMock, for: Pleroma.Web.Federator.Publishing)
Mox.defmock(Pleroma.ConfigMock, for: Pleroma.Config.Getting)
+Mox.defmock(Pleroma.UnstubbedConfigMock, for: Pleroma.Config.Getting)
+Mox.defmock(Pleroma.StaticStubbedConfigMock, for: Pleroma.Config.Getting)
Mox.defmock(Pleroma.LoggerMock, for: Pleroma.Logging)
+
+Mox.defmock(Pleroma.User.Backup.ProcessorMock, for: Pleroma.User.Backup.ProcessorAPI)
+
+Mox.defmock(Pleroma.Uploaders.S3.ExAwsMock, for: Pleroma.Uploaders.S3.ExAwsAPI)
diff --git a/test/support/null_cache.ex b/test/support/null_cache.ex
index 9f1d45f1df..47c84174e8 100644
--- a/test/support/null_cache.ex
+++ b/test/support/null_cache.ex
@@ -28,6 +28,9 @@ def fetch!(_, key, func) do
end
end
+ @impl true
+ def fetch(_, key, func), do: func.(key)
+
@impl true
def get_and_update(_, _, func) do
func.(nil)
@@ -36,6 +39,9 @@ def get_and_update(_, _, func) do
@impl true
def expire_at(_, _, _), do: {:ok, true}
+ @impl true
+ def expire(_, _, _), do: {:ok, true}
+
@impl true
def exists?(_, _), do: {:ok, false}
diff --git a/test/test_helper.exs b/test/test_helper.exs
index 60a61484f1..a117584ae8 100644
--- a/test/test_helper.exs
+++ b/test/test_helper.exs
@@ -2,8 +2,17 @@
# Copyright © 2017-2022 Pleroma Authors
# SPDX-License-Identifier: AGPL-3.0-only
-os_exclude = if :os.type() == {:unix, :darwin}, do: [skip_on_mac: true], else: []
-ExUnit.start(exclude: [:federated, :erratic] ++ os_exclude)
+Code.put_compiler_option(:warnings_as_errors, true)
+
+ExUnit.configure(max_cases: System.schedulers_online())
+
+ExUnit.start(exclude: [:federated, :erratic])
+
+if match?({:unix, :darwin}, :os.type()) do
+ excluded = ExUnit.configuration() |> Keyword.get(:exclude, [])
+ excluded = excluded ++ [:skip_darwin]
+ ExUnit.configure(exclude: excluded)
+end
Ecto.Adapters.SQL.Sandbox.mode(Pleroma.Repo, :manual)
@@ -16,3 +25,16 @@
uploads = Pleroma.Config.get([Pleroma.Uploaders.Local, :uploads], "test/uploads")
File.rm_rf!(uploads)
end)
+
+defmodule Pleroma.Test.StaticConfig do
+ @moduledoc """
+ This module provides a Config that is completely static, built at startup time from the environment. It's safe to use in testing as it will not modify any state.
+ """
+
+ @behaviour Pleroma.Config.Getting
+ @config Application.get_all_env(:pleroma)
+
+ def get(path, default \\ nil) do
+ get_in(@config, path) || default
+ end
+end
diff --git a/tools/check-changelog b/tools/check-changelog
new file mode 100644
index 0000000000..d053ed577e
--- /dev/null
+++ b/tools/check-changelog
@@ -0,0 +1,18 @@
+#!/bin/sh
+
+echo "looking for change log"
+
+git remote add upstream https://git.pleroma.social/pleroma/pleroma.git
+git fetch upstream ${CI_MERGE_REQUEST_TARGET_BRANCH_NAME}:refs/remotes/upstream/$CI_MERGE_REQUEST_TARGET_BRANCH_NAME
+
+git diff --raw --no-renames upstream/$CI_MERGE_REQUEST_TARGET_BRANCH_NAME HEAD -- changelog.d | \
+ grep ' A\t' | grep '\.\(skip\|add\|remove\|fix\|security\|change\)$'
+ret=$?
+
+if [ $ret -eq 0 ]; then
+ echo "found a changelog entry"
+ exit 0
+else
+ echo "changelog entry not found"
+ exit 1
+fi
diff --git a/tools/collect-changelog b/tools/collect-changelog
new file mode 100755
index 0000000000..1e12d5640e
--- /dev/null
+++ b/tools/collect-changelog
@@ -0,0 +1,27 @@
+#!/bin/sh
+
+collectType() {
+ local suffix="$1"
+ local header="$2"
+ local printed=0
+ for file in changelog.d/*."$suffix"; do
+ if [ '!' -f "$file" ]; then
+ continue
+ fi
+ if [ "$printed" = 0 ]; then
+ echo
+ echo "### $header"
+ printed=1
+ fi
+ # Normalize any trailing newlines/spaces, etc.
+ echo "- $(cat "$file")"
+ done
+}
+
+collectType security Security
+collectType change Changed
+collectType add Added
+collectType fix Fixed
+collectType remove Removed
+
+rm changelog.d/*
diff --git a/uploads/.gitignore b/uploads/.gitignore
deleted file mode 100644
index 523e584a70..0000000000
--- a/uploads/.gitignore
+++ /dev/null
@@ -1,3 +0,0 @@
-# Git will ignore everything in this directory except this file.
-*
-!.gitignore