-
-
Notifications
You must be signed in to change notification settings - Fork 31
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* bump version * add ws and bug fix for conversations * fix so autocomplete works with new version of tview * fix poll and url length
- Loading branch information
1 parent
a765172
commit a730588
Showing
24 changed files
with
222 additions
and
81 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
package api | ||
|
||
func (ac *AccountClient) GetCharLimit() int { | ||
if ac.Instance != nil { | ||
return ac.Instance.Configuration.Statuses.MaxCharacters | ||
} | ||
if ac.InstanceOld == nil || ac.InstanceOld.Configuration == nil || ac.InstanceOld.Configuration.Statuses == nil { | ||
return 500 | ||
} | ||
s := ac.InstanceOld.Configuration.Statuses | ||
if val, ok := (*s)["max_characters"]; ok { | ||
return val | ||
} | ||
return 500 | ||
} | ||
|
||
func (ac *AccountClient) GetLengthURL() int { | ||
if ac.Instance != nil { | ||
return ac.Instance.Configuration.Statuses.CharactersReservedPerURL | ||
} | ||
if ac.InstanceOld == nil || ac.InstanceOld.Configuration == nil || ac.InstanceOld.Configuration.Statuses == nil { | ||
return 23 | ||
} | ||
s := ac.InstanceOld.Configuration.Statuses | ||
if val, ok := (*s)["characters_reserved_per_url"]; ok { | ||
return val | ||
} | ||
return 23 | ||
} | ||
|
||
func (ac *AccountClient) GetPollOptions() (options, chars int) { | ||
if ac.Instance != nil { | ||
return ac.Instance.Configuration.Polls.MaxOptions, ac.Instance.Configuration.Polls.MaxCharactersPerOption | ||
} | ||
if ac.InstanceOld == nil || ac.InstanceOld.Configuration == nil || ac.InstanceOld.Configuration.Polls == nil { | ||
return 4, 50 | ||
} | ||
s := ac.InstanceOld.Configuration.Polls | ||
opts, okOne := (*s)["max_options"] | ||
c, okTwo := (*s)["max_characters_per_option"] | ||
if okOne && okTwo { | ||
return opts, c | ||
} | ||
return 4, 50 | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
% tut(1) tut 1.0.31 | ||
% tut(1) tut 1.0.32 | ||
% Rasmus Lindroth | ||
% 2022-12-29 | ||
% 2022-12-31 | ||
|
||
# NAME | ||
tut - a Mastodon TUI | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.