Skip to content

Instantly share code, notes, and snippets.

@thomasweitzel
Last active November 23, 2022 12:22
Show Gist options
  • Save thomasweitzel/4e6f3e7f95f858c5260c5326c68be58c to your computer and use it in GitHub Desktop.
Save thomasweitzel/4e6f3e7f95f858c5260c5326c68be58c to your computer and use it in GitHub Desktop.
PlantUML activity diagram for visibility of a Mastodon toot
@startuml
<style>
diamond {
BackgroundColor #palegreen
LineColor #green
LineThickness 2.5
}
</style>
!$START = "Public toot by @name"
!$HOME = "Toot shows in **Home** timeline"
!$LOCAL = "Toot shows in **Local** timeline"
!$FEDERATED = "Toot shows in **Federated** timeline"
!$NEVER = "Toot **never** reaches your instance"
!$Q_FOLLOW = "Are you following @name?"
!$Q_INSTANCE = "Is @name on your instance?"
!$Q_INDIRECT = "Does someone on your\ninstance follow @name?"
!$Q_OTHER = "Did your instance\nbecome aware of the\ntoot in some other way,\ne.g. a boost/reply by someone\nyou don't follow on your instance,\nor a local search of the URL\nby someone on your instance?"
title The visibility of a toot\n<sub>In what timeline will a toot appear?</sub>\n
start
:$START;
if ($Q_FOLLOW) then (**YES**)
#lightblue :$HOME;
else (**NO**)
if ($Q_INSTANCE) then (**YES**)
#lightblue :$LOCAL;
else (**NO**)
if ($Q_INDIRECT) then (**YES**)
#lightblue :$FEDERATED;
else (**NO**)
if ($Q_OTHER) then (**YES**)
#lightblue :$FEDERATED;
else (**NO**)
#pink :$NEVER;
endif
endif
endif
endif
stop
right footer "Created with PlantUML by Thomas Weitzel\nBased on **https://github.com/mastodon/mastodon/issues/6812**\nand **https://axbom.com/mastodon-tips**\nSource here: **https://gist.github.com/thomasweitzel/4e6f3e7f95f858c5260c5326c68be58c**"
@enduml
Display the source blob
Display the rendered blob
Raw
<?xml version="1.0" encoding="UTF-8" standalone="no"?><svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" contentStyleType="text/css" height="628px" preserveAspectRatio="none" style="width:1240px;height:628px;background:#FFFFFF;" version="1.1" viewBox="0 0 1240 628" width="1240px" zoomAndPan="magnify"><defs/><g><text fill="#000000" font-family="sans-serif" font-size="14" font-weight="bold" lengthAdjust="spacing" textLength="170" x="533.8594" y="32.9951">The visibility of a toot</text><text fill="#000000" font-family="sans-serif" font-size="11" font-weight="bold" lengthAdjust="spacing" textLength="228" x="504.8594" y="46.5073">In what timeline will a toot appear?</text><text fill="#000000" font-family="sans-serif" font-size="14" font-weight="bold" lengthAdjust="spacing" textLength="5" x="616.3594" y="62.0967"> </text><ellipse cx="335.5" cy="86.3984" fill="#222222" rx="10" ry="10" style="stroke:#222222;stroke-width:1.0;"/><rect fill="#F1F1F1" height="33.9688" rx="12.5" ry="12.5" style="stroke:#181818;stroke-width:0.5;" width="157" x="257" y="116.3984"/><text fill="#000000" font-family="sans-serif" font-size="12" lengthAdjust="spacing" textLength="137" x="267" y="137.5371">Public toot by @name</text><polygon fill="#98FB98" points="260,170.3672,411,170.3672,423,182.3672,411,194.3672,260,194.3672,248,182.3672,260,170.3672" style="stroke:#008000;stroke-width:2.5;"/><text fill="#000000" font-family="sans-serif" font-size="11" lengthAdjust="spacing" textLength="151" x="260" y="186.1753">Are you following @name?</text><text fill="#000000" font-family="sans-serif" font-size="11" font-weight="bold" lengthAdjust="spacing" textLength="24" x="224" y="179.7729">YES</text><text fill="#000000" font-family="sans-serif" font-size="11" font-weight="bold" lengthAdjust="spacing" textLength="19" x="423" y="179.7729">NO</text><rect fill="#ADD8E6" height="33.9688" rx="12.5" ry="12.5" style="stroke:#181818;stroke-width:0.5;" width="203" x="11" y="204.3672"/><text fill="#000000" font-family="sans-serif" font-size="12" lengthAdjust="spacing" textLength="86" x="21" y="225.5059">Toot shows in</text><text fill="#000000" font-family="sans-serif" font-size="12" font-weight="bold" lengthAdjust="spacing" textLength="40" x="111" y="225.5059">Home</text><text fill="#000000" font-family="sans-serif" font-size="12" lengthAdjust="spacing" textLength="49" x="155" y="225.5059">timeline</text><polygon fill="#98FB98" points="481.2813,204.3672,644.2813,204.3672,656.2813,216.3672,644.2813,228.3672,481.2813,228.3672,469.2813,216.3672,481.2813,204.3672" style="stroke:#008000;stroke-width:2.5;"/><text fill="#000000" font-family="sans-serif" font-size="11" lengthAdjust="spacing" textLength="163" x="481.2813" y="220.1753">Is @name on your instance?</text><text fill="#000000" font-family="sans-serif" font-size="11" font-weight="bold" lengthAdjust="spacing" textLength="24" x="445.2813" y="213.7729">YES</text><text fill="#000000" font-family="sans-serif" font-size="11" font-weight="bold" lengthAdjust="spacing" textLength="19" x="656.2813" y="213.7729">NO</text><rect fill="#ADD8E6" height="33.9688" rx="12.5" ry="12.5" style="stroke:#181818;stroke-width:0.5;" width="200" x="239.7188" y="238.3672"/><text fill="#000000" font-family="sans-serif" font-size="12" lengthAdjust="spacing" textLength="86" x="249.7188" y="259.5059">Toot shows in</text><text fill="#000000" font-family="sans-serif" font-size="12" font-weight="bold" lengthAdjust="spacing" textLength="37" x="339.7188" y="259.5059">Local</text><text fill="#000000" font-family="sans-serif" font-size="12" lengthAdjust="spacing" textLength="49" x="380.7188" y="259.5059">timeline</text><polygon fill="#98FB98" points="716.3438,238.3672,855.3438,238.3672,867.3438,251.1719,855.3438,263.9766,716.3438,263.9766,704.3438,251.1719,716.3438,238.3672" style="stroke:#008000;stroke-width:2.5;"/><text fill="#000000" font-family="sans-serif" font-size="11" lengthAdjust="spacing" textLength="133" x="716.3438" y="248.5776">Does someone on your</text><text fill="#000000" font-family="sans-serif" font-size="11" lengthAdjust="spacing" textLength="139" x="716.3438" y="261.3823">instance follow @name?</text><text fill="#000000" font-family="sans-serif" font-size="11" font-weight="bold" lengthAdjust="spacing" textLength="24" x="680.3438" y="248.5776">YES</text><text fill="#000000" font-family="sans-serif" font-size="11" font-weight="bold" lengthAdjust="spacing" textLength="19" x="867.3438" y="248.5776">NO</text><rect fill="#ADD8E6" height="33.9688" rx="12.5" ry="12.5" style="stroke:#181818;stroke-width:0.5;" width="237" x="469.7188" y="273.9766"/><text fill="#000000" font-family="sans-serif" font-size="12" lengthAdjust="spacing" textLength="86" x="479.7188" y="295.1152">Toot shows in</text><text fill="#000000" font-family="sans-serif" font-size="12" font-weight="bold" lengthAdjust="spacing" textLength="74" x="569.7188" y="295.1152">Federated</text><text fill="#000000" font-family="sans-serif" font-size="12" lengthAdjust="spacing" textLength="49" x="647.7188" y="295.1152">timeline</text><polygon fill="#98FB98" points="887.4688,273.9766,1079.4688,273.9766,1091.4688,318.793,1079.4688,363.6094,887.4688,363.6094,875.4688,318.793,887.4688,273.9766" style="stroke:#008000;stroke-width:2.5;"/><text fill="#000000" font-family="sans-serif" font-size="11" lengthAdjust="spacing" textLength="99" x="887.4688" y="284.187">Did your instance</text><text fill="#000000" font-family="sans-serif" font-size="11" lengthAdjust="spacing" textLength="121" x="887.4688" y="296.9917">become aware of the</text><text fill="#000000" font-family="sans-serif" font-size="11" lengthAdjust="spacing" textLength="136" x="887.4688" y="309.7964">toot in some other way,</text><text fill="#000000" font-family="sans-serif" font-size="11" lengthAdjust="spacing" textLength="175" x="887.4688" y="322.6011">e.g. a boost/reply by someone</text><text fill="#000000" font-family="sans-serif" font-size="11" lengthAdjust="spacing" textLength="192" x="887.4688" y="335.4058">you don't follow on your instance,</text><text fill="#000000" font-family="sans-serif" font-size="11" lengthAdjust="spacing" textLength="158" x="887.4688" y="348.2104">or a local search of the URL</text><text fill="#000000" font-family="sans-serif" font-size="11" lengthAdjust="spacing" textLength="175" x="887.4688" y="361.0151">by someone on your instance?</text><text fill="#000000" font-family="sans-serif" font-size="11" font-weight="bold" lengthAdjust="spacing" textLength="24" x="851.4688" y="316.1987">YES</text><text fill="#000000" font-family="sans-serif" font-size="11" font-weight="bold" lengthAdjust="spacing" textLength="19" x="1091.4688" y="316.1987">NO</text><rect fill="#ADD8E6" height="33.9688" rx="12.5" ry="12.5" style="stroke:#181818;stroke-width:0.5;" width="237" x="736.7188" y="373.6094"/><text fill="#000000" font-family="sans-serif" font-size="12" lengthAdjust="spacing" textLength="86" x="746.7188" y="394.748">Toot shows in</text><text fill="#000000" font-family="sans-serif" font-size="12" font-weight="bold" lengthAdjust="spacing" textLength="74" x="836.7188" y="394.748">Federated</text><text fill="#000000" font-family="sans-serif" font-size="12" lengthAdjust="spacing" textLength="49" x="914.7188" y="394.748">timeline</text><rect fill="#FFC0CB" height="33.9688" rx="12.5" ry="12.5" style="stroke:#181818;stroke-width:0.5;" width="236" x="993.7188" y="373.6094"/><text fill="#000000" font-family="sans-serif" font-size="12" lengthAdjust="spacing" textLength="28" x="1003.7188" y="394.748">Toot</text><text fill="#000000" font-family="sans-serif" font-size="12" font-weight="bold" lengthAdjust="spacing" textLength="40" x="1035.7188" y="394.748">never</text><text fill="#000000" font-family="sans-serif" font-size="12" lengthAdjust="spacing" textLength="140" x="1079.7188" y="394.748">reaches your instance</text><polygon fill="#98FB98" points="983.4688,413.5781,995.4688,425.5781,983.4688,437.5781,971.4688,425.5781,983.4688,413.5781" style="stroke:#008000;stroke-width:2.5;"/><polygon fill="#98FB98" points="785.8438,443.5781,797.8438,455.5781,785.8438,467.5781,773.8438,455.5781,785.8438,443.5781" style="stroke:#008000;stroke-width:2.5;"/><polygon fill="#98FB98" points="562.7813,473.5781,574.7813,485.5781,562.7813,497.5781,550.7813,485.5781,562.7813,473.5781" style="stroke:#008000;stroke-width:2.5;"/><polygon fill="#98FB98" points="335.5,503.5781,347.5,515.5781,335.5,527.5781,323.5,515.5781,335.5,503.5781" style="stroke:#008000;stroke-width:2.5;"/><ellipse cx="335.5" cy="558.5781" fill="none" rx="11" ry="11" style="stroke:#222222;stroke-width:1.0;"/><ellipse cx="335.5" cy="558.5781" fill="#222222" rx="6" ry="6" style="stroke:#111111;stroke-width:1.0;"/><line style="stroke:#181818;stroke-width:1.0;" x1="335.5" x2="335.5" y1="96.3984" y2="116.3984"/><polygon fill="#181818" points="331.5,106.3984,335.5,116.3984,339.5,106.3984,335.5,110.3984" style="stroke:#181818;stroke-width:1.0;"/><line style="stroke:#181818;stroke-width:1.0;" x1="875.4688" x2="855.2188" y1="318.793" y2="318.793"/><line style="stroke:#181818;stroke-width:1.0;" x1="855.2188" x2="855.2188" y1="318.793" y2="373.6094"/><polygon fill="#181818" points="851.2188,363.6094,855.2188,373.6094,859.2188,363.6094,855.2188,367.6094" style="stroke:#181818;stroke-width:1.0;"/><line style="stroke:#181818;stroke-width:1.0;" x1="1091.4688" x2="1111.7188" y1="318.793" y2="318.793"/><line style="stroke:#181818;stroke-width:1.0;" x1="1111.7188" x2="1111.7188" y1="318.793" y2="373.6094"/><polygon fill="#181818" points="1107.7188,363.6094,1111.7188,373.6094,1115.7188,363.6094,1111.7188,367.6094" style="stroke:#181818;stroke-width:1.0;"/><line style="stroke:#181818;stroke-width:1.0;" x1="855.2188" x2="855.2188" y1="407.5781" y2="425.5781"/><line style="stroke:#181818;stroke-width:1.0;" x1="855.2188" x2="971.4688" y1="425.5781" y2="425.5781"/><polygon fill="#181818" points="961.4688,421.5781,971.4688,425.5781,961.4688,429.5781,965.4688,425.5781" style="stroke:#181818;stroke-width:1.0;"/><line style="stroke:#181818;stroke-width:1.0;" x1="1111.7188" x2="1111.7188" y1="407.5781" y2="425.5781"/><line style="stroke:#181818;stroke-width:1.0;" x1="1111.7188" x2="995.4688" y1="425.5781" y2="425.5781"/><polygon fill="#181818" points="1005.4688,421.5781,995.4688,425.5781,1005.4688,429.5781,1001.4688,425.5781" style="stroke:#181818;stroke-width:1.0;"/><line style="stroke:#181818;stroke-width:1.0;" x1="704.3438" x2="588.2188" y1="251.1719" y2="251.1719"/><line style="stroke:#181818;stroke-width:1.0;" x1="588.2188" x2="588.2188" y1="251.1719" y2="273.9766"/><polygon fill="#181818" points="584.2188,263.9766,588.2188,273.9766,592.2188,263.9766,588.2188,267.9766" style="stroke:#181818;stroke-width:1.0;"/><line style="stroke:#181818;stroke-width:1.0;" x1="867.3438" x2="983.4688" y1="251.1719" y2="251.1719"/><line style="stroke:#181818;stroke-width:1.0;" x1="983.4688" x2="983.4688" y1="251.1719" y2="273.9766"/><polygon fill="#181818" points="979.4688,263.9766,983.4688,273.9766,987.4688,263.9766,983.4688,267.9766" style="stroke:#181818;stroke-width:1.0;"/><line style="stroke:#181818;stroke-width:1.0;" x1="588.2188" x2="588.2188" y1="307.9453" y2="455.5781"/><line style="stroke:#181818;stroke-width:1.0;" x1="588.2188" x2="773.8438" y1="455.5781" y2="455.5781"/><polygon fill="#181818" points="763.8438,451.5781,773.8438,455.5781,763.8438,459.5781,767.8438,455.5781" style="stroke:#181818;stroke-width:1.0;"/><line style="stroke:#181818;stroke-width:1.0;" x1="983.4688" x2="983.4688" y1="437.5781" y2="455.5781"/><line style="stroke:#181818;stroke-width:1.0;" x1="983.4688" x2="797.8438" y1="455.5781" y2="455.5781"/><polygon fill="#181818" points="807.8438,451.5781,797.8438,455.5781,807.8438,459.5781,803.8438,455.5781" style="stroke:#181818;stroke-width:1.0;"/><line style="stroke:#181818;stroke-width:1.0;" x1="469.2813" x2="339.7188" y1="216.3672" y2="216.3672"/><line style="stroke:#181818;stroke-width:1.0;" x1="339.7188" x2="339.7188" y1="216.3672" y2="238.3672"/><polygon fill="#181818" points="335.7188,228.3672,339.7188,238.3672,343.7188,228.3672,339.7188,232.3672" style="stroke:#181818;stroke-width:1.0;"/><line style="stroke:#181818;stroke-width:1.0;" x1="656.2813" x2="785.8438" y1="216.3672" y2="216.3672"/><line style="stroke:#181818;stroke-width:1.0;" x1="785.8438" x2="785.8438" y1="216.3672" y2="238.3672"/><polygon fill="#181818" points="781.8438,228.3672,785.8438,238.3672,789.8438,228.3672,785.8438,232.3672" style="stroke:#181818;stroke-width:1.0;"/><line style="stroke:#181818;stroke-width:1.0;" x1="339.7188" x2="339.7188" y1="272.3359" y2="485.5781"/><line style="stroke:#181818;stroke-width:1.0;" x1="339.7188" x2="550.7813" y1="485.5781" y2="485.5781"/><polygon fill="#181818" points="540.7813,481.5781,550.7813,485.5781,540.7813,489.5781,544.7813,485.5781" style="stroke:#181818;stroke-width:1.0;"/><line style="stroke:#181818;stroke-width:1.0;" x1="785.8438" x2="785.8438" y1="467.5781" y2="485.5781"/><line style="stroke:#181818;stroke-width:1.0;" x1="785.8438" x2="574.7813" y1="485.5781" y2="485.5781"/><polygon fill="#181818" points="584.7813,481.5781,574.7813,485.5781,584.7813,489.5781,580.7813,485.5781" style="stroke:#181818;stroke-width:1.0;"/><line style="stroke:#181818;stroke-width:1.0;" x1="248" x2="112.5" y1="182.3672" y2="182.3672"/><line style="stroke:#181818;stroke-width:1.0;" x1="112.5" x2="112.5" y1="182.3672" y2="204.3672"/><polygon fill="#181818" points="108.5,194.3672,112.5,204.3672,116.5,194.3672,112.5,198.3672" style="stroke:#181818;stroke-width:1.0;"/><line style="stroke:#181818;stroke-width:1.0;" x1="423" x2="562.7813" y1="182.3672" y2="182.3672"/><line style="stroke:#181818;stroke-width:1.0;" x1="562.7813" x2="562.7813" y1="182.3672" y2="204.3672"/><polygon fill="#181818" points="558.7813,194.3672,562.7813,204.3672,566.7813,194.3672,562.7813,198.3672" style="stroke:#181818;stroke-width:1.0;"/><line style="stroke:#181818;stroke-width:1.0;" x1="112.5" x2="112.5" y1="238.3359" y2="515.5781"/><line style="stroke:#181818;stroke-width:1.0;" x1="112.5" x2="323.5" y1="515.5781" y2="515.5781"/><polygon fill="#181818" points="313.5,511.5781,323.5,515.5781,313.5,519.5781,317.5,515.5781" style="stroke:#181818;stroke-width:1.0;"/><line style="stroke:#181818;stroke-width:1.0;" x1="562.7813" x2="562.7813" y1="497.5781" y2="515.5781"/><line style="stroke:#181818;stroke-width:1.0;" x1="562.7813" x2="347.5" y1="515.5781" y2="515.5781"/><polygon fill="#181818" points="357.5,511.5781,347.5,515.5781,357.5,519.5781,353.5,515.5781" style="stroke:#181818;stroke-width:1.0;"/><line style="stroke:#181818;stroke-width:1.0;" x1="335.5" x2="335.5" y1="150.3672" y2="170.3672"/><polygon fill="#181818" points="331.5,160.3672,335.5,170.3672,339.5,160.3672,335.5,164.3672" style="stroke:#181818;stroke-width:1.0;"/><line style="stroke:#181818;stroke-width:1.0;" x1="335.5" x2="335.5" y1="527.5781" y2="547.5781"/><polygon fill="#181818" points="331.5,537.5781,335.5,547.5781,339.5,537.5781,335.5,541.5781" style="stroke:#181818;stroke-width:1.0;"/><text fill="#888888" font-family="sans-serif" font-size="10" lengthAdjust="spacing" textLength="207" x="875.7188" y="577.8604">Created with PlantUML by Thomas Weitzel</text><text fill="#888888" font-family="sans-serif" font-size="10" lengthAdjust="spacing" textLength="45" x="805.7188" y="589.501">Based on</text><text fill="#888888" font-family="sans-serif" font-size="10" font-weight="bold" lengthAdjust="spacing" textLength="299" x="853.7188" y="589.501">https://github.com/mastodon/mastodon/issues/6812</text><text fill="#888888" font-family="sans-serif" font-size="10" lengthAdjust="spacing" textLength="18" x="871.2188" y="601.1416">and</text><text fill="#888888" font-family="sans-serif" font-size="10" font-weight="bold" lengthAdjust="spacing" textLength="195" x="892.2188" y="601.1416">https://axbom.com/mastodon-tips</text><text fill="#888888" font-family="sans-serif" font-size="10" lengthAdjust="spacing" textLength="62" x="730.7188" y="612.7822">Source here:</text><text fill="#888888" font-family="sans-serif" font-size="10" font-weight="bold" lengthAdjust="spacing" textLength="432" x="795.7188" y="612.7822">https://gist.github.com/thomasweitzel/4e6f3e7f95f858c5260c5326c68be58c</text></g></svg>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment