Skip to content

Commit

Permalink
login, roadmap: cleanup/linting
Browse files Browse the repository at this point in the history
  • Loading branch information
purpshell committed Oct 17, 2024
1 parent 41ed6de commit 71734ba
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 65 deletions.
8 changes: 4 additions & 4 deletions ROADMAP.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@
* [x] Videos
* [x] Gifs
* [x] Message reactions
* [ ] Typing notifications
* [ ] Read receipts
* [x] Typing notifications
* [x] Read receipts
* Twitter → Matrix
* [x] Message content
* [x] Text
Expand All @@ -23,7 +23,7 @@
* [ ] Message history
* [ ] When creating portal
* [ ] Missed messages
* [] Avatars
* [x] Avatars
* [ ] † Typing notifications
* [ ] † Read receipts
* Misc
Expand All @@ -34,4 +34,4 @@
* [ ] Option to use own Matrix account for messages sent from other Twitter clients
* [ ] E2EE in Matrix rooms

Information not automatically sent from source, i.e. implementation may not be possible
Implementation is impossible / really difficult at the current state of the mautrix-go framework
59 changes: 0 additions & 59 deletions pkg/connector/login.go
Original file line number Diff line number Diff line change
Expand Up @@ -75,65 +75,6 @@ func (t *TwitterLogin) Start(_ context.Context) (*bridgev2.LoginStep, error) {
{Type: bridgev2.LoginCookieTypeCookie, Name: "auth_token"},
},
},
/*
{
ID: "guest_id",
Required: false,
Sources: []bridgev2.LoginCookieFieldSource{
{ Type: bridgev2.LoginCookieTypeCookie, Name: "guest_id" },
},
},
{
ID: "twid",
Required: false,
Sources: []bridgev2.LoginCookieFieldSource{
{ Type: bridgev2.LoginCookieTypeCookie, Name: "twid" },
},
},
{
ID: "kdt",
Required: false,
Sources: []bridgev2.LoginCookieFieldSource{
{ Type: bridgev2.LoginCookieTypeCookie, Name: "kdt" },
},
},
{
ID: "night_mode",
Required: false,
Sources: []bridgev2.LoginCookieFieldSource{
{ Type: bridgev2.LoginCookieTypeCookie, Name: "night_mode" },
},
},
{
ID: "personalization_id",
Required: false,
Sources: []bridgev2.LoginCookieFieldSource{
{ Type: bridgev2.LoginCookieTypeCookie, Name: "personalization_id" },
},
},
{
ID: "guest_id_marketing",
Required: false,
Sources: []bridgev2.LoginCookieFieldSource{
{ Type: bridgev2.LoginCookieTypeCookie, Name: "guest_id_marketing" },
},
},
{
ID: "guest_id_ads",
Required: false,
Sources: []bridgev2.LoginCookieFieldSource{
{ Type: bridgev2.LoginCookieTypeCookie, Name: "guest_id_ads" },
},
},
{
ID: "d_prefs",
Required: false,
Sources: []bridgev2.LoginCookieFieldSource{
{ Type: bridgev2.LoginCookieTypeCookie, Name: "d_prefs" },
},
},
},
*/
},
},
}, nil
Expand Down
2 changes: 1 addition & 1 deletion pkg/twittermeow/data/payload/json.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ func (p *GraphQLPayload) Encode() ([]byte, error) {
}

type SendTypingNotificationVariables struct {
ConversationID string `json:"conversationId, omitempty"`
ConversationID string `json:"conversationId,omitempty"`
}

type DMMessageDeleteMutationVariables struct {
Expand Down
2 changes: 1 addition & 1 deletion pkg/twittermeow/session_loader.go
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ func (s *SessionLoader) LoadPage(url string) error {

func (s *SessionLoader) doCookiesMetaDataLoad() error {
logData := []interface{}{
&payload.JotLogPayload{Description: "rweb:cookiesMetadata:load", Product: "rweb", EventValue: time.UnixMilli(fetchedTime).Sub(time.Now()).Milliseconds()},
&payload.JotLogPayload{Description: "rweb:cookiesMetadata:load", Product: "rweb", EventValue: time.Until(time.UnixMilli(fetchedTime)).Milliseconds()},
}
return s.client.performJotClientEvent(payload.JotLoggingCategoryPerftown, false, logData)
}
Expand Down

0 comments on commit 71734ba

Please sign in to comment.