|  | #155 | 但需要重新设计下有多人发帖时的空间。那么的维基主要的话题阅读模式不改变。 | 
|  | #235 | 那么怎么做这么个呢
 对于我的用途实现个这个好像也没必要,把这个小网站做好看更重要…… | 
|  | #955 | 最近了解到的: 使用indieweb系列工具可以做一个低科技社交互联,比如:利用h-entry↗AndWeb Mention↗。 使用Self Auth↗可以自行验证密码而无需借助第三方帐号来反向链接,这个代码不大,可以修改修改整合到laMDWiki中去。 | 
|  | #1114 | 还挺好用的 从那么的维基发帖到长毛象! Send posts from laMDWiki to Mastodon! | 
|  | #1116 | Posting menu looks like this... also with replying. | 
|  | #1176 | 目前的Webfinger和(对外只读的)Outbox实现: function APubEnsureWebfinger($name, $host){
        if(!is_dir('.well-known')) mkdir('.well-known');
        if(!is_dir('.well-known/webfinger')) mkdir('.well-known/webfinger');
        $f = fopen('.well-known/webfinger/index.php',"w");
        $without_protocol = parse_url($host, PHP_URL_HOST);
        $finger = ["subject"=>"acct:".$name.'@'.$without_protocol,
                   "links"=>[["rel"=>"self", "type"=>"application/activity+json", "href"=>$host."?apub_actor=1"]]];
        fwrite($f, "<?php header('Content-Type: application/json'); echo '".json_encode($finger, JSON_UNESCAPED_SLASHES)."'; ?>"); fclose($f);
        if(!file_exists('.well-known/apub_public_key.pem') || !file_exists('.well-known/apub_private_key.php')){
            $res = openssl_pkey_new();
            $this->APubPublicKey = openssl_pkey_get_details($res)['key'];
            openssl_pkey_export($res, $this->APubPrivateKey);
            $f = fopen('.well-known/apub_public_key.pem',"w");
            fwrite($f, $this->APubPublicKey); fclose($f);
            $f = fopen('.well-known/apub_private_key.php',"w");
            fwrite($f, "<?php exit; ?>".PHP_EOL.PHP_EOL.$this->APubPrivateKey); fclose($f);
        }
    }
    function APubEnsureInfo(){
        if(!isset($this->APubID) || !isset($this->HostURL)) return;
        if(!file_exists('.well-known/apub_public_key.pem')){$this->APubEnsureWebfinger($this->APubID, $this->HostURL);}
        $pk = file_get_contents('.well-known/apub_public_key.pem'); //$pk = preg_replace('/\n/u','\\n',$pk);
        $actor = ["@context"=>["https://www.w3.org/ns/activitystreams","https://w3id.org/security/v1"],
                  "id"=> $this->HostURL."?apub_actor=1",
                  "type"=> "Person",
                  "name"=> $this->DisplayName,
                  "url"=> $this->HostURL,
                  "summary"=> "Lazy... No summary",
                  "preferredUsername"=> $this->APubID,
                  "inbox"=> $this->HostURL."?apub_inbox=1",
                  "outbox"=> $this->HostURL."?apub_outbox=1",
                  "publicKey"=> ["id"=> $this->HostURL."?apub_actor=1#main-key",
                                 "owner"=> $this->HostURL."?apub_actor=1",
                                 "publicKeyPem"=>$pk]];
        $this->APubActor = json_encode($actor, JSON_UNESCAPED_SLASHES);
    }
    function APubMakeOutbox(){
        $this->ReadPosts();$this->ReadImages();
        $obj = ["@context"=>"https://www.w3.org/ns/activitystreams",
                "id"=>$this->HostURL."?apub_outbox=1",
                "type"=>"OrderedCollection"];
        $items=[]; $i=0;
        foreach(array_reverse($this->Posts) as &$p){
            $this->ConvertPost($p);
            $text = strip_tags(preg_replace('/<\/(p|blockquote|h[0-9])>/u',"\n\n",$p['html']));
            $time = DateTime::createFromFormat('YmdHis', $p['id'], new DateTimeZone('+0800'));
            $ob = ["@context"=>"https://www.w3.org/ns/activitystreams",
                   "type"=> "Create",
                   "id"=> $this->HostURL."?post=".$p['id']."?apub_object=1",
                   "published"=> $time->format('Y-m-d\TH:i:s\Z'),
                   //"to"=> ["https://chatty.example/ben/"],
                   "actor"=> $this->HostURL."?apub_actor=1",
                   "to"=> ["https://www.w3.org/ns/activitystreams#Public"],
                   "object"=> ["type"=> "Note",
                               "id"=> $this->HostURL."?post=".$p['id'],
                               "published"=> $time->format('Y-m-d\TH:i:s\Z'),
                               "attributedTo"=> $this->HostURL."?apub_actor=1",
                               "to"=> ["https://www.w3.org/ns/activitystreams#Public"],
                               "content"=> $text]];
            $items[] = $ob;
            $i++; if($i>20) break;
        }
        $obj['orderedItems'] = $items; $obj["totalItems"] = sizeof($items);
        return json_encode($obj, JSON_UNESCAPED_SLASHES);
    }
 | 
|  | #1177 | 这个设计很奇怪。Mastodon上如果没有向对方实例上的人发送“我发了这个消息”消息,那么那条消息就不会记录在Mastodon的数据库里,即使通过跨实例搜索用户可以显示出用户以及已发送消息数量。用户的Outbox是可以随时阅读的,请求对应的outbox.json就可以,因此不清楚为什么要这么设计。 我如果只是想看别人的消息,只通过一个简单的程序抓取Outbox即可,而这和直接去阅读一堆RSS有什么区别? 所有对其他用户的交互,例如评论和点赞都需要我向它们的Inbox发送通知,它们才能看间,因为至少Mastodon不主动抓取别人家的Outbox来了解行为。ActivityPub标准里面说明了Outbox可访问并查询到至少该用户发送的所有公开帖子,那么为什么Mastodon不这样实现? | 
|  | #1178 | ActivityPub的优点是它“可能”能减少访问负荷,并且相比起订阅RSS,你可以收到来自未订阅者的消息。但是它的实现就其标准而言极不可靠:“出现网络错误时‘应该’↗重试”。这就远不如直接使用电子邮件了。 | 
|  | #1566 | 上述特征也可以被认为有利,它兼容一种若即若离的非常连通网络社区,对传统社交空间和精力造成更小的影响并且推崇它们。 |