#Smithereen source code is now finally available!
This profile might be incomplete.
Open on mastodon.social Gregory
Wall 490 posts
Gregory
#Smithereen source code is now finally available!
Gregory
#Smithereen update: reposts! These are a bit half-assed tbh because I keep them in the feed table so they don't show up in the profile, and there's also no reply thread loaded for them (yet) if there isn't one available already. But at least they are no longer ignored altogether.
Gregory
Fixed some more edge cases with post formats — namely, it turns out some Pleroma posts lack "url" and "published" properties. NullPointerExceptions are no more but I can still use some more stringent validation here. Also the amount of non-public posts I receive (and reject) is surprising. I also made a favicon and a new, more proportional logo.
Gregory
#Smithereen update: the news feed now uses a separate helper/lookup table in the database. This enables a feed that not only contains posts but other things like photos, photo tags and "X added Y as a friend". I'll also probably use this to implement "boosts" which are effectively not posts themselves but acts of sharing someone else's posts. Side note: my own reposts won't be like that, IMO it's better when each repost has its own comment thread.
Gregory
Interestingly, Mastodon boosts (or are those retoots after all?) do have unique IDs as if they are posts of their own, but if you try dereferencing that, you'll get redirected to the boosted toot to whatever instance that is on:
Gregory
It's been 4 days so far but it still creeps me out that the year no longer has the form of 201x.
Gregory
#Smithereen is now able to fully federate with itself. You can now send friend requests to people on other servers and make posts on the walls of users on other servers. That is, as soon as there are other servers. Currently there's only one, lol. Also addressing (to/cc) is now validated more strictly for incoming posts.
Gregory
Here are the details of how I'm going to be representing friends and friend requests in #Smithereen. Comments are welcome. https://socialhub.activitypub.rocks/t/representing-things-in-a-vkontakte-facebook-style-social-network/243/18
Gregory
Boring #Smithereen update: I changed the user and post URIs. User URIs now have the form of /users/123 with my internal database IDs, these are only visible through #ActivityPub. Post URIs no longer have username part in them because that was redundant anyway — this ain't a highload system, I'm not doing load balancing based on "owner ID". Next step: making sure this thing is able to federate with itself, + implementation of my specific features in ActivityPub.
Gregory
Would something bad happen if I change the ID URIs for things on my friends.grishka.me #Smithereen instance? I don't like identifying users by username only. Numeric IDs would be better in the long run and would allow for changeable usernames. Humans won't see them anyway unless they're very curious. Anyway, is there a way to tell those three Mastodon instances to change the IDs of my users? How much will break if I just change the URIs?
Dr. Quadragon ❌
@grishka Don't do it.
Gregory
Недавно обратил внимание, появилась новая бизнес-модель у софта: код открыт, но за готовые бинарники и/или за техподдержку надо платить. То есть, такой своеобразный налог на неумение собирать самостоятельно. Что думаете о таком? За этим будущее?
Show previous comments
[DATA EXPUNGED]
Gregory
Since this instance seems to be dedicated to cat pictures, here's one of a friend's cat I took this summer.
Gregory
Написал тут хорошему знакомому пост про ActivityPub в контексте серии постов про интернет без корпораций: https://marinintim.com/2019/indieweb/16/
Gregory
Another #Smithereen update. Two things: - I now actually store and respect the accepted status of a follow relationship. This is needed for compatibility with those accounts that manually approve followers.
Gregory
Am I understanding it right that if an account manually approves followers and accepts me as a follower by sending me an Accept{Follow}, there is no way for them to reverse that decision? There surely can't be Undo{Accept{Follow}}, right? At least I don't see a button to do that in Mastodon UI.
Show previous comments
ma1uta
@grishka you can use https://www.w3.org/TR/activitypub/#undo-activity-outbox but Mastodon doesn't have it, yes. Mastodon implements only subset of the ActivityPub S2S API.
Gregory
I should probably buy some of these. https://www.teepublic.com/en-au/sticker/5009874-smithereen-black-mirror-smithereens
Gregory
#Smithereen update: the media cache now works for photos inside posts too. And, most important part of it, it now also deletes old files when the configured cache size is exceeded. Unlike some other implementations that store terabytes of cat pictures indefinitely 😏
Gregory
Images are only downloaded when they're first accessed and there's a cache miss. This works through a special endpoint I have that downloads the original image, generates a bunch of sizes and then redirects to the appropriate one. Any following page loads have direct links to local copies instead of that endpoint.
Gregory
Is it mandatory in 2019 for every website with articles ever to have a newsletter?
Gregory
#Smithereen update. I've completely rewritten the way user avatars are stored, both remote and local. I now cache the ones for remote users, and store them in 4 sizes and in jpeg and webp. This was a lot of work, and I now need to do the same for post photos. As an added benefit, "icon" in AP is no longer an array – some software didn't like that. As I found out yesterday, I've also forgotten that I need to send Delete activities when deleting posts. Now I do send them.
Gregory
And also, what kind of activity am I supposed to look for to know when someone's avatar was updated? |
@grishka good! And a few remaks ;)
- SimpleDateFormat is not thread-safe, you can use ThreadLocal<DateFormat>
- to parse ISO8601 you can use the java.time.OffsetDateTime class
- you use threads, but if an exception will be thrown you never notice about it. You can catch the exception like this ```public void run { try { ... } catch(Exception e) {...}}```
- don't ignore the exception, you can log the exception
- don't use the printStacktrace method, you can use the logger (i. e. slf4j).
вроде проект на java но там php файлы. и зачем jni?
@grishka 👍