Fix direct messages

This commit is contained in:
bleakgrey 2019-03-17 23:54:52 +03:00
parent 58730814dc
commit 6123f2a1b1
1 changed files with 2 additions and 0 deletions

View File

@ -48,6 +48,7 @@ public class Tootle.Views.ExpandedStatus : Views.Abstract {
public Soup.Message request (){
var url = "%s/api/v1/statuses/%lld/context".printf (accounts.formal.instance, root_status.id);
var msg = new Soup.Message ("GET", url);
network.inject (msg, Network.INJECT_TOKEN);
network.queue (msg, (sess, mess) => {
var root = network.parse (mess);
var ancestors = root.get_array_member ("ancestors");
@ -77,6 +78,7 @@ public class Tootle.Views.ExpandedStatus : Views.Abstract {
var url = "%s/api/v1/search?q=%s&resolve=true".printf (accounts.formal.instance, q);
var msg = new Soup.Message ("GET", url);
msg.priority = Soup.MessagePriority.HIGH;
network.inject (msg, Network.INJECT_TOKEN);
network.queue (msg, (sess, mess) => {
var root = network.parse (mess);
var statuses = root.get_array_member ("statuses");