Bluesky's API returns a letter ID for each user, While twitter uses a numeric ID, meaning we need to convert between the two
(letterID string)
| 558 | // need to convert between the two |
| 559 | |
| 560 | func BlueSkyToTwitterID(letterID string) *int64 { |
| 561 | if letterID == "" { |
| 562 | return nil |
| 563 | } |
| 564 | twitterId := encodeToUint63(letterID) |
| 565 | if err := db_controller.StoreTwitterIdInDatabase(twitterId, letterID, nil, nil); err != nil { |
| 566 | fmt.Println("Error storing Twitter ID in database:", err) |
| 567 | panic(err) |
| 568 | } |
| 569 | return twitterId |
| 570 | } |
| 571 | |
| 572 | // TwitterIDToBlueSky converts a numeric ID to a letter ID |
| 573 | func TwitterIDToBlueSky(numericID *int64) (*string, error) { |
no test coverage detected