parent
081974da1e
commit
4143de3816
|
@ -26,6 +26,7 @@
|
|||
// 1655456688_add_deleted_at_field_to_bookmarks_table.up.sql (69B)
|
||||
// 1655462032_create_bookmarks_deleted_at_index.up.sql (81B)
|
||||
// 1657617291_add_multi_transactions_table.up.sql (412B)
|
||||
// 1660134042_add_social_links_settings_table.up.sql (334B)
|
||||
// doc.go (74B)
|
||||
|
||||
package migrations
|
||||
|
@ -110,7 +111,7 @@ func _1640111208_dummyUpSql() (*asset, error) {
|
|||
return nil, err
|
||||
}
|
||||
|
||||
info := bindataFileInfo{name: "1640111208_dummy.up.sql", size: 258, mode: os.FileMode(0664), modTime: time.Unix(1659614623, 0)}
|
||||
info := bindataFileInfo{name: "1640111208_dummy.up.sql", size: 258, mode: os.FileMode(0664), modTime: time.Unix(1659102109, 0)}
|
||||
a := &asset{bytes: bytes, info: info, digest: [32]uint8{0x3e, 0xf0, 0xae, 0x20, 0x6e, 0x75, 0xd1, 0x36, 0x14, 0xf2, 0x40, 0xe5, 0xd6, 0x7a, 0xc4, 0xa5, 0x72, 0xaa, 0xb5, 0x4d, 0x71, 0x97, 0xb8, 0xe8, 0x95, 0x22, 0x95, 0xa2, 0xac, 0xaf, 0x48, 0x58}}
|
||||
return a, nil
|
||||
}
|
||||
|
@ -130,7 +131,7 @@ func _1642666031_add_removed_clock_to_bookmarksUpSql() (*asset, error) {
|
|||
return nil, err
|
||||
}
|
||||
|
||||
info := bindataFileInfo{name: "1642666031_add_removed_clock_to_bookmarks.up.sql", size: 117, mode: os.FileMode(0664), modTime: time.Unix(1659614623, 0)}
|
||||
info := bindataFileInfo{name: "1642666031_add_removed_clock_to_bookmarks.up.sql", size: 117, mode: os.FileMode(0664), modTime: time.Unix(1659102109, 0)}
|
||||
a := &asset{bytes: bytes, info: info, digest: [32]uint8{0x84, 0x4e, 0x38, 0x99, 0x7a, 0xc, 0x90, 0x13, 0xec, 0xfe, 0x2f, 0x55, 0xff, 0xb7, 0xb6, 0xaa, 0x96, 0xc6, 0x92, 0x79, 0xcc, 0xee, 0x4e, 0x99, 0x53, 0xfe, 0x1c, 0xbb, 0x32, 0x2, 0xa4, 0x27}}
|
||||
return a, nil
|
||||
}
|
||||
|
@ -150,7 +151,7 @@ func _1643644541_gif_api_key_settingUpSql() (*asset, error) {
|
|||
return nil, err
|
||||
}
|
||||
|
||||
info := bindataFileInfo{name: "1643644541_gif_api_key_setting.up.sql", size: 108, mode: os.FileMode(0664), modTime: time.Unix(1659614623, 0)}
|
||||
info := bindataFileInfo{name: "1643644541_gif_api_key_setting.up.sql", size: 108, mode: os.FileMode(0664), modTime: time.Unix(1659102109, 0)}
|
||||
a := &asset{bytes: bytes, info: info, digest: [32]uint8{0x1b, 0x94, 0x28, 0xfb, 0x66, 0xd1, 0x7c, 0xb8, 0x89, 0xe2, 0xb4, 0x71, 0x65, 0x24, 0x57, 0x22, 0x95, 0x38, 0x97, 0x3, 0x9b, 0xc6, 0xa4, 0x41, 0x7b, 0xba, 0xf7, 0xdb, 0x70, 0xf7, 0x20, 0x3a}}
|
||||
return a, nil
|
||||
}
|
||||
|
@ -170,7 +171,7 @@ func _1644188994_recent_stickersUpSql() (*asset, error) {
|
|||
return nil, err
|
||||
}
|
||||
|
||||
info := bindataFileInfo{name: "1644188994_recent_stickers.up.sql", size: 79, mode: os.FileMode(0664), modTime: time.Unix(1659614623, 0)}
|
||||
info := bindataFileInfo{name: "1644188994_recent_stickers.up.sql", size: 79, mode: os.FileMode(0664), modTime: time.Unix(1659102109, 0)}
|
||||
a := &asset{bytes: bytes, info: info, digest: [32]uint8{0x1e, 0xad, 0xaa, 0x30, 0xbf, 0x4, 0x7, 0xf8, 0xc3, 0x3, 0xb8, 0x97, 0x23, 0x2b, 0xbd, 0x1c, 0x60, 0x69, 0xb0, 0x42, 0x5e, 0x6b, 0xd, 0xa7, 0xa3, 0x6b, 0x2e, 0xdc, 0x70, 0x13, 0x72, 0x7}}
|
||||
return a, nil
|
||||
}
|
||||
|
@ -190,7 +191,7 @@ func _1646659233_add_address_to_dapp_permisssionUpSql() (*asset, error) {
|
|||
return nil, err
|
||||
}
|
||||
|
||||
info := bindataFileInfo{name: "1646659233_add_address_to_dapp_permisssion.up.sql", size: 700, mode: os.FileMode(0664), modTime: time.Unix(1659614623, 0)}
|
||||
info := bindataFileInfo{name: "1646659233_add_address_to_dapp_permisssion.up.sql", size: 700, mode: os.FileMode(0664), modTime: time.Unix(1659102109, 0)}
|
||||
a := &asset{bytes: bytes, info: info, digest: [32]uint8{0xed, 0xb0, 0x35, 0xcc, 0x2e, 0x16, 0xe6, 0x15, 0x86, 0x2c, 0x37, 0x80, 0xae, 0xa3, 0xc5, 0x31, 0x78, 0x5, 0x9d, 0xcd, 0x7b, 0xeb, 0x5f, 0xf2, 0xb3, 0x74, 0x72, 0xdf, 0xcf, 0x88, 0xb, 0x40}}
|
||||
return a, nil
|
||||
}
|
||||
|
@ -210,7 +211,7 @@ func _1646841105_add_emoji_accountUpSql() (*asset, error) {
|
|||
return nil, err
|
||||
}
|
||||
|
||||
info := bindataFileInfo{name: "1646841105_add_emoji_account.up.sql", size: 96, mode: os.FileMode(0664), modTime: time.Unix(1659614623, 0)}
|
||||
info := bindataFileInfo{name: "1646841105_add_emoji_account.up.sql", size: 96, mode: os.FileMode(0664), modTime: time.Unix(1659102109, 0)}
|
||||
a := &asset{bytes: bytes, info: info, digest: [32]uint8{0xe6, 0x77, 0x29, 0x95, 0x18, 0x64, 0x82, 0x63, 0xe7, 0xaf, 0x6c, 0xa9, 0x15, 0x7d, 0x46, 0xa6, 0xbc, 0xdf, 0xa7, 0xd, 0x2b, 0xd2, 0x2d, 0x97, 0x4d, 0xa, 0x6b, 0xd, 0x6e, 0x90, 0x42, 0x5c}}
|
||||
return a, nil
|
||||
}
|
||||
|
@ -230,7 +231,7 @@ func _1647278782_display_nameUpSql() (*asset, error) {
|
|||
return nil, err
|
||||
}
|
||||
|
||||
info := bindataFileInfo{name: "1647278782_display_name.up.sql", size: 110, mode: os.FileMode(0664), modTime: time.Unix(1659614623, 0)}
|
||||
info := bindataFileInfo{name: "1647278782_display_name.up.sql", size: 110, mode: os.FileMode(0664), modTime: time.Unix(1659102109, 0)}
|
||||
a := &asset{bytes: bytes, info: info, digest: [32]uint8{0xf4, 0xa1, 0x1f, 0x3e, 0x61, 0x65, 0x8d, 0xff, 0xee, 0xde, 0xc5, 0x91, 0xd9, 0x5c, 0xb5, 0xe2, 0xf0, 0xb7, 0xe7, 0x5c, 0x5c, 0x16, 0x25, 0x89, 0xee, 0x78, 0x12, 0xea, 0x3e, 0x48, 0x41, 0xa6}}
|
||||
return a, nil
|
||||
}
|
||||
|
@ -250,7 +251,7 @@ func _1647862838_reset_last_backupUpSql() (*asset, error) {
|
|||
return nil, err
|
||||
}
|
||||
|
||||
info := bindataFileInfo{name: "1647862838_reset_last_backup.up.sql", size: 37, mode: os.FileMode(0664), modTime: time.Unix(1659614623, 0)}
|
||||
info := bindataFileInfo{name: "1647862838_reset_last_backup.up.sql", size: 37, mode: os.FileMode(0664), modTime: time.Unix(1659102109, 0)}
|
||||
a := &asset{bytes: bytes, info: info, digest: [32]uint8{0x21, 0xe3, 0xd5, 0xf6, 0x5f, 0xfe, 0x65, 0xfa, 0x1d, 0x88, 0xf8, 0x5f, 0x24, 0x71, 0x34, 0x68, 0x96, 0x2a, 0x60, 0x87, 0x15, 0x82, 0x4d, 0x8a, 0x59, 0x3d, 0x1f, 0xd8, 0x56, 0xd4, 0xfb, 0xda}}
|
||||
return a, nil
|
||||
}
|
||||
|
@ -270,7 +271,7 @@ func _1647871652_add_settings_sync_clock_tableUpSql() (*asset, error) {
|
|||
return nil, err
|
||||
}
|
||||
|
||||
info := bindataFileInfo{name: "1647871652_add_settings_sync_clock_table.up.sql", size: 1044, mode: os.FileMode(0664), modTime: time.Unix(1659614623, 0)}
|
||||
info := bindataFileInfo{name: "1647871652_add_settings_sync_clock_table.up.sql", size: 1044, mode: os.FileMode(0664), modTime: time.Unix(1659102109, 0)}
|
||||
a := &asset{bytes: bytes, info: info, digest: [32]uint8{0xd8, 0x58, 0xec, 0x85, 0x90, 0xfa, 0x30, 0x98, 0x98, 0x9a, 0xa6, 0xa8, 0x96, 0x2b, 0x38, 0x93, 0xf3, 0xae, 0x46, 0x74, 0xa4, 0x41, 0x62, 0x9b, 0x2, 0x86, 0xbf, 0xe5, 0x2a, 0xce, 0xe2, 0xc0}}
|
||||
return a, nil
|
||||
}
|
||||
|
@ -290,7 +291,7 @@ func _1647880168_add_torrent_configUpSql() (*asset, error) {
|
|||
return nil, err
|
||||
}
|
||||
|
||||
info := bindataFileInfo{name: "1647880168_add_torrent_config.up.sql", size: 211, mode: os.FileMode(0664), modTime: time.Unix(1659614623, 0)}
|
||||
info := bindataFileInfo{name: "1647880168_add_torrent_config.up.sql", size: 211, mode: os.FileMode(0664), modTime: time.Unix(1659102109, 0)}
|
||||
a := &asset{bytes: bytes, info: info, digest: [32]uint8{0x1, 0x92, 0x22, 0x37, 0x96, 0xf3, 0xb5, 0x5b, 0x27, 0xd0, 0x7d, 0x43, 0x5, 0x4e, 0x9d, 0xe2, 0x49, 0xbe, 0x86, 0x31, 0xa1, 0x89, 0xff, 0xd6, 0x51, 0xe0, 0x9c, 0xb, 0xda, 0xfc, 0xf2, 0x93}}
|
||||
return a, nil
|
||||
}
|
||||
|
@ -310,7 +311,7 @@ func _1647882837_add_communities_settings_tableUpSql() (*asset, error) {
|
|||
return nil, err
|
||||
}
|
||||
|
||||
info := bindataFileInfo{name: "1647882837_add_communities_settings_table.up.sql", size: 206, mode: os.FileMode(0664), modTime: time.Unix(1659614623, 0)}
|
||||
info := bindataFileInfo{name: "1647882837_add_communities_settings_table.up.sql", size: 206, mode: os.FileMode(0664), modTime: time.Unix(1659102109, 0)}
|
||||
a := &asset{bytes: bytes, info: info, digest: [32]uint8{0xbd, 0x87, 0x78, 0x99, 0xd9, 0x5d, 0xbd, 0xf7, 0x57, 0x9c, 0xca, 0x97, 0xbd, 0xb3, 0xe9, 0xb5, 0x89, 0x31, 0x3f, 0xf6, 0x5c, 0x13, 0xb, 0xc3, 0x54, 0x93, 0x18, 0x40, 0x7, 0x82, 0xfe, 0x7e}}
|
||||
return a, nil
|
||||
}
|
||||
|
@ -330,7 +331,7 @@ func _1647956635_add_waku_messages_tableUpSql() (*asset, error) {
|
|||
return nil, err
|
||||
}
|
||||
|
||||
info := bindataFileInfo{name: "1647956635_add_waku_messages_table.up.sql", size: 266, mode: os.FileMode(0664), modTime: time.Unix(1659614623, 0)}
|
||||
info := bindataFileInfo{name: "1647956635_add_waku_messages_table.up.sql", size: 266, mode: os.FileMode(0664), modTime: time.Unix(1659102109, 0)}
|
||||
a := &asset{bytes: bytes, info: info, digest: [32]uint8{0xd1, 0xe, 0xe1, 0xdc, 0xda, 0x2e, 0x89, 0x8d, 0xdc, 0x2a, 0x1c, 0x13, 0xa1, 0xfc, 0xfe, 0xf, 0xb2, 0xb9, 0x85, 0xc8, 0x45, 0xd6, 0xd1, 0x7, 0x5c, 0xa3, 0x8, 0x47, 0x44, 0x6d, 0x96, 0xe0}}
|
||||
return a, nil
|
||||
}
|
||||
|
@ -350,7 +351,7 @@ func _1648554928_network_testUpSql() (*asset, error) {
|
|||
return nil, err
|
||||
}
|
||||
|
||||
info := bindataFileInfo{name: "1648554928_network_test.up.sql", size: 132, mode: os.FileMode(0664), modTime: time.Unix(1659614623, 0)}
|
||||
info := bindataFileInfo{name: "1648554928_network_test.up.sql", size: 132, mode: os.FileMode(0664), modTime: time.Unix(1659102109, 0)}
|
||||
a := &asset{bytes: bytes, info: info, digest: [32]uint8{0x9a, 0xc5, 0x7f, 0x87, 0xf3, 0x2c, 0xf7, 0xbb, 0xd3, 0x3a, 0x4e, 0x76, 0x88, 0xca, 0xaf, 0x73, 0xce, 0x8f, 0xa1, 0xf6, 0x3d, 0x4d, 0xed, 0x6f, 0x49, 0xf2, 0xfe, 0x56, 0x2a, 0x60, 0x68, 0xca}}
|
||||
return a, nil
|
||||
}
|
||||
|
@ -370,7 +371,7 @@ func _1649174829_add_visitble_tokenUpSql() (*asset, error) {
|
|||
return nil, err
|
||||
}
|
||||
|
||||
info := bindataFileInfo{name: "1649174829_add_visitble_token.up.sql", size: 84, mode: os.FileMode(0664), modTime: time.Unix(1659614623, 0)}
|
||||
info := bindataFileInfo{name: "1649174829_add_visitble_token.up.sql", size: 84, mode: os.FileMode(0664), modTime: time.Unix(1659102109, 0)}
|
||||
a := &asset{bytes: bytes, info: info, digest: [32]uint8{0xa3, 0x22, 0xc0, 0x2b, 0x3f, 0x4f, 0x3d, 0x5e, 0x4c, 0x68, 0x7c, 0xd0, 0x15, 0x36, 0x9f, 0xec, 0xa1, 0x2a, 0x7b, 0xb4, 0xe3, 0xc6, 0xc9, 0xb4, 0x81, 0x50, 0x4a, 0x11, 0x3b, 0x35, 0x7, 0xcf}}
|
||||
return a, nil
|
||||
}
|
||||
|
@ -390,7 +391,7 @@ func _1649882262_add_derived_from_accountsUpSql() (*asset, error) {
|
|||
return nil, err
|
||||
}
|
||||
|
||||
info := bindataFileInfo{name: "1649882262_add_derived_from_accounts.up.sql", size: 110, mode: os.FileMode(0664), modTime: time.Unix(1659614623, 0)}
|
||||
info := bindataFileInfo{name: "1649882262_add_derived_from_accounts.up.sql", size: 110, mode: os.FileMode(0664), modTime: time.Unix(1659102109, 0)}
|
||||
a := &asset{bytes: bytes, info: info, digest: [32]uint8{0x11, 0xb9, 0x44, 0x4d, 0x85, 0x8d, 0x7f, 0xb4, 0xae, 0x4f, 0x5c, 0x66, 0x64, 0xb6, 0xe2, 0xe, 0x3d, 0xad, 0x9d, 0x8, 0x4f, 0xab, 0x6e, 0xa8, 0x7d, 0x76, 0x3, 0xad, 0x96, 0x1, 0xee, 0x5c}}
|
||||
return a, nil
|
||||
}
|
||||
|
@ -410,7 +411,7 @@ func _1650612625_add_community_message_archive_hashes_tableUpSql() (*asset, erro
|
|||
return nil, err
|
||||
}
|
||||
|
||||
info := bindataFileInfo{name: "1650612625_add_community_message_archive_hashes_table.up.sql", size: 130, mode: os.FileMode(0664), modTime: time.Unix(1659614623, 0)}
|
||||
info := bindataFileInfo{name: "1650612625_add_community_message_archive_hashes_table.up.sql", size: 130, mode: os.FileMode(0664), modTime: time.Unix(1659102109, 0)}
|
||||
a := &asset{bytes: bytes, info: info, digest: [32]uint8{0x48, 0x31, 0xb3, 0x75, 0x23, 0xe2, 0x45, 0xe, 0x47, 0x1b, 0x35, 0xa5, 0x6e, 0x83, 0x4e, 0x64, 0x7d, 0xd7, 0xa2, 0xda, 0xe9, 0x53, 0xf1, 0x16, 0x86, 0x2c, 0x57, 0xad, 0xfa, 0xca, 0x39, 0xde}}
|
||||
return a, nil
|
||||
}
|
||||
|
@ -430,7 +431,7 @@ func _1650616788_add_communities_archives_info_tableUpSql() (*asset, error) {
|
|||
return nil, err
|
||||
}
|
||||
|
||||
info := bindataFileInfo{name: "1650616788_add_communities_archives_info_table.up.sql", size: 208, mode: os.FileMode(0664), modTime: time.Unix(1659614623, 0)}
|
||||
info := bindataFileInfo{name: "1650616788_add_communities_archives_info_table.up.sql", size: 208, mode: os.FileMode(0664), modTime: time.Unix(1659102109, 0)}
|
||||
a := &asset{bytes: bytes, info: info, digest: [32]uint8{0xd1, 0x4f, 0x80, 0x45, 0xb9, 0xd9, 0x15, 0xe2, 0x78, 0xd0, 0xcb, 0x71, 0xc1, 0x1b, 0xb7, 0x1b, 0x1b, 0x97, 0xfe, 0x47, 0x53, 0x3c, 0x62, 0xbc, 0xdd, 0x3a, 0x94, 0x1a, 0xc, 0x48, 0x76, 0xe}}
|
||||
return a, nil
|
||||
}
|
||||
|
@ -450,7 +451,7 @@ func _1652715604_add_clock_accountsUpSql() (*asset, error) {
|
|||
return nil, err
|
||||
}
|
||||
|
||||
info := bindataFileInfo{name: "1652715604_add_clock_accounts.up.sql", size: 62, mode: os.FileMode(0664), modTime: time.Unix(1659614623, 0)}
|
||||
info := bindataFileInfo{name: "1652715604_add_clock_accounts.up.sql", size: 62, mode: os.FileMode(0664), modTime: time.Unix(1659102109, 0)}
|
||||
a := &asset{bytes: bytes, info: info, digest: [32]uint8{0xb6, 0xd9, 0x8d, 0x73, 0xc9, 0xef, 0xfa, 0xb1, 0x4b, 0xa5, 0xf3, 0x5, 0x19, 0x26, 0x46, 0xf8, 0x47, 0x93, 0xdb, 0xac, 0x2, 0xef, 0xf9, 0x71, 0x56, 0x83, 0xe6, 0x2d, 0xb0, 0xd7, 0x83, 0x5c}}
|
||||
return a, nil
|
||||
}
|
||||
|
@ -470,7 +471,7 @@ func _1653037334_add_notifications_settings_tableUpSql() (*asset, error) {
|
|||
return nil, err
|
||||
}
|
||||
|
||||
info := bindataFileInfo{name: "1653037334_add_notifications_settings_table.up.sql", size: 1276, mode: os.FileMode(0664), modTime: time.Unix(1659614623, 0)}
|
||||
info := bindataFileInfo{name: "1653037334_add_notifications_settings_table.up.sql", size: 1276, mode: os.FileMode(0664), modTime: time.Unix(1659102109, 0)}
|
||||
a := &asset{bytes: bytes, info: info, digest: [32]uint8{0x4b, 0xc4, 0x65, 0xac, 0xa, 0xf2, 0xef, 0xb6, 0x39, 0x3c, 0xc5, 0xb1, 0xb2, 0x9c, 0x86, 0x58, 0xe0, 0x38, 0xcb, 0x57, 0x3c, 0x76, 0x73, 0x87, 0x79, 0x4e, 0xf6, 0xed, 0xb0, 0x8e, 0x9e, 0xa}}
|
||||
return a, nil
|
||||
}
|
||||
|
@ -490,7 +491,7 @@ func _1654702119_add_mutual_contact_settingsUpSql() (*asset, error) {
|
|||
return nil, err
|
||||
}
|
||||
|
||||
info := bindataFileInfo{name: "1654702119_add_mutual_contact_settings.up.sql", size: 78, mode: os.FileMode(0664), modTime: time.Unix(1659614623, 0)}
|
||||
info := bindataFileInfo{name: "1654702119_add_mutual_contact_settings.up.sql", size: 78, mode: os.FileMode(0664), modTime: time.Unix(1659102109, 0)}
|
||||
a := &asset{bytes: bytes, info: info, digest: [32]uint8{0x26, 0x66, 0x67, 0x50, 0xfe, 0xd7, 0xe3, 0x29, 0x8b, 0xff, 0x9d, 0x5a, 0x87, 0xa7, 0x99, 0x6e, 0xd6, 0xcd, 0x2e, 0xbb, 0x17, 0xdf, 0x7f, 0xf7, 0xa3, 0xfa, 0x32, 0x7c, 0x2d, 0x92, 0xc8, 0x74}}
|
||||
return a, nil
|
||||
}
|
||||
|
@ -510,7 +511,7 @@ func _1655375270_add_clock_field_to_communities_settings_tableUpSql() (*asset, e
|
|||
return nil, err
|
||||
}
|
||||
|
||||
info := bindataFileInfo{name: "1655375270_add_clock_field_to_communities_settings_table.up.sql", size: 74, mode: os.FileMode(0664), modTime: time.Unix(1659614623, 0)}
|
||||
info := bindataFileInfo{name: "1655375270_add_clock_field_to_communities_settings_table.up.sql", size: 74, mode: os.FileMode(0664), modTime: time.Unix(1659102109, 0)}
|
||||
a := &asset{bytes: bytes, info: info, digest: [32]uint8{0x19, 0xc5, 0xc0, 0xf9, 0x84, 0x53, 0xdf, 0x83, 0xcf, 0xb6, 0x40, 0x6d, 0xf5, 0xdc, 0x77, 0x37, 0xb7, 0xe3, 0xa, 0x75, 0xe7, 0x6, 0x11, 0xca, 0x2b, 0x51, 0x92, 0xdd, 0x7d, 0xdb, 0xc3, 0xf5}}
|
||||
return a, nil
|
||||
}
|
||||
|
@ -530,7 +531,7 @@ func _1655385721_drop_networks_configUpSql() (*asset, error) {
|
|||
return nil, err
|
||||
}
|
||||
|
||||
info := bindataFileInfo{name: "1655385721_drop_networks_config.up.sql", size: 27, mode: os.FileMode(0664), modTime: time.Unix(1659614623, 0)}
|
||||
info := bindataFileInfo{name: "1655385721_drop_networks_config.up.sql", size: 27, mode: os.FileMode(0664), modTime: time.Unix(1659102109, 0)}
|
||||
a := &asset{bytes: bytes, info: info, digest: [32]uint8{0xfc, 0xa7, 0x20, 0xbb, 0x67, 0x21, 0xe, 0xc6, 0xc8, 0x21, 0x74, 0xe0, 0xce, 0xc8, 0xe2, 0x2, 0xb4, 0xea, 0xf0, 0xe5, 0xc4, 0x4d, 0xdd, 0xd4, 0x52, 0x31, 0xa9, 0x3d, 0xcd, 0xd8, 0x9b, 0xab}}
|
||||
return a, nil
|
||||
}
|
||||
|
@ -550,7 +551,7 @@ func _1655385724_networks_chaincolor_shortnameUpSql() (*asset, error) {
|
|||
return nil, err
|
||||
}
|
||||
|
||||
info := bindataFileInfo{name: "1655385724_networks_chainColor_shortName.up.sql", size: 220, mode: os.FileMode(0664), modTime: time.Unix(1659614623, 0)}
|
||||
info := bindataFileInfo{name: "1655385724_networks_chainColor_shortName.up.sql", size: 220, mode: os.FileMode(0664), modTime: time.Unix(1659102109, 0)}
|
||||
a := &asset{bytes: bytes, info: info, digest: [32]uint8{0xd9, 0xe7, 0x84, 0xbb, 0x5f, 0xd2, 0x2c, 0x42, 0x88, 0x62, 0x52, 0xb6, 0x58, 0x31, 0xac, 0xc, 0x96, 0x2b, 0x1b, 0xe5, 0x4e, 0x9a, 0x3a, 0xf6, 0xf6, 0xfc, 0xa9, 0x1a, 0x35, 0x62, 0x28, 0x88}}
|
||||
return a, nil
|
||||
}
|
||||
|
@ -570,7 +571,7 @@ func _1655456688_add_deleted_at_field_to_bookmarks_tableUpSql() (*asset, error)
|
|||
return nil, err
|
||||
}
|
||||
|
||||
info := bindataFileInfo{name: "1655456688_add_deleted_at_field_to_bookmarks_table.up.sql", size: 69, mode: os.FileMode(0664), modTime: time.Unix(1659614623, 0)}
|
||||
info := bindataFileInfo{name: "1655456688_add_deleted_at_field_to_bookmarks_table.up.sql", size: 69, mode: os.FileMode(0664), modTime: time.Unix(1659102109, 0)}
|
||||
a := &asset{bytes: bytes, info: info, digest: [32]uint8{0xe7, 0x9a, 0xbd, 0x9a, 0xc9, 0xf, 0xdf, 0x90, 0x0, 0x5d, 0xea, 0x6e, 0x7d, 0x51, 0x95, 0xcd, 0x90, 0xd3, 0x1a, 0x36, 0x6c, 0xf4, 0xbd, 0xa7, 0x6b, 0xbf, 0xe5, 0xdb, 0xa3, 0x88, 0xe3, 0x50}}
|
||||
return a, nil
|
||||
}
|
||||
|
@ -590,7 +591,7 @@ func _1655462032_create_bookmarks_deleted_at_indexUpSql() (*asset, error) {
|
|||
return nil, err
|
||||
}
|
||||
|
||||
info := bindataFileInfo{name: "1655462032_create_bookmarks_deleted_at_index.up.sql", size: 81, mode: os.FileMode(0664), modTime: time.Unix(1659614623, 0)}
|
||||
info := bindataFileInfo{name: "1655462032_create_bookmarks_deleted_at_index.up.sql", size: 81, mode: os.FileMode(0664), modTime: time.Unix(1659102109, 0)}
|
||||
a := &asset{bytes: bytes, info: info, digest: [32]uint8{0xf, 0x8e, 0x20, 0x6b, 0x14, 0x9e, 0xcd, 0x97, 0xd3, 0xfe, 0x62, 0x3, 0x26, 0x59, 0x1, 0x6c, 0x99, 0xef, 0x6d, 0x21, 0xd4, 0xb5, 0xa3, 0xf4, 0x39, 0x40, 0x54, 0x6, 0xd, 0x60, 0x13, 0x38}}
|
||||
return a, nil
|
||||
}
|
||||
|
@ -610,11 +611,31 @@ func _1657617291_add_multi_transactions_tableUpSql() (*asset, error) {
|
|||
return nil, err
|
||||
}
|
||||
|
||||
info := bindataFileInfo{name: "1657617291_add_multi_transactions_table.up.sql", size: 412, mode: os.FileMode(0664), modTime: time.Unix(1659614623, 0)}
|
||||
info := bindataFileInfo{name: "1657617291_add_multi_transactions_table.up.sql", size: 412, mode: os.FileMode(0664), modTime: time.Unix(1659102109, 0)}
|
||||
a := &asset{bytes: bytes, info: info, digest: [32]uint8{0x86, 0xb0, 0x4e, 0x8c, 0x4, 0x82, 0xb4, 0x43, 0xaa, 0xd0, 0x16, 0xdd, 0xcb, 0x88, 0x81, 0xac, 0x4, 0x34, 0x1a, 0x8f, 0x2e, 0xc5, 0x69, 0xb, 0xf0, 0x17, 0xf7, 0xe3, 0x9, 0xe, 0x54, 0xe0}}
|
||||
return a, nil
|
||||
}
|
||||
|
||||
var __1660134042_add_social_links_settings_tableUpSql = []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\x8c\xcd\xc1\x4a\xc4\x30\x10\xc6\xf1\x7b\x9e\xe2\x63\x4f\x5b\xe8\x1b\xec\x29\x96\x59\x08\xc6\x74\x49\xb3\xb2\x7b\x0a\xdd\xdd\x50\x83\xb1\x95\x64\x8a\xfa\xf6\xa2\x58\x90\x7a\xf1\xfa\x9b\xf9\xcf\x34\x96\xa4\x23\x38\x79\xa7\x09\x6a\x0f\xd3\x3a\xd0\x49\x75\xae\x43\x99\xae\xb1\x4f\x3e\xc5\xf1\xb9\xf8\x12\x98\xe3\x38\x14\x6c\x05\xf0\x45\x9e\xc3\x3b\xc3\xd1\xc9\xe1\x60\xd5\x83\xb4\x67\xdc\xd3\x19\xad\x41\xd3\x9a\xbd\x56\x8d\x83\xa5\x83\x96\x0d\xd5\x4b\x31\xe7\xf4\x1d\x88\x6a\x27\x84\x32\x1d\x59\x07\x65\x5c\xfb\x9f\x4f\xbf\x8f\x88\x4a\x3c\x4a\x7d\xa4\x4e\x00\xdb\x8d\xf7\xfc\x16\x99\x43\xde\xd4\x30\x47\xad\xab\xfa\x87\x5f\x43\x2e\xd3\xd8\x27\x5f\x22\x87\xf5\x70\x88\xfc\x34\x5f\xd6\xfa\x31\xcd\x3c\x5f\xfe\x2c\xdf\x62\xb9\x4e\xf9\xb6\x66\x0e\x29\x0c\xb9\x7f\x59\x7c\x27\x3e\x03\x00\x00\xff\xff\x49\x31\x89\xf6\x4e\x01\x00\x00")
|
||||
|
||||
func _1660134042_add_social_links_settings_tableUpSqlBytes() ([]byte, error) {
|
||||
return bindataRead(
|
||||
__1660134042_add_social_links_settings_tableUpSql,
|
||||
"1660134042_add_social_links_settings_table.up.sql",
|
||||
)
|
||||
}
|
||||
|
||||
func _1660134042_add_social_links_settings_tableUpSql() (*asset, error) {
|
||||
bytes, err := _1660134042_add_social_links_settings_tableUpSqlBytes()
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
info := bindataFileInfo{name: "1660134042_add_social_links_settings_table.up.sql", size: 334, mode: os.FileMode(0664), modTime: time.Unix(1660134162, 0)}
|
||||
a := &asset{bytes: bytes, info: info, digest: [32]uint8{0x84, 0x73, 0xb6, 0xe7, 0x3f, 0xaa, 0x39, 0x9a, 0x56, 0x56, 0x31, 0xf1, 0x8e, 0x26, 0x23, 0x1, 0xe4, 0xfa, 0x98, 0xfe, 0x78, 0x87, 0x20, 0xcb, 0x52, 0xf4, 0x38, 0x7f, 0xc4, 0x1c, 0x4, 0x22}}
|
||||
return a, nil
|
||||
}
|
||||
|
||||
var _docGo = []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\x2c\xc9\xb1\x0d\xc4\x20\x0c\x05\xd0\x9e\x29\xfe\x02\xd8\xfd\x6d\xe3\x4b\xac\x2f\x44\x82\x09\x78\x7f\xa5\x49\xfd\xa6\x1d\xdd\xe8\xd8\xcf\x55\x8a\x2a\xe3\x47\x1f\xbe\x2c\x1d\x8c\xfa\x6f\xe3\xb4\x34\xd4\xd9\x89\xbb\x71\x59\xb6\x18\x1b\x35\x20\xa2\x9f\x0a\x03\xa2\xe5\x0d\x00\x00\xff\xff\x60\xcd\x06\xbe\x4a\x00\x00\x00")
|
||||
|
||||
func docGoBytes() ([]byte, error) {
|
||||
|
@ -630,7 +651,7 @@ func docGo() (*asset, error) {
|
|||
return nil, err
|
||||
}
|
||||
|
||||
info := bindataFileInfo{name: "doc.go", size: 74, mode: os.FileMode(0664), modTime: time.Unix(1659614623, 0)}
|
||||
info := bindataFileInfo{name: "doc.go", size: 74, mode: os.FileMode(0664), modTime: time.Unix(1659102109, 0)}
|
||||
a := &asset{bytes: bytes, info: info, digest: [32]uint8{0xde, 0x7c, 0x28, 0xcd, 0x47, 0xf2, 0xfa, 0x7c, 0x51, 0x2d, 0xd8, 0x38, 0xb, 0xb0, 0x34, 0x9d, 0x4c, 0x62, 0xa, 0x9e, 0x28, 0xc3, 0x31, 0x23, 0xd9, 0xbb, 0x89, 0x9f, 0xa0, 0x89, 0x1f, 0xe8}}
|
||||
return a, nil
|
||||
}
|
||||
|
@ -778,6 +799,8 @@ var _bindata = map[string]func() (*asset, error){
|
|||
|
||||
"1657617291_add_multi_transactions_table.up.sql": _1657617291_add_multi_transactions_tableUpSql,
|
||||
|
||||
"1660134042_add_social_links_settings_table.up.sql": _1660134042_add_social_links_settings_tableUpSql,
|
||||
|
||||
"doc.go": docGo,
|
||||
}
|
||||
|
||||
|
@ -848,6 +871,7 @@ var _bintree = &bintree{nil, map[string]*bintree{
|
|||
"1655456688_add_deleted_at_field_to_bookmarks_table.up.sql": &bintree{_1655456688_add_deleted_at_field_to_bookmarks_tableUpSql, map[string]*bintree{}},
|
||||
"1655462032_create_bookmarks_deleted_at_index.up.sql": &bintree{_1655462032_create_bookmarks_deleted_at_indexUpSql, map[string]*bintree{}},
|
||||
"1657617291_add_multi_transactions_table.up.sql": &bintree{_1657617291_add_multi_transactions_tableUpSql, map[string]*bintree{}},
|
||||
"1660134042_add_social_links_settings_table.up.sql": &bintree{_1660134042_add_social_links_settings_tableUpSql, map[string]*bintree{}},
|
||||
"doc.go": &bintree{docGo, map[string]*bintree{}},
|
||||
}}
|
||||
|
||||
|
|
|
@ -0,0 +1,16 @@
|
|||
CREATE TABLE IF NOT EXISTS social_links_settings (
|
||||
link_text TEXT PRIMARY KEY ON CONFLICT REPLACE,
|
||||
link_url TEXT
|
||||
);
|
||||
|
||||
INSERT INTO social_links_settings (
|
||||
link_text,
|
||||
link_url
|
||||
)
|
||||
VALUES
|
||||
("__twitter", NULL),
|
||||
("__personal_site", NULL),
|
||||
("__github", NULL),
|
||||
("__youtube", NULL),
|
||||
("__discord", NULL),
|
||||
("__telegram", NULL);
|
|
@ -8,6 +8,7 @@ import (
|
|||
"github.com/status-im/status-go/multiaccounts/errors"
|
||||
"github.com/status-im/status-go/multiaccounts/settings"
|
||||
notificationssettings "github.com/status-im/status-go/multiaccounts/settings_notifications"
|
||||
sociallinkssettings "github.com/status-im/status-go/multiaccounts/settings_social_links"
|
||||
"github.com/status-im/status-go/nodecfg"
|
||||
"github.com/status-im/status-go/params"
|
||||
)
|
||||
|
@ -90,6 +91,7 @@ func (a *Account) MarshalJSON() ([]byte, error) {
|
|||
type Database struct {
|
||||
*settings.Database
|
||||
*notificationssettings.NotificationsSettings
|
||||
*sociallinkssettings.SocialLinksSettings
|
||||
db *sql.DB
|
||||
}
|
||||
|
||||
|
@ -100,8 +102,9 @@ func NewDB(db *sql.DB) (*Database, error) {
|
|||
return nil, err
|
||||
}
|
||||
sn := notificationssettings.NewNotificationsSettings(db)
|
||||
ssl := sociallinkssettings.NewSocialLinksSettings(db)
|
||||
|
||||
return &Database{sDB, sn, db}, nil
|
||||
return &Database{sDB, sn, ssl, db}, nil
|
||||
}
|
||||
|
||||
// DB Gets db sql.DB
|
||||
|
|
|
@ -0,0 +1,90 @@
|
|||
package sociallinkssettings
|
||||
|
||||
import (
|
||||
"context"
|
||||
"database/sql"
|
||||
"errors"
|
||||
|
||||
"github.com/status-im/status-go/protocol/identity"
|
||||
)
|
||||
|
||||
type SocialLinksSettings struct {
|
||||
db *sql.DB
|
||||
}
|
||||
|
||||
func NewSocialLinksSettings(db *sql.DB) *SocialLinksSettings {
|
||||
return &SocialLinksSettings{
|
||||
db: db,
|
||||
}
|
||||
}
|
||||
|
||||
func (s *SocialLinksSettings) GetSocialLinks() (identity.SocialLinks, error) {
|
||||
rows, err := s.db.Query(`SELECT link_text, link_url FROM social_links_settings`)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
defer rows.Close()
|
||||
|
||||
links := identity.SocialLinks{}
|
||||
|
||||
for rows.Next() {
|
||||
link := identity.SocialLink{}
|
||||
var url sql.NullString
|
||||
|
||||
err := rows.Scan(
|
||||
&link.Text, &url,
|
||||
)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
if url.Valid {
|
||||
link.URL = url.String
|
||||
}
|
||||
links = append(links, link)
|
||||
}
|
||||
|
||||
return links, nil
|
||||
}
|
||||
|
||||
// Be careful, it removes every row except static links (__twitter, etc.) before insertion
|
||||
func (s *SocialLinksSettings) SetSocialLinks(links *identity.SocialLinks) (err error) {
|
||||
if links == nil {
|
||||
return errors.New("can't set social links, nil object provided")
|
||||
}
|
||||
|
||||
tx, err := s.db.BeginTx(context.Background(), &sql.TxOptions{})
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
defer func() {
|
||||
if err == nil {
|
||||
err = tx.Commit()
|
||||
return
|
||||
}
|
||||
// don't shadow original error
|
||||
_ = tx.Rollback()
|
||||
}()
|
||||
|
||||
// remove everything except static links
|
||||
_, err = tx.Exec(`DELETE from social_links_settings WHERE link_text != ? AND link_text != ? AND link_text != ? AND link_text != ? AND link_text != ? AND link_text != ?`,
|
||||
identity.TwitterID, identity.PersonalSiteID, identity.GithubID, identity.YoutubeID, identity.DiscordID, identity.TelegramID)
|
||||
|
||||
stmt, err := tx.Prepare("INSERT INTO social_links_settings (link_text, link_url) VALUES (?, ?)")
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
defer stmt.Close()
|
||||
|
||||
for _, link := range *links {
|
||||
_, err = stmt.Exec(
|
||||
link.Text,
|
||||
link.URL,
|
||||
)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
|
@ -0,0 +1,108 @@
|
|||
package sociallinkssettings
|
||||
|
||||
import (
|
||||
"testing"
|
||||
|
||||
"github.com/stretchr/testify/require"
|
||||
|
||||
"github.com/status-im/status-go/appdatabase"
|
||||
"github.com/status-im/status-go/protocol/identity"
|
||||
)
|
||||
|
||||
func openTestDB(t *testing.T) (*SocialLinksSettings, func()) {
|
||||
db, stop, err := appdatabase.SetupTestSQLDB("settings-social-links-tests-")
|
||||
if err != nil {
|
||||
require.NoError(t, stop())
|
||||
}
|
||||
require.NoError(t, err)
|
||||
|
||||
socialLinkSettings := NewSocialLinksSettings(db)
|
||||
if err != nil {
|
||||
require.NoError(t, stop())
|
||||
}
|
||||
require.NoError(t, err)
|
||||
|
||||
return socialLinkSettings, func() {
|
||||
require.NoError(t, stop())
|
||||
}
|
||||
}
|
||||
|
||||
func socialLinksWithDefaults(twitter, personalSite, github, youtube, discord, telegram string) identity.SocialLinks {
|
||||
return identity.SocialLinks{
|
||||
{
|
||||
Text: identity.TwitterID,
|
||||
URL: twitter,
|
||||
},
|
||||
{
|
||||
Text: identity.PersonalSiteID,
|
||||
URL: personalSite,
|
||||
},
|
||||
{
|
||||
Text: identity.GithubID,
|
||||
URL: github,
|
||||
},
|
||||
{
|
||||
Text: identity.YoutubeID,
|
||||
URL: youtube,
|
||||
},
|
||||
{
|
||||
Text: identity.DiscordID,
|
||||
URL: discord,
|
||||
},
|
||||
{
|
||||
Text: identity.TelegramID,
|
||||
URL: telegram,
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
func TestDatabase(t *testing.T) {
|
||||
socialLinkSettings, stop := openTestDB(t)
|
||||
defer stop()
|
||||
|
||||
// fresh database should have default rows
|
||||
links, err := socialLinkSettings.GetSocialLinks()
|
||||
require.NoError(t, err)
|
||||
require.True(t, links.Equals(socialLinksWithDefaults("", "", "", "", "", "")))
|
||||
|
||||
// cleaning db should not remove default rows
|
||||
links = identity.SocialLinks{}
|
||||
err = socialLinkSettings.SetSocialLinks(&links)
|
||||
require.NoError(t, err)
|
||||
links, err = socialLinkSettings.GetSocialLinks()
|
||||
require.NoError(t, err)
|
||||
require.True(t, links.Equals(socialLinksWithDefaults("", "", "", "", "", "")))
|
||||
|
||||
// custom links
|
||||
links = identity.SocialLinks{
|
||||
{
|
||||
Text: identity.TwitterID,
|
||||
URL: "Status_ico",
|
||||
},
|
||||
{
|
||||
Text: "customLink",
|
||||
URL: "customLink.com",
|
||||
},
|
||||
{
|
||||
Text: identity.TelegramID,
|
||||
URL: "dummy.telegram",
|
||||
},
|
||||
}
|
||||
err = socialLinkSettings.SetSocialLinks(&links)
|
||||
require.NoError(t, err)
|
||||
|
||||
expected := socialLinksWithDefaults("Status_ico", "", "", "", "", "dummy.telegram")
|
||||
expected = append(expected, identity.SocialLink{Text: "customLink", URL: "customLink.com"})
|
||||
|
||||
links, err = socialLinkSettings.GetSocialLinks()
|
||||
require.NoError(t, err)
|
||||
require.True(t, links.Equals(expected))
|
||||
|
||||
// cleaning database with defaults should remove custom links
|
||||
links = socialLinksWithDefaults("", "", "", "", "", "")
|
||||
err = socialLinkSettings.SetSocialLinks(&links)
|
||||
require.NoError(t, err)
|
||||
links, err = socialLinkSettings.GetSocialLinks()
|
||||
require.NoError(t, err)
|
||||
require.True(t, links.Equals(socialLinksWithDefaults("", "", "", "", "", "")))
|
||||
}
|
|
@ -8,6 +8,7 @@ import (
|
|||
"github.com/status-im/status-go/images"
|
||||
"github.com/status-im/status-go/multiaccounts/settings"
|
||||
"github.com/status-im/status-go/protocol/common"
|
||||
"github.com/status-im/status-go/protocol/identity"
|
||||
"github.com/status-im/status-go/protocol/identity/alias"
|
||||
"github.com/status-im/status-go/protocol/identity/identicon"
|
||||
"github.com/status-im/status-go/protocol/verification"
|
||||
|
@ -101,6 +102,8 @@ type Contact struct {
|
|||
// Display name of the contact
|
||||
DisplayName string `json:"displayName"`
|
||||
|
||||
SocialLinks identity.SocialLinks `json:"socialLinks"`
|
||||
|
||||
Images map[string]images.IdentityImage `json:"images"`
|
||||
|
||||
Added bool `json:"added"`
|
||||
|
|
|
@ -0,0 +1,75 @@
|
|||
package identity
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
"sort"
|
||||
|
||||
"github.com/status-im/status-go/protocol/protobuf"
|
||||
)
|
||||
|
||||
// static links which need to be decorated by the UI clients
|
||||
const (
|
||||
TwitterID = "__twitter"
|
||||
PersonalSiteID = "__personal_site"
|
||||
GithubID = "__github"
|
||||
YoutubeID = "__youtube"
|
||||
DiscordID = "__discord"
|
||||
TelegramID = "__telegram"
|
||||
)
|
||||
|
||||
type SocialLink struct {
|
||||
Text string `json:"text"`
|
||||
URL string `json:"url"`
|
||||
}
|
||||
|
||||
type SocialLinks []SocialLink
|
||||
|
||||
func NewSocialLinks(links []*protobuf.SocialLink) *SocialLinks {
|
||||
res := SocialLinks{}
|
||||
for _, link := range links {
|
||||
res = append(res, SocialLink{Text: link.Text, URL: link.Url})
|
||||
}
|
||||
return &res
|
||||
}
|
||||
|
||||
func (s *SocialLinks) TransformToProtobuf() []*protobuf.SocialLink {
|
||||
res := []*protobuf.SocialLink{}
|
||||
for _, link := range *s {
|
||||
res = append(res, &protobuf.SocialLink{Text: link.Text, Url: link.URL})
|
||||
}
|
||||
return res
|
||||
}
|
||||
|
||||
func (s SocialLinks) Equals(rhs SocialLinks) bool {
|
||||
if len(s) != len(rhs) {
|
||||
return false
|
||||
}
|
||||
sort.Slice(s, func(i, j int) bool { return s[i].Text < s[j].Text })
|
||||
sort.Slice(rhs, func(i, j int) bool { return rhs[i].Text < rhs[j].Text })
|
||||
for i := range s {
|
||||
if s[i] != rhs[i] {
|
||||
return false
|
||||
}
|
||||
}
|
||||
|
||||
return true
|
||||
}
|
||||
|
||||
func (s SocialLinks) EqualsProtobuf(rhs []*protobuf.SocialLink) bool {
|
||||
if len(s) != len(rhs) {
|
||||
return false
|
||||
}
|
||||
sort.Slice(s, func(i, j int) bool { return s[i].Text < s[j].Text })
|
||||
sort.Slice(rhs, func(i, j int) bool { return rhs[i].Text < rhs[j].Text })
|
||||
for i := range s {
|
||||
if s[i].Text != rhs[i].Text || s[i].URL != rhs[i].Url {
|
||||
return false
|
||||
}
|
||||
}
|
||||
|
||||
return true
|
||||
}
|
||||
|
||||
func (s *SocialLinks) Serialize() ([]byte, error) {
|
||||
return json.Marshal(s)
|
||||
}
|
|
@ -0,0 +1,35 @@
|
|||
package identity
|
||||
|
||||
import (
|
||||
"testing"
|
||||
|
||||
"github.com/stretchr/testify/require"
|
||||
|
||||
"github.com/status-im/status-go/protocol/protobuf"
|
||||
)
|
||||
|
||||
func TestEquals(t *testing.T) {
|
||||
socialLinks := SocialLinks{
|
||||
{
|
||||
Text: "A",
|
||||
URL: "B",
|
||||
},
|
||||
{
|
||||
Text: "X",
|
||||
URL: "Y",
|
||||
},
|
||||
}
|
||||
|
||||
other := []*protobuf.SocialLink{}
|
||||
require.False(t, socialLinks.EqualsProtobuf(other))
|
||||
|
||||
other = append(other, &protobuf.SocialLink{Text: "A", Url: "B"})
|
||||
other = append(other, &protobuf.SocialLink{Text: "X", Url: "Y"})
|
||||
require.True(t, socialLinks.EqualsProtobuf(other))
|
||||
|
||||
// order does not matter
|
||||
other = []*protobuf.SocialLink{}
|
||||
other = append(other, &protobuf.SocialLink{Text: "X", Url: "Y"})
|
||||
other = append(other, &protobuf.SocialLink{Text: "A", Url: "B"})
|
||||
require.True(t, socialLinks.EqualsProtobuf(other))
|
||||
}
|
|
@ -44,6 +44,7 @@ import (
|
|||
"github.com/status-im/status-go/protocol/encryption/multidevice"
|
||||
"github.com/status-im/status-go/protocol/encryption/sharedsecret"
|
||||
"github.com/status-im/status-go/protocol/ens"
|
||||
"github.com/status-im/status-go/protocol/identity"
|
||||
"github.com/status-im/status-go/protocol/identity/alias"
|
||||
"github.com/status-im/status-go/protocol/identity/identicon"
|
||||
"github.com/status-im/status-go/protocol/images"
|
||||
|
@ -864,7 +865,17 @@ func (m *Messenger) attachChatIdentity(cca *protobuf.ContactCodeAdvertisement) e
|
|||
return err
|
||||
}
|
||||
|
||||
err = m.persistence.SaveWhenChatIdentityLastPublished(contactCodeTopic, m.getIdentityHash(displayName, img))
|
||||
socialLinks, err := m.settings.GetSocialLinks()
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
identityHash, err := m.getIdentityHash(displayName, img, &socialLinks)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
err = m.persistence.SaveWhenChatIdentityLastPublished(contactCodeTopic, identityHash)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
@ -929,7 +940,17 @@ func (m *Messenger) handleStandaloneChatIdentity(chat *Chat) error {
|
|||
return err
|
||||
}
|
||||
|
||||
err = m.persistence.SaveWhenChatIdentityLastPublished(chat.ID, m.getIdentityHash(displayName, img))
|
||||
socialLinks, err := m.settings.GetSocialLinks()
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
identityHash, err := m.getIdentityHash(displayName, img, &socialLinks)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
err = m.persistence.SaveWhenChatIdentityLastPublished(chat.ID, identityHash)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
@ -937,11 +958,15 @@ func (m *Messenger) handleStandaloneChatIdentity(chat *Chat) error {
|
|||
return nil
|
||||
}
|
||||
|
||||
func (m *Messenger) getIdentityHash(displayName string, img *userimage.IdentityImage) []byte {
|
||||
if img == nil {
|
||||
return crypto.Keccak256([]byte(displayName))
|
||||
func (m *Messenger) getIdentityHash(displayName string, img *userimage.IdentityImage, socialLinks *identity.SocialLinks) ([]byte, error) {
|
||||
socialLinksData, err := socialLinks.Serialize()
|
||||
if err != nil {
|
||||
return []byte{}, err
|
||||
}
|
||||
return crypto.Keccak256(img.Payload, []byte(displayName))
|
||||
if img == nil {
|
||||
return crypto.Keccak256([]byte(displayName), socialLinksData), nil
|
||||
}
|
||||
return crypto.Keccak256(img.Payload, []byte(displayName), socialLinksData), nil
|
||||
}
|
||||
|
||||
// shouldPublishChatIdentity returns true if the last time the ChatIdentity was attached was more than 24 hours ago
|
||||
|
@ -970,7 +995,17 @@ func (m *Messenger) shouldPublishChatIdentity(chatID string) (bool, error) {
|
|||
return false, err
|
||||
}
|
||||
|
||||
if !bytes.Equal(hash, m.getIdentityHash(displayName, img)) {
|
||||
socialLinks, err := m.settings.GetSocialLinks()
|
||||
if err != nil {
|
||||
return false, err
|
||||
}
|
||||
|
||||
identityHash, err := m.getIdentityHash(displayName, img, &socialLinks)
|
||||
if err != nil {
|
||||
return false, err
|
||||
}
|
||||
|
||||
if !bytes.Equal(hash, identityHash) {
|
||||
return true, nil
|
||||
}
|
||||
|
||||
|
@ -990,10 +1025,16 @@ func (m *Messenger) createChatIdentity(context chatContext) (*protobuf.ChatIdent
|
|||
return nil, err
|
||||
}
|
||||
|
||||
socialLinks, err := m.settings.GetSocialLinks()
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
ci := &protobuf.ChatIdentity{
|
||||
Clock: m.transport.GetCurrentTime(),
|
||||
EnsName: "", // TODO add ENS name handling to dedicate PR
|
||||
DisplayName: displayName,
|
||||
SocialLinks: socialLinks.TransformToProtobuf(),
|
||||
}
|
||||
|
||||
err = m.attachIdentityImagesToChatIdentity(context, ci)
|
||||
|
|
|
@ -18,6 +18,7 @@ import (
|
|||
"github.com/status-im/status-go/protocol/common"
|
||||
"github.com/status-im/status-go/protocol/communities"
|
||||
"github.com/status-im/status-go/protocol/encryption/multidevice"
|
||||
"github.com/status-im/status-go/protocol/identity"
|
||||
"github.com/status-im/status-go/protocol/protobuf"
|
||||
"github.com/status-im/status-go/protocol/requests"
|
||||
v1protocol "github.com/status-im/status-go/protocol/v1"
|
||||
|
@ -1816,17 +1817,6 @@ func (m *Messenger) HandleChatIdentity(state *ReceivedMessageState, ci protobuf.
|
|||
}
|
||||
|
||||
contact := state.CurrentMessageState.Contact
|
||||
|
||||
if err = ValidateDisplayName(&ci.DisplayName); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
if contact.DisplayName != ci.DisplayName && len(ci.DisplayName) != 0 {
|
||||
contact.DisplayName = ci.DisplayName
|
||||
state.ModifiedContacts.Store(contact.ID, true)
|
||||
state.AllContacts.Store(contact.ID, contact)
|
||||
}
|
||||
|
||||
viewFromContacts := s.ProfilePicturesVisibility == settings.ProfilePicturesVisibilityContactsOnly
|
||||
viewFromNoOne := s.ProfilePicturesVisibility == settings.ProfilePicturesVisibilityNone
|
||||
|
||||
|
@ -1870,11 +1860,13 @@ func (m *Messenger) HandleChatIdentity(state *ReceivedMessageState, ci protobuf.
|
|||
}
|
||||
}
|
||||
|
||||
newImages, err := m.persistence.SaveContactChatIdentity(contact.ID, &ci)
|
||||
clockChanged, imagesChanged, err := m.persistence.SaveContactChatIdentity(contact.ID, &ci)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
if newImages {
|
||||
contactModified := false
|
||||
|
||||
if imagesChanged {
|
||||
for imageType, image := range ci.Images {
|
||||
if contact.Images == nil {
|
||||
contact.Images = make(map[string]images.IdentityImage)
|
||||
|
@ -1882,6 +1874,26 @@ func (m *Messenger) HandleChatIdentity(state *ReceivedMessageState, ci protobuf.
|
|||
contact.Images[imageType] = images.IdentityImage{Name: imageType, Payload: image.Payload}
|
||||
|
||||
}
|
||||
contactModified = true
|
||||
}
|
||||
|
||||
if clockChanged {
|
||||
if err = ValidateDisplayName(&ci.DisplayName); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
if contact.DisplayName != ci.DisplayName && len(ci.DisplayName) != 0 {
|
||||
contact.DisplayName = ci.DisplayName
|
||||
contactModified = true
|
||||
}
|
||||
|
||||
if !contact.SocialLinks.EqualsProtobuf(ci.SocialLinks) {
|
||||
contact.SocialLinks = *identity.NewSocialLinks(ci.SocialLinks)
|
||||
contactModified = true
|
||||
}
|
||||
}
|
||||
|
||||
if contactModified {
|
||||
state.ModifiedContacts.Store(contact.ID, true)
|
||||
state.AllContacts.Store(contact.ID, contact)
|
||||
}
|
||||
|
|
|
@ -0,0 +1,26 @@
|
|||
package protocol
|
||||
|
||||
import "github.com/status-im/status-go/protocol/identity"
|
||||
|
||||
func (m *Messenger) SetSocialLinks(socialLinks *identity.SocialLinks) error {
|
||||
currentSocialLinks, err := m.settings.GetSocialLinks()
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
if currentSocialLinks.Equals(*socialLinks) {
|
||||
return nil // Do nothing
|
||||
}
|
||||
|
||||
err = m.settings.SetSocialLinks(socialLinks)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
err = m.resetLastPublishedTimeForChatIdentity()
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
return m.publishContactCode()
|
||||
}
|
|
@ -55,6 +55,7 @@
|
|||
// 1656958989_contact_verification.up.sql (624B)
|
||||
// 1658236268_add_discord_message_authors_table.up.sql (191B)
|
||||
// 1659619997_add_discord_messages_table.up.sql (371B)
|
||||
// 1660226788_create_chat_identity_social_links.up.sql (318B)
|
||||
// README.md (554B)
|
||||
// doc.go (850B)
|
||||
|
||||
|
@ -140,7 +141,7 @@ func _000001_initDownDbSql() (*asset, error) {
|
|||
return nil, err
|
||||
}
|
||||
|
||||
info := bindataFileInfo{name: "000001_init.down.db.sql", size: 65, mode: os.FileMode(0664), modTime: time.Unix(1659614623, 0)}
|
||||
info := bindataFileInfo{name: "000001_init.down.db.sql", size: 65, mode: os.FileMode(0664), modTime: time.Unix(1660214353, 0)}
|
||||
a := &asset{bytes: bytes, info: info, digest: [32]uint8{0x5e, 0xbb, 0x3f, 0x1, 0x75, 0x19, 0x70, 0x86, 0xa7, 0x34, 0x40, 0x17, 0x34, 0x3e, 0x18, 0x51, 0x79, 0xd4, 0x22, 0xad, 0x8f, 0x80, 0xcc, 0xa6, 0xcc, 0x6, 0x2b, 0x62, 0x2, 0x47, 0xba, 0xf9}}
|
||||
return a, nil
|
||||
}
|
||||
|
@ -160,7 +161,7 @@ func _000001_initUpDbSql() (*asset, error) {
|
|||
return nil, err
|
||||
}
|
||||
|
||||
info := bindataFileInfo{name: "000001_init.up.db.sql", size: 2719, mode: os.FileMode(0664), modTime: time.Unix(1659614623, 0)}
|
||||
info := bindataFileInfo{name: "000001_init.up.db.sql", size: 2719, mode: os.FileMode(0664), modTime: time.Unix(1660214353, 0)}
|
||||
a := &asset{bytes: bytes, info: info, digest: [32]uint8{0x60, 0xdc, 0xeb, 0xe, 0xc2, 0x4f, 0x75, 0xa, 0xf6, 0x3e, 0xc7, 0xc4, 0x4, 0xe2, 0xe1, 0xa4, 0x73, 0x2f, 0x4a, 0xad, 0x1a, 0x0, 0xc3, 0x93, 0x9d, 0x77, 0x3e, 0x31, 0x91, 0x77, 0x2e, 0xc8}}
|
||||
return a, nil
|
||||
}
|
||||
|
@ -180,7 +181,7 @@ func _000002_add_last_ens_clock_valueUpSql() (*asset, error) {
|
|||
return nil, err
|
||||
}
|
||||
|
||||
info := bindataFileInfo{name: "000002_add_last_ens_clock_value.up.sql", size: 77, mode: os.FileMode(0664), modTime: time.Unix(1659614623, 0)}
|
||||
info := bindataFileInfo{name: "000002_add_last_ens_clock_value.up.sql", size: 77, mode: os.FileMode(0664), modTime: time.Unix(1660214353, 0)}
|
||||
a := &asset{bytes: bytes, info: info, digest: [32]uint8{0x4d, 0x3, 0x8f, 0xd5, 0x85, 0x83, 0x47, 0xbe, 0xf9, 0x82, 0x7e, 0x81, 0xa4, 0xbd, 0xaa, 0xd5, 0x98, 0x18, 0x5, 0x2d, 0x82, 0x42, 0x3b, 0x3, 0x50, 0xc3, 0x1e, 0x84, 0x35, 0xf, 0xb6, 0x2b}}
|
||||
return a, nil
|
||||
}
|
||||
|
@ -200,7 +201,7 @@ func _1586358095_add_replaceUpSql() (*asset, error) {
|
|||
return nil, err
|
||||
}
|
||||
|
||||
info := bindataFileInfo{name: "1586358095_add_replace.up.sql", size: 224, mode: os.FileMode(0664), modTime: time.Unix(1659614623, 0)}
|
||||
info := bindataFileInfo{name: "1586358095_add_replace.up.sql", size: 224, mode: os.FileMode(0664), modTime: time.Unix(1660214353, 0)}
|
||||
a := &asset{bytes: bytes, info: info, digest: [32]uint8{0xd2, 0xb3, 0xa9, 0xc7, 0x7f, 0x9d, 0x8f, 0x43, 0x8c, 0x9e, 0x58, 0x8d, 0x44, 0xbc, 0xfa, 0x6b, 0x5f, 0x3f, 0x5a, 0xbe, 0xe8, 0xb1, 0x16, 0xf, 0x91, 0x2a, 0xa0, 0x71, 0xbb, 0x8d, 0x6b, 0xcb}}
|
||||
return a, nil
|
||||
}
|
||||
|
@ -220,7 +221,7 @@ func _1588665364_add_image_dataUpSql() (*asset, error) {
|
|||
return nil, err
|
||||
}
|
||||
|
||||
info := bindataFileInfo{name: "1588665364_add_image_data.up.sql", size: 186, mode: os.FileMode(0664), modTime: time.Unix(1659614623, 0)}
|
||||
info := bindataFileInfo{name: "1588665364_add_image_data.up.sql", size: 186, mode: os.FileMode(0664), modTime: time.Unix(1660214353, 0)}
|
||||
a := &asset{bytes: bytes, info: info, digest: [32]uint8{0xd6, 0xc6, 0x35, 0xb4, 0x4c, 0x39, 0x96, 0x29, 0x30, 0xda, 0xf4, 0x8f, 0xcb, 0xf1, 0x9f, 0x84, 0xdc, 0x88, 0xd4, 0xd5, 0xbc, 0xb6, 0x5b, 0x46, 0x78, 0x67, 0x76, 0x1a, 0x5, 0x36, 0xdc, 0xe5}}
|
||||
return a, nil
|
||||
}
|
||||
|
@ -240,7 +241,7 @@ func _1589365189_add_pow_targetUpSql() (*asset, error) {
|
|||
return nil, err
|
||||
}
|
||||
|
||||
info := bindataFileInfo{name: "1589365189_add_pow_target.up.sql", size: 66, mode: os.FileMode(0664), modTime: time.Unix(1659614623, 0)}
|
||||
info := bindataFileInfo{name: "1589365189_add_pow_target.up.sql", size: 66, mode: os.FileMode(0664), modTime: time.Unix(1660214353, 0)}
|
||||
a := &asset{bytes: bytes, info: info, digest: [32]uint8{0x4e, 0x3a, 0xe2, 0x2e, 0x7d, 0xaf, 0xbb, 0xcc, 0x21, 0xa1, 0x7a, 0x41, 0x9a, 0xd0, 0xbb, 0xa9, 0xc8, 0x35, 0xf9, 0x32, 0x34, 0x46, 0x44, 0x9a, 0x86, 0x40, 0x7c, 0xb9, 0x23, 0xc7, 0x3, 0x3f}}
|
||||
return a, nil
|
||||
}
|
||||
|
@ -260,7 +261,7 @@ func _1591277220_add_index_messagesUpSql() (*asset, error) {
|
|||
return nil, err
|
||||
}
|
||||
|
||||
info := bindataFileInfo{name: "1591277220_add_index_messages.up.sql", size: 240, mode: os.FileMode(0664), modTime: time.Unix(1659614623, 0)}
|
||||
info := bindataFileInfo{name: "1591277220_add_index_messages.up.sql", size: 240, mode: os.FileMode(0664), modTime: time.Unix(1660214353, 0)}
|
||||
a := &asset{bytes: bytes, info: info, digest: [32]uint8{0x9c, 0xfe, 0xbe, 0xd5, 0xb8, 0x8f, 0xdd, 0xef, 0xbb, 0xa8, 0xad, 0x7f, 0xed, 0x5b, 0x5b, 0x2f, 0xe6, 0x82, 0x27, 0x78, 0x1f, 0xb9, 0x57, 0xdc, 0x8, 0xc2, 0xb2, 0xa9, 0x9a, 0x4, 0xe1, 0x7a}}
|
||||
return a, nil
|
||||
}
|
||||
|
@ -280,7 +281,7 @@ func _1593087212_add_mute_chat_and_raw_message_fieldsUpSql() (*asset, error) {
|
|||
return nil, err
|
||||
}
|
||||
|
||||
info := bindataFileInfo{name: "1593087212_add_mute_chat_and_raw_message_fields.up.sql", size: 215, mode: os.FileMode(0664), modTime: time.Unix(1659614623, 0)}
|
||||
info := bindataFileInfo{name: "1593087212_add_mute_chat_and_raw_message_fields.up.sql", size: 215, mode: os.FileMode(0664), modTime: time.Unix(1660214353, 0)}
|
||||
a := &asset{bytes: bytes, info: info, digest: [32]uint8{0x73, 0x99, 0x61, 0xd1, 0xaa, 0xb4, 0xbf, 0xaf, 0xd7, 0x20, 0x17, 0x40, 0xf9, 0x2, 0xfb, 0xcc, 0x40, 0x2a, 0xd, 0x86, 0x36, 0x30, 0x88, 0x89, 0x25, 0x80, 0x42, 0xb0, 0x5b, 0xe9, 0x73, 0x78}}
|
||||
return a, nil
|
||||
}
|
||||
|
@ -300,7 +301,7 @@ func _1595862781_add_audio_dataUpSql() (*asset, error) {
|
|||
return nil, err
|
||||
}
|
||||
|
||||
info := bindataFileInfo{name: "1595862781_add_audio_data.up.sql", size: 246, mode: os.FileMode(0664), modTime: time.Unix(1659614623, 0)}
|
||||
info := bindataFileInfo{name: "1595862781_add_audio_data.up.sql", size: 246, mode: os.FileMode(0664), modTime: time.Unix(1660214353, 0)}
|
||||
a := &asset{bytes: bytes, info: info, digest: [32]uint8{0xae, 0xd2, 0xee, 0x55, 0xfb, 0x36, 0xa4, 0x92, 0x66, 0xe, 0x81, 0x62, 0x1e, 0x7a, 0x69, 0xa, 0xd5, 0x4b, 0xa5, 0x6a, 0x8d, 0x1d, 0xce, 0xf3, 0x3e, 0xc0, 0x5f, 0x9c, 0x66, 0x1b, 0xb4, 0xed}}
|
||||
return a, nil
|
||||
}
|
||||
|
@ -320,7 +321,7 @@ func _1595865249_create_emoji_reactions_tableUpSql() (*asset, error) {
|
|||
return nil, err
|
||||
}
|
||||
|
||||
info := bindataFileInfo{name: "1595865249_create_emoji_reactions_table.up.sql", size: 300, mode: os.FileMode(0664), modTime: time.Unix(1659614623, 0)}
|
||||
info := bindataFileInfo{name: "1595865249_create_emoji_reactions_table.up.sql", size: 300, mode: os.FileMode(0664), modTime: time.Unix(1660214353, 0)}
|
||||
a := &asset{bytes: bytes, info: info, digest: [32]uint8{0x3e, 0xc5, 0x43, 0x5c, 0x3d, 0x53, 0x43, 0x2c, 0x1a, 0xa5, 0xb6, 0xbf, 0x7, 0x4, 0x5a, 0x3e, 0x40, 0x8b, 0xa4, 0x57, 0x12, 0x58, 0xbc, 0x42, 0xe2, 0xc3, 0xde, 0x76, 0x98, 0x80, 0xe2, 0xbe}}
|
||||
return a, nil
|
||||
}
|
||||
|
@ -340,7 +341,7 @@ func _1596805115_create_group_chat_invitations_tableUpSql() (*asset, error) {
|
|||
return nil, err
|
||||
}
|
||||
|
||||
info := bindataFileInfo{name: "1596805115_create_group_chat_invitations_table.up.sql", size: 231, mode: os.FileMode(0664), modTime: time.Unix(1659614623, 0)}
|
||||
info := bindataFileInfo{name: "1596805115_create_group_chat_invitations_table.up.sql", size: 231, mode: os.FileMode(0664), modTime: time.Unix(1660214353, 0)}
|
||||
a := &asset{bytes: bytes, info: info, digest: [32]uint8{0x6d, 0xb1, 0x14, 0x6d, 0x54, 0x28, 0x67, 0xc3, 0x23, 0x6a, 0xfc, 0x80, 0xdf, 0x9e, 0x4c, 0x35, 0x36, 0xf, 0xf8, 0xf3, 0x5f, 0xae, 0xad, 0xb, 0xc1, 0x51, 0x8e, 0x17, 0x7, 0xe5, 0x7f, 0x91}}
|
||||
return a, nil
|
||||
}
|
||||
|
@ -360,7 +361,7 @@ func _1597322655_add_invitation_admin_chat_fieldUpSql() (*asset, error) {
|
|||
return nil, err
|
||||
}
|
||||
|
||||
info := bindataFileInfo{name: "1597322655_add_invitation_admin_chat_field.up.sql", size: 54, mode: os.FileMode(0664), modTime: time.Unix(1659614623, 0)}
|
||||
info := bindataFileInfo{name: "1597322655_add_invitation_admin_chat_field.up.sql", size: 54, mode: os.FileMode(0664), modTime: time.Unix(1660214353, 0)}
|
||||
a := &asset{bytes: bytes, info: info, digest: [32]uint8{0xa9, 0x7a, 0xa0, 0xf2, 0xdb, 0x13, 0x91, 0x91, 0xa8, 0x34, 0x1a, 0xa1, 0x49, 0x68, 0xd5, 0xae, 0x2c, 0xd8, 0xd5, 0xea, 0x8f, 0x8c, 0xc7, 0x2, 0x4e, 0x58, 0x2c, 0x3a, 0x14, 0xd4, 0x4f, 0x2c}}
|
||||
return a, nil
|
||||
}
|
||||
|
@ -380,7 +381,7 @@ func _1597757544_add_nicknameUpSql() (*asset, error) {
|
|||
return nil, err
|
||||
}
|
||||
|
||||
info := bindataFileInfo{name: "1597757544_add_nickname.up.sql", size: 52, mode: os.FileMode(0664), modTime: time.Unix(1659614623, 0)}
|
||||
info := bindataFileInfo{name: "1597757544_add_nickname.up.sql", size: 52, mode: os.FileMode(0664), modTime: time.Unix(1660214353, 0)}
|
||||
a := &asset{bytes: bytes, info: info, digest: [32]uint8{0xf4, 0xa2, 0x64, 0x50, 0xc5, 0x4, 0xb9, 0x8b, 0xd1, 0x18, 0x9b, 0xc3, 0x91, 0x36, 0x2a, 0x1f, 0xc3, 0x6c, 0x2d, 0x92, 0xf8, 0x5e, 0xff, 0xb1, 0x59, 0x61, 0x2, 0x1c, 0xe1, 0x85, 0x90, 0xa4}}
|
||||
return a, nil
|
||||
}
|
||||
|
@ -400,7 +401,7 @@ func _1598955122_add_mentionsUpSql() (*asset, error) {
|
|||
return nil, err
|
||||
}
|
||||
|
||||
info := bindataFileInfo{name: "1598955122_add_mentions.up.sql", size: 52, mode: os.FileMode(0664), modTime: time.Unix(1659614623, 0)}
|
||||
info := bindataFileInfo{name: "1598955122_add_mentions.up.sql", size: 52, mode: os.FileMode(0664), modTime: time.Unix(1660214353, 0)}
|
||||
a := &asset{bytes: bytes, info: info, digest: [32]uint8{0x8d, 0x22, 0x17, 0x92, 0xd2, 0x11, 0x4e, 0x7, 0x93, 0x9a, 0x55, 0xfd, 0xb, 0x97, 0xc4, 0x63, 0x6a, 0x81, 0x97, 0xcd, 0xb2, 0xf8, 0x4b, 0x5f, 0x3c, 0xfa, 0x3a, 0x38, 0x53, 0x10, 0xed, 0x9d}}
|
||||
return a, nil
|
||||
}
|
||||
|
@ -420,7 +421,7 @@ func _1599641390_add_emoji_reactions_indexUpSql() (*asset, error) {
|
|||
return nil, err
|
||||
}
|
||||
|
||||
info := bindataFileInfo{name: "1599641390_add_emoji_reactions_index.up.sql", size: 126, mode: os.FileMode(0664), modTime: time.Unix(1659614623, 0)}
|
||||
info := bindataFileInfo{name: "1599641390_add_emoji_reactions_index.up.sql", size: 126, mode: os.FileMode(0664), modTime: time.Unix(1660214353, 0)}
|
||||
a := &asset{bytes: bytes, info: info, digest: [32]uint8{0xf9, 0xd8, 0xdc, 0xa7, 0xb, 0x92, 0x7a, 0x61, 0x37, 0x24, 0x1c, 0x77, 0x5e, 0xe, 0x7e, 0xfc, 0x9f, 0x98, 0x7b, 0x65, 0xe7, 0xf9, 0x71, 0x57, 0x89, 0x2d, 0x90, 0x1b, 0xf6, 0x5e, 0x37, 0xe8}}
|
||||
return a, nil
|
||||
}
|
||||
|
@ -440,7 +441,7 @@ func _1599720851_add_seen_index_remove_long_messagesUpSql() (*asset, error) {
|
|||
return nil, err
|
||||
}
|
||||
|
||||
info := bindataFileInfo{name: "1599720851_add_seen_index_remove_long_messages.up.sql", size: 150, mode: os.FileMode(0664), modTime: time.Unix(1659614623, 0)}
|
||||
info := bindataFileInfo{name: "1599720851_add_seen_index_remove_long_messages.up.sql", size: 150, mode: os.FileMode(0664), modTime: time.Unix(1660214353, 0)}
|
||||
a := &asset{bytes: bytes, info: info, digest: [32]uint8{0x24, 0x1c, 0xc4, 0x78, 0x91, 0xc7, 0xeb, 0xfe, 0xc8, 0xa0, 0xd8, 0x13, 0x27, 0x97, 0xc8, 0x96, 0x56, 0x97, 0x33, 0x2c, 0x1e, 0x16, 0x8a, 0xd3, 0x49, 0x99, 0x3, 0xe9, 0xbb, 0xc4, 0x5, 0x3c}}
|
||||
return a, nil
|
||||
}
|
||||
|
@ -460,7 +461,7 @@ func _1603198582_add_profile_chat_fieldUpSql() (*asset, error) {
|
|||
return nil, err
|
||||
}
|
||||
|
||||
info := bindataFileInfo{name: "1603198582_add_profile_chat_field.up.sql", size: 45, mode: os.FileMode(0664), modTime: time.Unix(1659614623, 0)}
|
||||
info := bindataFileInfo{name: "1603198582_add_profile_chat_field.up.sql", size: 45, mode: os.FileMode(0664), modTime: time.Unix(1660214353, 0)}
|
||||
a := &asset{bytes: bytes, info: info, digest: [32]uint8{0xaa, 0xca, 0xe, 0x46, 0xa0, 0x9, 0x9d, 0x47, 0x57, 0xe9, 0xfb, 0x17, 0xeb, 0x9c, 0xf6, 0xb8, 0x1d, 0xe9, 0xd, 0x0, 0xd5, 0xe5, 0xd8, 0x9e, 0x60, 0xa, 0xbf, 0x32, 0x2c, 0x52, 0x7f, 0x6a}}
|
||||
return a, nil
|
||||
}
|
||||
|
@ -480,7 +481,7 @@ func _1603816533_add_linksUpSql() (*asset, error) {
|
|||
return nil, err
|
||||
}
|
||||
|
||||
info := bindataFileInfo{name: "1603816533_add_links.up.sql", size: 48, mode: os.FileMode(0664), modTime: time.Unix(1659614623, 0)}
|
||||
info := bindataFileInfo{name: "1603816533_add_links.up.sql", size: 48, mode: os.FileMode(0664), modTime: time.Unix(1660214353, 0)}
|
||||
a := &asset{bytes: bytes, info: info, digest: [32]uint8{0xc9, 0x24, 0xd6, 0x1d, 0xa, 0x83, 0x1e, 0x4d, 0xf, 0xae, 0x4d, 0x8c, 0x51, 0x32, 0xa8, 0x37, 0xb0, 0x14, 0xfb, 0x32, 0x34, 0xc8, 0xc, 0x4e, 0x5b, 0xc5, 0x15, 0x65, 0x73, 0x0, 0x0, 0x1d}}
|
||||
return a, nil
|
||||
}
|
||||
|
@ -500,7 +501,7 @@ func _1603888149_create_chat_identity_last_published_tableUpSql() (*asset, error
|
|||
return nil, err
|
||||
}
|
||||
|
||||
info := bindataFileInfo{name: "1603888149_create_chat_identity_last_published_table.up.sql", size: 407, mode: os.FileMode(0664), modTime: time.Unix(1659614623, 0)}
|
||||
info := bindataFileInfo{name: "1603888149_create_chat_identity_last_published_table.up.sql", size: 407, mode: os.FileMode(0664), modTime: time.Unix(1660214353, 0)}
|
||||
a := &asset{bytes: bytes, info: info, digest: [32]uint8{0x7f, 0x9, 0xf, 0xfb, 0xdb, 0x3c, 0x86, 0x70, 0x82, 0xda, 0x10, 0x25, 0xe2, 0x4e, 0x40, 0x45, 0xab, 0x8b, 0x1c, 0x91, 0x7c, 0xf1, 0x70, 0x2e, 0x81, 0xf3, 0x71, 0x45, 0xda, 0xe2, 0xa4, 0x57}}
|
||||
return a, nil
|
||||
}
|
||||
|
@ -520,7 +521,7 @@ func _1605075346_add_communitiesUpSql() (*asset, error) {
|
|||
return nil, err
|
||||
}
|
||||
|
||||
info := bindataFileInfo{name: "1605075346_add_communities.up.sql", size: 6971, mode: os.FileMode(0664), modTime: time.Unix(1659614623, 0)}
|
||||
info := bindataFileInfo{name: "1605075346_add_communities.up.sql", size: 6971, mode: os.FileMode(0664), modTime: time.Unix(1660214353, 0)}
|
||||
a := &asset{bytes: bytes, info: info, digest: [32]uint8{0x1f, 0x64, 0xea, 0xb4, 0xae, 0x9e, 0xdb, 0x9, 0x58, 0xb6, 0x5c, 0x7a, 0x50, 0xc5, 0xfe, 0x93, 0x5d, 0x36, 0x85, 0x5d, 0x6a, 0xba, 0xc9, 0x7e, 0x84, 0xd7, 0xbf, 0x2a, 0x53, 0xf3, 0x97, 0xf1}}
|
||||
return a, nil
|
||||
}
|
||||
|
@ -540,7 +541,7 @@ func _1610117927_add_message_cacheUpSql() (*asset, error) {
|
|||
return nil, err
|
||||
}
|
||||
|
||||
info := bindataFileInfo{name: "1610117927_add_message_cache.up.sql", size: 142, mode: os.FileMode(0664), modTime: time.Unix(1659614623, 0)}
|
||||
info := bindataFileInfo{name: "1610117927_add_message_cache.up.sql", size: 142, mode: os.FileMode(0664), modTime: time.Unix(1660214353, 0)}
|
||||
a := &asset{bytes: bytes, info: info, digest: [32]uint8{0x34, 0xf1, 0xf0, 0x82, 0x79, 0x28, 0x19, 0xc2, 0x39, 0x6a, 0xa5, 0x96, 0x59, 0x23, 0xa0, 0xed, 0x60, 0x58, 0x86, 0x9, 0xb9, 0xad, 0xfb, 0xa, 0xe3, 0x47, 0x6e, 0xa1, 0x18, 0xe8, 0x39, 0x2c}}
|
||||
return a, nil
|
||||
}
|
||||
|
@ -560,7 +561,7 @@ func _1610959908_add_dont_wrap_to_raw_messagesUpSql() (*asset, error) {
|
|||
return nil, err
|
||||
}
|
||||
|
||||
info := bindataFileInfo{name: "1610959908_add_dont_wrap_to_raw_messages.up.sql", size: 83, mode: os.FileMode(0664), modTime: time.Unix(1659614623, 0)}
|
||||
info := bindataFileInfo{name: "1610959908_add_dont_wrap_to_raw_messages.up.sql", size: 83, mode: os.FileMode(0664), modTime: time.Unix(1660214353, 0)}
|
||||
a := &asset{bytes: bytes, info: info, digest: [32]uint8{0x71, 0x2, 0x9a, 0xca, 0xd4, 0x38, 0x44, 0x30, 0x2b, 0xa8, 0x27, 0x32, 0x63, 0x53, 0x22, 0x60, 0x59, 0x84, 0x23, 0x96, 0x77, 0xf0, 0x56, 0xd7, 0x94, 0xe0, 0x95, 0x28, 0x6, 0x1d, 0x4e, 0xb1}}
|
||||
return a, nil
|
||||
}
|
||||
|
@ -580,7 +581,7 @@ func _1610960912_add_send_on_personal_topicUpSql() (*asset, error) {
|
|||
return nil, err
|
||||
}
|
||||
|
||||
info := bindataFileInfo{name: "1610960912_add_send_on_personal_topic.up.sql", size: 82, mode: os.FileMode(0664), modTime: time.Unix(1659614623, 0)}
|
||||
info := bindataFileInfo{name: "1610960912_add_send_on_personal_topic.up.sql", size: 82, mode: os.FileMode(0664), modTime: time.Unix(1660214353, 0)}
|
||||
a := &asset{bytes: bytes, info: info, digest: [32]uint8{0x77, 0xac, 0x2f, 0xc4, 0xd, 0xa7, 0x1b, 0x37, 0x30, 0xc2, 0x68, 0xee, 0xde, 0x54, 0x5e, 0xbf, 0x3f, 0xa0, 0xd6, 0xc6, 0x9f, 0xd4, 0x34, 0x12, 0x76, 0x1e, 0x66, 0x4a, 0xfc, 0xf, 0xee, 0xc9}}
|
||||
return a, nil
|
||||
}
|
||||
|
@ -600,7 +601,7 @@ func _1612870480_add_datasync_idUpSql() (*asset, error) {
|
|||
return nil, err
|
||||
}
|
||||
|
||||
info := bindataFileInfo{name: "1612870480_add_datasync_id.up.sql", size: 111, mode: os.FileMode(0664), modTime: time.Unix(1659614623, 0)}
|
||||
info := bindataFileInfo{name: "1612870480_add_datasync_id.up.sql", size: 111, mode: os.FileMode(0664), modTime: time.Unix(1660214353, 0)}
|
||||
a := &asset{bytes: bytes, info: info, digest: [32]uint8{0x34, 0x9a, 0xbc, 0xfa, 0xaa, 0x8c, 0x9c, 0x37, 0x67, 0x15, 0x9c, 0x7e, 0x78, 0x75, 0x66, 0x82, 0x18, 0x72, 0x10, 0xbc, 0xd4, 0xab, 0x44, 0xfe, 0x57, 0x85, 0x6d, 0x19, 0xf5, 0x96, 0x8a, 0xbe}}
|
||||
return a, nil
|
||||
}
|
||||
|
@ -620,7 +621,7 @@ func _1614152139_add_communities_request_to_joinUpSql() (*asset, error) {
|
|||
return nil, err
|
||||
}
|
||||
|
||||
info := bindataFileInfo{name: "1614152139_add_communities_request_to_join.up.sql", size: 831, mode: os.FileMode(0664), modTime: time.Unix(1659614623, 0)}
|
||||
info := bindataFileInfo{name: "1614152139_add_communities_request_to_join.up.sql", size: 831, mode: os.FileMode(0664), modTime: time.Unix(1660214353, 0)}
|
||||
a := &asset{bytes: bytes, info: info, digest: [32]uint8{0x11, 0x3, 0x26, 0xf9, 0x29, 0x50, 0x4f, 0xcd, 0x46, 0xe5, 0xb1, 0x6b, 0xb9, 0x2, 0x40, 0xb1, 0xdf, 0x4a, 0x4c, 0x7a, 0xda, 0x3, 0x35, 0xcd, 0x2d, 0xcc, 0x80, 0x7d, 0x57, 0x5f, 0x3, 0x5c}}
|
||||
return a, nil
|
||||
}
|
||||
|
@ -640,7 +641,7 @@ func _1615374373_add_confirmationsUpSql() (*asset, error) {
|
|||
return nil, err
|
||||
}
|
||||
|
||||
info := bindataFileInfo{name: "1615374373_add_confirmations.up.sql", size: 227, mode: os.FileMode(0664), modTime: time.Unix(1659614623, 0)}
|
||||
info := bindataFileInfo{name: "1615374373_add_confirmations.up.sql", size: 227, mode: os.FileMode(0664), modTime: time.Unix(1660214353, 0)}
|
||||
a := &asset{bytes: bytes, info: info, digest: [32]uint8{0xdd, 0xa6, 0x65, 0xc5, 0x1d, 0xb2, 0x77, 0x36, 0xe3, 0x79, 0xda, 0xe8, 0x7a, 0xa4, 0xdf, 0x45, 0xae, 0xd8, 0xb4, 0xba, 0x90, 0xfd, 0x74, 0x71, 0x14, 0x75, 0x73, 0x72, 0xb9, 0x9e, 0x1, 0x81}}
|
||||
return a, nil
|
||||
}
|
||||
|
@ -660,7 +661,7 @@ func _1617694931_add_notification_centerUpSql() (*asset, error) {
|
|||
return nil, err
|
||||
}
|
||||
|
||||
info := bindataFileInfo{name: "1617694931_add_notification_center.up.sql", size: 572, mode: os.FileMode(0664), modTime: time.Unix(1659614623, 0)}
|
||||
info := bindataFileInfo{name: "1617694931_add_notification_center.up.sql", size: 572, mode: os.FileMode(0664), modTime: time.Unix(1660214353, 0)}
|
||||
a := &asset{bytes: bytes, info: info, digest: [32]uint8{0x10, 0x45, 0xc6, 0xc9, 0x73, 0xbb, 0x1f, 0xda, 0xa3, 0x4d, 0x19, 0x98, 0x85, 0x2d, 0xca, 0xda, 0xcc, 0x3b, 0x32, 0xff, 0xc7, 0x7b, 0xe3, 0x9f, 0x9b, 0x2a, 0x93, 0xf5, 0xdf, 0x65, 0x38, 0x91}}
|
||||
return a, nil
|
||||
}
|
||||
|
@ -680,7 +681,7 @@ func _1618923660_create_pin_messagesUpSql() (*asset, error) {
|
|||
return nil, err
|
||||
}
|
||||
|
||||
info := bindataFileInfo{name: "1618923660_create_pin_messages.up.sql", size: 265, mode: os.FileMode(0664), modTime: time.Unix(1659614623, 0)}
|
||||
info := bindataFileInfo{name: "1618923660_create_pin_messages.up.sql", size: 265, mode: os.FileMode(0664), modTime: time.Unix(1660214353, 0)}
|
||||
a := &asset{bytes: bytes, info: info, digest: [32]uint8{0x61, 0x44, 0x3a, 0xbe, 0x30, 0xd2, 0x7e, 0xc0, 0xe2, 0x8e, 0x65, 0x53, 0x54, 0xbb, 0x7a, 0x1c, 0xb3, 0x5d, 0xd2, 0xa6, 0xa9, 0x28, 0xb7, 0xa4, 0x5f, 0x8b, 0x9, 0x5f, 0x17, 0xc1, 0x85, 0x21}}
|
||||
return a, nil
|
||||
}
|
||||
|
@ -700,7 +701,7 @@ func _1619094007_add_joined_chat_fieldUpSql() (*asset, error) {
|
|||
return nil, err
|
||||
}
|
||||
|
||||
info := bindataFileInfo{name: "1619094007_add_joined_chat_field.up.sql", size: 101, mode: os.FileMode(0664), modTime: time.Unix(1659614623, 0)}
|
||||
info := bindataFileInfo{name: "1619094007_add_joined_chat_field.up.sql", size: 101, mode: os.FileMode(0664), modTime: time.Unix(1660214353, 0)}
|
||||
a := &asset{bytes: bytes, info: info, digest: [32]uint8{0xfa, 0x30, 0x81, 0x3a, 0x2f, 0x9f, 0xb3, 0x0, 0x55, 0x8e, 0x1d, 0xa8, 0xb0, 0x68, 0xf0, 0x40, 0x1a, 0x6c, 0xaa, 0xfc, 0x33, 0xd1, 0xd1, 0x55, 0x3f, 0xf2, 0xbd, 0x54, 0xa1, 0x2b, 0x40, 0x95}}
|
||||
return a, nil
|
||||
}
|
||||
|
@ -720,7 +721,7 @@ func _1619099821_add_last_synced_fieldUpSql() (*asset, error) {
|
|||
return nil, err
|
||||
}
|
||||
|
||||
info := bindataFileInfo{name: "1619099821_add_last_synced_field.up.sql", size: 226, mode: os.FileMode(0664), modTime: time.Unix(1659614623, 0)}
|
||||
info := bindataFileInfo{name: "1619099821_add_last_synced_field.up.sql", size: 226, mode: os.FileMode(0664), modTime: time.Unix(1660214353, 0)}
|
||||
a := &asset{bytes: bytes, info: info, digest: [32]uint8{0xf, 0x52, 0x22, 0xe, 0x2f, 0xd7, 0x93, 0x5f, 0x42, 0xc2, 0x93, 0x4, 0x35, 0x6f, 0xc9, 0x19, 0xed, 0x6b, 0x52, 0x6f, 0xae, 0x99, 0xe2, 0x68, 0x3d, 0x4f, 0x40, 0xe, 0xe1, 0xa, 0x47, 0x21}}
|
||||
return a, nil
|
||||
}
|
||||
|
@ -740,7 +741,7 @@ func _1621933219_add_mentionedUpSql() (*asset, error) {
|
|||
return nil, err
|
||||
}
|
||||
|
||||
info := bindataFileInfo{name: "1621933219_add_mentioned.up.sql", size: 70, mode: os.FileMode(0664), modTime: time.Unix(1659614623, 0)}
|
||||
info := bindataFileInfo{name: "1621933219_add_mentioned.up.sql", size: 70, mode: os.FileMode(0664), modTime: time.Unix(1660214353, 0)}
|
||||
a := &asset{bytes: bytes, info: info, digest: [32]uint8{0x36, 0x76, 0x8a, 0xc9, 0x7, 0x8f, 0xa5, 0xcb, 0x12, 0x21, 0x4e, 0xfe, 0x96, 0x77, 0xcf, 0x7f, 0x76, 0x75, 0x36, 0x2c, 0xf8, 0x1d, 0x13, 0xcb, 0xcd, 0x6e, 0x70, 0xbf, 0xf5, 0x93, 0x67, 0xd1}}
|
||||
return a, nil
|
||||
}
|
||||
|
@ -760,7 +761,7 @@ func _1622010048_add_unviewed_mentions_countUpSql() (*asset, error) {
|
|||
return nil, err
|
||||
}
|
||||
|
||||
info := bindataFileInfo{name: "1622010048_add_unviewed_mentions_count.up.sql", size: 114, mode: os.FileMode(0664), modTime: time.Unix(1659614623, 0)}
|
||||
info := bindataFileInfo{name: "1622010048_add_unviewed_mentions_count.up.sql", size: 114, mode: os.FileMode(0664), modTime: time.Unix(1660214353, 0)}
|
||||
a := &asset{bytes: bytes, info: info, digest: [32]uint8{0x7c, 0x16, 0x85, 0xa6, 0x5b, 0xe1, 0x66, 0xb9, 0x84, 0xbe, 0x7f, 0xa, 0x77, 0x23, 0xb9, 0xef, 0x8e, 0x2, 0x8, 0xfc, 0x61, 0xb2, 0x43, 0xa9, 0x63, 0xae, 0xb4, 0xdf, 0x30, 0xb1, 0x61, 0x4b}}
|
||||
return a, nil
|
||||
}
|
||||
|
@ -780,7 +781,7 @@ func _1622061278_add_message_activity_center_notification_fieldUpSql() (*asset,
|
|||
return nil, err
|
||||
}
|
||||
|
||||
info := bindataFileInfo{name: "1622061278_add_message_activity_center_notification_field.up.sql", size: 80, mode: os.FileMode(0664), modTime: time.Unix(1659614623, 0)}
|
||||
info := bindataFileInfo{name: "1622061278_add_message_activity_center_notification_field.up.sql", size: 80, mode: os.FileMode(0664), modTime: time.Unix(1660214353, 0)}
|
||||
a := &asset{bytes: bytes, info: info, digest: [32]uint8{0x8, 0xc, 0xa6, 0x1f, 0xa5, 0xc6, 0x7c, 0x6f, 0xab, 0x2c, 0x2d, 0xb5, 0xa4, 0xdd, 0xc1, 0xd6, 0x44, 0x83, 0xf9, 0xb1, 0xa5, 0xce, 0x34, 0x3d, 0x2, 0xa9, 0x35, 0xcf, 0xc6, 0xb2, 0x43, 0x37}}
|
||||
return a, nil
|
||||
}
|
||||
|
@ -800,7 +801,7 @@ func _1622464518_set_synced_to_fromUpSql() (*asset, error) {
|
|||
return nil, err
|
||||
}
|
||||
|
||||
info := bindataFileInfo{name: "1622464518_set_synced_to_from.up.sql", size: 105, mode: os.FileMode(0664), modTime: time.Unix(1659614623, 0)}
|
||||
info := bindataFileInfo{name: "1622464518_set_synced_to_from.up.sql", size: 105, mode: os.FileMode(0664), modTime: time.Unix(1660214353, 0)}
|
||||
a := &asset{bytes: bytes, info: info, digest: [32]uint8{0x33, 0x3e, 0x2b, 0xa, 0x1e, 0xc7, 0x6d, 0x6f, 0xd1, 0x1d, 0xe8, 0x4b, 0xdd, 0x92, 0x76, 0xea, 0xf2, 0x3e, 0x15, 0x85, 0xc4, 0xc3, 0x31, 0xf1, 0xc0, 0xa2, 0xd7, 0x47, 0xde, 0x4e, 0xfd, 0xc6}}
|
||||
return a, nil
|
||||
}
|
||||
|
@ -820,7 +821,7 @@ func _1622464519_add_chat_descriptionUpSql() (*asset, error) {
|
|||
return nil, err
|
||||
}
|
||||
|
||||
info := bindataFileInfo{name: "1622464519_add_chat_description.up.sql", size: 93, mode: os.FileMode(0664), modTime: time.Unix(1659614623, 0)}
|
||||
info := bindataFileInfo{name: "1622464519_add_chat_description.up.sql", size: 93, mode: os.FileMode(0664), modTime: time.Unix(1660214353, 0)}
|
||||
a := &asset{bytes: bytes, info: info, digest: [32]uint8{0x36, 0x2e, 0x89, 0x31, 0xec, 0xef, 0xeb, 0x43, 0xf5, 0x96, 0x6d, 0xce, 0x91, 0x8a, 0x37, 0x2a, 0x11, 0x7a, 0x3f, 0xd9, 0x10, 0xbb, 0xa1, 0xbc, 0x7, 0xe0, 0x3b, 0xa5, 0xf4, 0xa6, 0xf4, 0xa1}}
|
||||
return a, nil
|
||||
}
|
||||
|
@ -840,7 +841,7 @@ func _1622622253_add_pinned_by_to_pin_messagesUpSql() (*asset, error) {
|
|||
return nil, err
|
||||
}
|
||||
|
||||
info := bindataFileInfo{name: "1622622253_add_pinned_by_to_pin_messages.up.sql", size: 52, mode: os.FileMode(0664), modTime: time.Unix(1659614623, 0)}
|
||||
info := bindataFileInfo{name: "1622622253_add_pinned_by_to_pin_messages.up.sql", size: 52, mode: os.FileMode(0664), modTime: time.Unix(1660214353, 0)}
|
||||
a := &asset{bytes: bytes, info: info, digest: [32]uint8{0x9b, 0x94, 0xa3, 0x45, 0x91, 0x1e, 0x66, 0xd1, 0x96, 0x5a, 0xaf, 0xfa, 0x29, 0x39, 0xa8, 0x3a, 0x97, 0x4c, 0x65, 0x6, 0x96, 0x90, 0x4c, 0xfe, 0xce, 0x7d, 0x5d, 0xd4, 0xb3, 0x8, 0x6d, 0x5f}}
|
||||
return a, nil
|
||||
}
|
||||
|
@ -860,7 +861,7 @@ func _1623938329_add_author_activity_center_notification_fieldUpSql() (*asset, e
|
|||
return nil, err
|
||||
}
|
||||
|
||||
info := bindataFileInfo{name: "1623938329_add_author_activity_center_notification_field.up.sql", size: 66, mode: os.FileMode(0664), modTime: time.Unix(1659614623, 0)}
|
||||
info := bindataFileInfo{name: "1623938329_add_author_activity_center_notification_field.up.sql", size: 66, mode: os.FileMode(0664), modTime: time.Unix(1660214353, 0)}
|
||||
a := &asset{bytes: bytes, info: info, digest: [32]uint8{0x36, 0xe6, 0xa7, 0xd5, 0x26, 0xff, 0xab, 0x92, 0x88, 0xf0, 0xd3, 0x34, 0xd9, 0x2f, 0xe7, 0x18, 0x1a, 0x40, 0xf9, 0xbe, 0x8e, 0xfc, 0xd0, 0x4f, 0x1f, 0x4a, 0xb9, 0x83, 0x3f, 0xa9, 0xde, 0xb}}
|
||||
return a, nil
|
||||
}
|
||||
|
@ -880,7 +881,7 @@ func _1623938330_add_edit_messagesUpSql() (*asset, error) {
|
|||
return nil, err
|
||||
}
|
||||
|
||||
info := bindataFileInfo{name: "1623938330_add_edit_messages.up.sql", size: 369, mode: os.FileMode(0664), modTime: time.Unix(1659614623, 0)}
|
||||
info := bindataFileInfo{name: "1623938330_add_edit_messages.up.sql", size: 369, mode: os.FileMode(0664), modTime: time.Unix(1660214353, 0)}
|
||||
a := &asset{bytes: bytes, info: info, digest: [32]uint8{0x7e, 0xd2, 0xce, 0xe, 0x5c, 0x19, 0xbe, 0x5e, 0x29, 0xbe, 0x9b, 0x31, 0x53, 0x76, 0xb2, 0xc8, 0x56, 0xf0, 0x82, 0xfe, 0x7d, 0x6c, 0xe8, 0x5c, 0xe9, 0x7a, 0x5d, 0x5, 0xc4, 0x92, 0x38, 0xe3}}
|
||||
return a, nil
|
||||
}
|
||||
|
@ -900,7 +901,7 @@ func _1624978434_add_muted_communityUpSql() (*asset, error) {
|
|||
return nil, err
|
||||
}
|
||||
|
||||
info := bindataFileInfo{name: "1624978434_add_muted_community.up.sql", size: 82, mode: os.FileMode(0664), modTime: time.Unix(1659614623, 0)}
|
||||
info := bindataFileInfo{name: "1624978434_add_muted_community.up.sql", size: 82, mode: os.FileMode(0664), modTime: time.Unix(1660214353, 0)}
|
||||
a := &asset{bytes: bytes, info: info, digest: [32]uint8{0x6, 0xdc, 0x6e, 0x6f, 0x97, 0xc7, 0x3d, 0x50, 0xab, 0x80, 0x87, 0x44, 0x43, 0x38, 0xe6, 0xc5, 0xc1, 0x91, 0x26, 0xf, 0x16, 0xe, 0xd9, 0x32, 0x37, 0x25, 0x96, 0x25, 0x6, 0xc8, 0xb5, 0x4a}}
|
||||
return a, nil
|
||||
}
|
||||
|
@ -920,7 +921,7 @@ func _1625018910_add_repply_message_activity_center_notification_fieldUpSql() (*
|
|||
return nil, err
|
||||
}
|
||||
|
||||
info := bindataFileInfo{name: "1625018910_add_repply_message_activity_center_notification_field.up.sql", size: 86, mode: os.FileMode(0664), modTime: time.Unix(1659614623, 0)}
|
||||
info := bindataFileInfo{name: "1625018910_add_repply_message_activity_center_notification_field.up.sql", size: 86, mode: os.FileMode(0664), modTime: time.Unix(1660214353, 0)}
|
||||
a := &asset{bytes: bytes, info: info, digest: [32]uint8{0xf2, 0x52, 0x12, 0x40, 0xd8, 0x6f, 0x71, 0x97, 0x46, 0x39, 0xaa, 0x74, 0x41, 0xcd, 0x45, 0x4c, 0xe8, 0xd9, 0xe2, 0x56, 0x8e, 0x78, 0x18, 0x62, 0xf6, 0xa8, 0x36, 0xe9, 0x9a, 0x1f, 0xc, 0xb1}}
|
||||
return a, nil
|
||||
}
|
||||
|
@ -940,7 +941,7 @@ func _1625762506_add_deleted_messagesUpSql() (*asset, error) {
|
|||
return nil, err
|
||||
}
|
||||
|
||||
info := bindataFileInfo{name: "1625762506_add_deleted_messages.up.sql", size: 357, mode: os.FileMode(0664), modTime: time.Unix(1659614623, 0)}
|
||||
info := bindataFileInfo{name: "1625762506_add_deleted_messages.up.sql", size: 357, mode: os.FileMode(0664), modTime: time.Unix(1660214353, 0)}
|
||||
a := &asset{bytes: bytes, info: info, digest: [32]uint8{0xd5, 0x61, 0x42, 0xb6, 0x8c, 0x7f, 0x2d, 0xec, 0xa9, 0x6d, 0x3d, 0x0, 0xa3, 0x32, 0xd8, 0x4a, 0x38, 0x5c, 0x97, 0xfc, 0x68, 0xde, 0xa9, 0xb7, 0xd8, 0xde, 0xb, 0x29, 0x93, 0xdc, 0x81, 0xf8}}
|
||||
return a, nil
|
||||
}
|
||||
|
@ -960,7 +961,7 @@ func _1627388946_add_communities_synced_atUpSql() (*asset, error) {
|
|||
return nil, err
|
||||
}
|
||||
|
||||
info := bindataFileInfo{name: "1627388946_add_communities_synced_at.up.sql", size: 87, mode: os.FileMode(0664), modTime: time.Unix(1659614623, 0)}
|
||||
info := bindataFileInfo{name: "1627388946_add_communities_synced_at.up.sql", size: 87, mode: os.FileMode(0664), modTime: time.Unix(1660214353, 0)}
|
||||
a := &asset{bytes: bytes, info: info, digest: [32]uint8{0xc1, 0xbd, 0x9b, 0x6a, 0xc9, 0x1a, 0x7a, 0x34, 0xcf, 0x5f, 0x80, 0x9e, 0x8c, 0x1c, 0xc0, 0xec, 0x4e, 0x78, 0xb0, 0x2d, 0x15, 0x77, 0x38, 0x4a, 0x6a, 0x5, 0x84, 0xf5, 0x8d, 0x8b, 0xbe, 0x9}}
|
||||
return a, nil
|
||||
}
|
||||
|
@ -980,7 +981,7 @@ func _1628280060_createUsermessagesIndexSql() (*asset, error) {
|
|||
return nil, err
|
||||
}
|
||||
|
||||
info := bindataFileInfo{name: "1628280060_create-usermessages-index.sql", size: 80, mode: os.FileMode(0664), modTime: time.Unix(1659614623, 0)}
|
||||
info := bindataFileInfo{name: "1628280060_create-usermessages-index.sql", size: 80, mode: os.FileMode(0664), modTime: time.Unix(1660214353, 0)}
|
||||
a := &asset{bytes: bytes, info: info, digest: [32]uint8{0x10, 0x6f, 0x70, 0x47, 0x40, 0xab, 0xa8, 0x60, 0xe0, 0xf9, 0x8, 0x7e, 0x19, 0x9d, 0xba, 0x33, 0x16, 0xfc, 0x3c, 0xdc, 0xa8, 0xa6, 0x53, 0x61, 0x39, 0x82, 0x91, 0xcf, 0x69, 0xd8, 0xf2, 0xcf}}
|
||||
return a, nil
|
||||
}
|
||||
|
@ -1000,7 +1001,7 @@ func _1632303896_modify_contacts_tableUpSql() (*asset, error) {
|
|||
return nil, err
|
||||
}
|
||||
|
||||
info := bindataFileInfo{name: "1632303896_modify_contacts_table.up.sql", size: 1574, mode: os.FileMode(0664), modTime: time.Unix(1659614623, 0)}
|
||||
info := bindataFileInfo{name: "1632303896_modify_contacts_table.up.sql", size: 1574, mode: os.FileMode(0664), modTime: time.Unix(1660214353, 0)}
|
||||
a := &asset{bytes: bytes, info: info, digest: [32]uint8{0x81, 0x1e, 0x6c, 0x3c, 0xd, 0xd7, 0x7d, 0xbb, 0x19, 0xbc, 0xe4, 0x7, 0xfd, 0xf8, 0x66, 0x6d, 0x78, 0xf6, 0x4, 0xe6, 0x51, 0xe4, 0xe6, 0xdc, 0xe, 0x5a, 0x2e, 0xac, 0xe6, 0xe7, 0x24, 0x69}}
|
||||
return a, nil
|
||||
}
|
||||
|
@ -1020,7 +1021,7 @@ func _1633349838_add_emoji_column_in_chatsUpSql() (*asset, error) {
|
|||
return nil, err
|
||||
}
|
||||
|
||||
info := bindataFileInfo{name: "1633349838_add_emoji_column_in_chats.up.sql", size: 52, mode: os.FileMode(0664), modTime: time.Unix(1659614623, 0)}
|
||||
info := bindataFileInfo{name: "1633349838_add_emoji_column_in_chats.up.sql", size: 52, mode: os.FileMode(0664), modTime: time.Unix(1660214353, 0)}
|
||||
a := &asset{bytes: bytes, info: info, digest: [32]uint8{0xcb, 0x33, 0xcb, 0x3b, 0xa9, 0x99, 0x77, 0x6a, 0xea, 0xc4, 0x39, 0xd7, 0xa1, 0x49, 0xa7, 0xdf, 0xff, 0x72, 0xda, 0x34, 0x21, 0x67, 0x66, 0xca, 0x65, 0x46, 0x1, 0xa6, 0x4e, 0xf9, 0x38, 0x86}}
|
||||
return a, nil
|
||||
}
|
||||
|
@ -1040,7 +1041,7 @@ func _1634831235_add_highlight_column_in_chatsUpSql() (*asset, error) {
|
|||
return nil, err
|
||||
}
|
||||
|
||||
info := bindataFileInfo{name: "1634831235_add_highlight_column_in_chats.up.sql", size: 62, mode: os.FileMode(0664), modTime: time.Unix(1659614623, 0)}
|
||||
info := bindataFileInfo{name: "1634831235_add_highlight_column_in_chats.up.sql", size: 62, mode: os.FileMode(0664), modTime: time.Unix(1660214353, 0)}
|
||||
a := &asset{bytes: bytes, info: info, digest: [32]uint8{0xaa, 0x63, 0x5c, 0x73, 0x19, 0x83, 0xbd, 0x35, 0x80, 0x9f, 0x66, 0xec, 0x4c, 0xbc, 0x9d, 0x2d, 0x52, 0x91, 0x6d, 0xb3, 0x2b, 0x87, 0xde, 0x24, 0x46, 0x5c, 0xd, 0xfd, 0x78, 0xf5, 0xe3, 0xe9}}
|
||||
return a, nil
|
||||
}
|
||||
|
@ -1060,7 +1061,7 @@ func _1634896007_add_last_updated_locally_and_removedUpSql() (*asset, error) {
|
|||
return nil, err
|
||||
}
|
||||
|
||||
info := bindataFileInfo{name: "1634896007_add_last_updated_locally_and_removed.up.sql", size: 131, mode: os.FileMode(0664), modTime: time.Unix(1659614623, 0)}
|
||||
info := bindataFileInfo{name: "1634896007_add_last_updated_locally_and_removed.up.sql", size: 131, mode: os.FileMode(0664), modTime: time.Unix(1660214353, 0)}
|
||||
a := &asset{bytes: bytes, info: info, digest: [32]uint8{0x2e, 0xa8, 0x34, 0xe2, 0xc0, 0x62, 0xc8, 0xd6, 0x5a, 0x87, 0xe3, 0x70, 0xe1, 0xc4, 0x16, 0x9c, 0x60, 0x2e, 0x98, 0xf0, 0x91, 0x84, 0xbe, 0xe0, 0xdf, 0x3e, 0x4d, 0x24, 0xc4, 0x6c, 0x40, 0x17}}
|
||||
return a, nil
|
||||
}
|
||||
|
@ -1080,7 +1081,7 @@ func _1635840039_add_clock_read_at_column_in_chatsUpSql() (*asset, error) {
|
|||
return nil, err
|
||||
}
|
||||
|
||||
info := bindataFileInfo{name: "1635840039_add_clock_read_at_column_in_chats.up.sql", size: 245, mode: os.FileMode(0664), modTime: time.Unix(1659614623, 0)}
|
||||
info := bindataFileInfo{name: "1635840039_add_clock_read_at_column_in_chats.up.sql", size: 245, mode: os.FileMode(0664), modTime: time.Unix(1660214353, 0)}
|
||||
a := &asset{bytes: bytes, info: info, digest: [32]uint8{0x6c, 0xba, 0x3f, 0xba, 0x1a, 0x71, 0xa8, 0x9, 0x19, 0xbe, 0x1e, 0x38, 0x50, 0x30, 0x3a, 0x52, 0x15, 0x29, 0xee, 0x49, 0x19, 0x6f, 0x53, 0xc2, 0xc6, 0x6c, 0xd9, 0x80, 0x7e, 0xb9, 0x58, 0x7a}}
|
||||
return a, nil
|
||||
}
|
||||
|
@ -1100,7 +1101,7 @@ func _1637852321_add_received_invitation_admin_column_in_chatsUpSql() (*asset, e
|
|||
return nil, err
|
||||
}
|
||||
|
||||
info := bindataFileInfo{name: "1637852321_add_received_invitation_admin_column_in_chats.up.sql", size: 72, mode: os.FileMode(0664), modTime: time.Unix(1659614623, 0)}
|
||||
info := bindataFileInfo{name: "1637852321_add_received_invitation_admin_column_in_chats.up.sql", size: 72, mode: os.FileMode(0664), modTime: time.Unix(1660214353, 0)}
|
||||
a := &asset{bytes: bytes, info: info, digest: [32]uint8{0x70, 0x8b, 0x92, 0x56, 0x83, 0x70, 0x7f, 0x6, 0xb2, 0xd, 0x1c, 0x2f, 0xcc, 0x93, 0xc3, 0x85, 0x8c, 0xc2, 0x38, 0x94, 0x7e, 0x88, 0x3f, 0x39, 0x34, 0xf8, 0x90, 0xcf, 0x83, 0x68, 0x3d, 0xe5}}
|
||||
return a, nil
|
||||
}
|
||||
|
@ -1120,7 +1121,7 @@ func _1645034601_display_nameUpSql() (*asset, error) {
|
|||
return nil, err
|
||||
}
|
||||
|
||||
info := bindataFileInfo{name: "1645034601_display_name.up.sql", size: 110, mode: os.FileMode(0664), modTime: time.Unix(1659614623, 0)}
|
||||
info := bindataFileInfo{name: "1645034601_display_name.up.sql", size: 110, mode: os.FileMode(0664), modTime: time.Unix(1660214353, 0)}
|
||||
a := &asset{bytes: bytes, info: info, digest: [32]uint8{0x15, 0xfc, 0xda, 0x70, 0x53, 0x19, 0x90, 0x20, 0x4, 0x1c, 0x99, 0x42, 0x53, 0x1a, 0xd6, 0xb8, 0xbb, 0x8a, 0xe8, 0xbe, 0xcc, 0xb7, 0xc, 0x7f, 0x73, 0x50, 0x18, 0xf1, 0x8b, 0x18, 0x54, 0x64}}
|
||||
return a, nil
|
||||
}
|
||||
|
@ -1140,7 +1141,7 @@ func _1645034602_add_mutual_contact_requestUpSql() (*asset, error) {
|
|||
return nil, err
|
||||
}
|
||||
|
||||
info := bindataFileInfo{name: "1645034602_add_mutual_contact_request.up.sql", size: 454, mode: os.FileMode(0664), modTime: time.Unix(1659614623, 0)}
|
||||
info := bindataFileInfo{name: "1645034602_add_mutual_contact_request.up.sql", size: 454, mode: os.FileMode(0664), modTime: time.Unix(1660214353, 0)}
|
||||
a := &asset{bytes: bytes, info: info, digest: [32]uint8{0x1a, 0xe0, 0x5d, 0x68, 0xb8, 0x50, 0xa4, 0xbb, 0x3e, 0x4f, 0x2, 0x87, 0xad, 0x87, 0x6e, 0x38, 0xdf, 0xc8, 0x4c, 0xe2, 0x5f, 0xd1, 0x6, 0xdc, 0xe7, 0xbd, 0x4a, 0x9c, 0xf3, 0x91, 0xa1, 0x51}}
|
||||
return a, nil
|
||||
}
|
||||
|
@ -1160,7 +1161,7 @@ func _1650373957_add_contact_request_stateUpSql() (*asset, error) {
|
|||
return nil, err
|
||||
}
|
||||
|
||||
info := bindataFileInfo{name: "1650373957_add_contact_request_state.up.sql", size: 59, mode: os.FileMode(0664), modTime: time.Unix(1659614623, 0)}
|
||||
info := bindataFileInfo{name: "1650373957_add_contact_request_state.up.sql", size: 59, mode: os.FileMode(0664), modTime: time.Unix(1660214353, 0)}
|
||||
a := &asset{bytes: bytes, info: info, digest: [32]uint8{0x5e, 0xc1, 0x3f, 0x29, 0xe, 0x19, 0x86, 0x1a, 0x4c, 0x6c, 0x2a, 0x90, 0x9d, 0xdf, 0xb1, 0xb, 0x72, 0x25, 0xcd, 0x6c, 0x5f, 0xd, 0x51, 0x9e, 0x85, 0xc0, 0x9, 0xb7, 0xbc, 0x87, 0x23, 0xec}}
|
||||
return a, nil
|
||||
}
|
||||
|
@ -1180,7 +1181,7 @@ func _1656958989_contact_verificationUpSql() (*asset, error) {
|
|||
return nil, err
|
||||
}
|
||||
|
||||
info := bindataFileInfo{name: "1656958989_contact_verification.up.sql", size: 624, mode: os.FileMode(0664), modTime: time.Unix(1659614623, 0)}
|
||||
info := bindataFileInfo{name: "1656958989_contact_verification.up.sql", size: 624, mode: os.FileMode(0664), modTime: time.Unix(1660214353, 0)}
|
||||
a := &asset{bytes: bytes, info: info, digest: [32]uint8{0x3a, 0x3f, 0x28, 0x38, 0x33, 0xdb, 0xe9, 0x4d, 0xc0, 0x54, 0x8c, 0x2a, 0x73, 0xc4, 0xdd, 0x5c, 0xc5, 0x1a, 0x93, 0x4b, 0x6, 0x13, 0xbe, 0x42, 0xd2, 0x7f, 0xd4, 0xc, 0xc5, 0x4e, 0x6d, 0xce}}
|
||||
return a, nil
|
||||
}
|
||||
|
@ -1200,7 +1201,7 @@ func _1658236268_add_discord_message_authors_tableUpSql() (*asset, error) {
|
|||
return nil, err
|
||||
}
|
||||
|
||||
info := bindataFileInfo{name: "1658236268_add_discord_message_authors_table.up.sql", size: 191, mode: os.FileMode(0664), modTime: time.Unix(1660117874, 0)}
|
||||
info := bindataFileInfo{name: "1658236268_add_discord_message_authors_table.up.sql", size: 191, mode: os.FileMode(0664), modTime: time.Unix(1660214353, 0)}
|
||||
a := &asset{bytes: bytes, info: info, digest: [32]uint8{0x3d, 0xb7, 0xdb, 0x79, 0x1, 0x15, 0xe7, 0x76, 0x5d, 0x22, 0x54, 0x82, 0x9a, 0xbe, 0x24, 0xc1, 0x82, 0xcf, 0x67, 0x91, 0x53, 0xcc, 0xac, 0x74, 0x18, 0x61, 0x69, 0x68, 0x19, 0xca, 0x2b, 0xa8}}
|
||||
return a, nil
|
||||
}
|
||||
|
@ -1220,11 +1221,31 @@ func _1659619997_add_discord_messages_tableUpSql() (*asset, error) {
|
|||
return nil, err
|
||||
}
|
||||
|
||||
info := bindataFileInfo{name: "1659619997_add_discord_messages_table.up.sql", size: 371, mode: os.FileMode(0664), modTime: time.Unix(1660118031, 0)}
|
||||
info := bindataFileInfo{name: "1659619997_add_discord_messages_table.up.sql", size: 371, mode: os.FileMode(0664), modTime: time.Unix(1660226568, 0)}
|
||||
a := &asset{bytes: bytes, info: info, digest: [32]uint8{0xde, 0x12, 0x9c, 0x96, 0xe2, 0x42, 0x3f, 0x94, 0x62, 0xc2, 0x76, 0xab, 0x3b, 0x4c, 0x85, 0x36, 0x48, 0xcc, 0x73, 0x60, 0x93, 0x5a, 0xd6, 0x7, 0xd6, 0x0, 0xee, 0x1b, 0x1e, 0x34, 0x58, 0x99}}
|
||||
return a, nil
|
||||
}
|
||||
|
||||
var __1660226788_create_chat_identity_social_linksUpSql = []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\x8c\x8e\x41\x6a\xc3\x30\x10\x45\xf7\x3a\xc5\x5f\xc6\x90\x1b\x64\xa5\x8a\x09\x15\x55\xe5\x54\x19\x97\x64\x25\x84\x22\xa8\x88\x88\xc1\x96\x4d\x7b\xfb\xe2\xd2\xba\x9b\x52\xb2\x7d\x33\x6f\xe6\x29\x47\x92\x09\x2c\x1f\x0c\x41\xef\x61\x5b\x06\x9d\xf4\x91\x8f\x88\x6f\xa1\xfa\x7c\x49\xb7\x9a\xeb\x87\x1f\xfb\x98\x43\xf1\x25\xdf\xae\x23\x36\x02\x3f\x63\xbc\x4a\xa7\x1e\xa5\xfb\x32\x6d\x67\xcc\x56\x00\xcb\x96\xaf\xe9\xbd\x82\xe9\xc4\x2b\x99\x86\xb2\x82\xce\xea\x97\x8e\x36\xdf\x57\xb6\xbf\x4a\x83\xd6\x42\xb5\x76\x6f\xb4\x62\x38\x3a\x18\xa9\x48\x34\x3b\x21\xee\x6e\x2d\x61\xac\x7e\x48\x31\xe5\x39\x5d\xfe\x8d\xc5\xc1\xe9\x67\xe9\xce\x78\xa2\xf3\x5f\x7f\x97\xd2\x58\xfa\x78\xf5\x73\x28\x53\x82\xb6\xbc\xba\xa2\xd9\x7d\x06\x00\x00\xff\xff\x93\xc8\x9a\xf7\x3e\x01\x00\x00")
|
||||
|
||||
func _1660226788_create_chat_identity_social_linksUpSqlBytes() ([]byte, error) {
|
||||
return bindataRead(
|
||||
__1660226788_create_chat_identity_social_linksUpSql,
|
||||
"1660226788_create_chat_identity_social_links.up.sql",
|
||||
)
|
||||
}
|
||||
|
||||
func _1660226788_create_chat_identity_social_linksUpSql() (*asset, error) {
|
||||
bytes, err := _1660226788_create_chat_identity_social_linksUpSqlBytes()
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
info := bindataFileInfo{name: "1660226788_create_chat_identity_social_links.up.sql", size: 318, mode: os.FileMode(0664), modTime: time.Unix(1660226568, 0)}
|
||||
a := &asset{bytes: bytes, info: info, digest: [32]uint8{0x3c, 0x76, 0x40, 0xe9, 0x85, 0xc4, 0x38, 0xf8, 0xe5, 0x5d, 0xe8, 0x13, 0x46, 0x1b, 0xc, 0x1, 0xe9, 0x2f, 0x74, 0xd1, 0x79, 0x59, 0xa4, 0xdb, 0x4a, 0x4a, 0xf4, 0x98, 0x58, 0x3c, 0x57, 0xd3}}
|
||||
return a, nil
|
||||
}
|
||||
|
||||
var _readmeMd = []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\x54\x91\xc1\xce\xd3\x30\x10\x84\xef\x7e\x8a\x91\x7a\x01\xa9\x2a\x8f\xc0\x0d\x71\x82\x03\x48\x1c\xc9\x36\x9e\x36\x96\x1c\x6f\xf0\xae\x93\xe6\xed\x91\xa3\xc2\xdf\xff\x66\xed\xd8\x33\xdf\x78\x4f\xa7\x13\xbe\xea\x06\x57\x6c\x35\x39\x31\xa7\x7b\x15\x4f\x5a\xec\x73\x08\xbf\x08\x2d\x79\x7f\x4a\x43\x5b\x86\x17\xfd\x8c\x21\xea\x56\x5e\x47\x90\x4a\x14\x75\x48\xde\x64\x37\x2c\x6a\x96\xae\x99\x48\x05\xf6\x27\x77\x13\xad\x08\xae\x8a\x51\xe7\x25\xf3\xf1\xa9\x9f\xf9\x58\x58\x2c\xad\xbc\xe0\x8b\x56\xf0\x21\x5d\xeb\x4c\x95\xb3\xae\x84\x60\xd4\xdc\xe6\x82\x5d\x1b\x36\x6d\x39\x62\x92\xf5\xb8\x11\xdb\x92\xd3\x28\xce\xe0\x13\xe1\x72\xcd\x3c\x63\xd4\x65\x87\xae\xac\xe8\xc3\x28\x2e\x67\x44\x66\x3a\x21\x25\xa2\x72\xac\x14\x67\xbc\x84\x9f\x53\x32\x8c\x52\x70\x25\x56\xd6\xfd\x8d\x05\x37\xad\x30\x9d\x9f\xa6\x86\x0f\xcd\x58\x7f\xcf\x34\x93\x3b\xed\x90\x9f\xa4\x1f\xcf\x30\x85\x4d\x07\x58\xaf\x7f\x25\xc4\x9d\xf3\x72\x64\x84\xd0\x7f\xf9\x9b\x3a\x2d\x84\xef\x85\x48\x66\x8d\xd8\x88\x9b\x8c\x8c\x98\x5b\xf6\x74\x14\x4e\x33\x0d\xc9\xe0\x93\x38\xda\x12\xc5\x69\xbd\xe4\xf0\x2e\x7a\x78\x07\x1c\xfe\x13\x9f\x91\x29\x31\x95\x7b\x7f\x62\x59\x37\xb4\xe5\x5e\x25\xfe\x33\xee\xd5\x53\x71\xd6\xda\x3a\xd8\xcb\xde\x2e\xf8\xa1\x90\x55\x53\x0c\xc7\xaa\x0d\xe9\x76\x14\x29\x1c\x7b\x68\xdd\x2f\xe1\x6f\x00\x00\x00\xff\xff\x3c\x0a\xc2\xfe\x2a\x02\x00\x00")
|
||||
|
||||
func readmeMdBytes() ([]byte, error) {
|
||||
|
@ -1240,7 +1261,7 @@ func readmeMd() (*asset, error) {
|
|||
return nil, err
|
||||
}
|
||||
|
||||
info := bindataFileInfo{name: "README.md", size: 554, mode: os.FileMode(0664), modTime: time.Unix(1659614623, 0)}
|
||||
info := bindataFileInfo{name: "README.md", size: 554, mode: os.FileMode(0664), modTime: time.Unix(1660214353, 0)}
|
||||
a := &asset{bytes: bytes, info: info, digest: [32]uint8{0x1c, 0x6e, 0xfb, 0xcc, 0x81, 0x94, 0x4d, 0x8c, 0xa0, 0x3b, 0x5, 0xb0, 0x18, 0xd6, 0xbb, 0xb3, 0x79, 0xc8, 0x8f, 0xff, 0xc1, 0x10, 0xf9, 0xf, 0x20, 0x1b, 0x4a, 0x74, 0x96, 0x42, 0xd7, 0xa8}}
|
||||
return a, nil
|
||||
}
|
||||
|
@ -1260,7 +1281,7 @@ func docGo() (*asset, error) {
|
|||
return nil, err
|
||||
}
|
||||
|
||||
info := bindataFileInfo{name: "doc.go", size: 850, mode: os.FileMode(0664), modTime: time.Unix(1659614623, 0)}
|
||||
info := bindataFileInfo{name: "doc.go", size: 850, mode: os.FileMode(0664), modTime: time.Unix(1660214353, 0)}
|
||||
a := &asset{bytes: bytes, info: info, digest: [32]uint8{0xa0, 0xcc, 0x41, 0xe1, 0x61, 0x12, 0x97, 0xe, 0x36, 0x8c, 0xa7, 0x9e, 0xe0, 0x6e, 0x59, 0x9e, 0xee, 0xd5, 0x4a, 0xcf, 0x1e, 0x60, 0xd6, 0xc3, 0x3a, 0xc9, 0x6c, 0xf2, 0x86, 0x5a, 0xb4, 0x1e}}
|
||||
return a, nil
|
||||
}
|
||||
|
@ -1466,6 +1487,8 @@ var _bindata = map[string]func() (*asset, error){
|
|||
|
||||
"1659619997_add_discord_messages_table.up.sql": _1659619997_add_discord_messages_tableUpSql,
|
||||
|
||||
"1660226788_create_chat_identity_social_links.up.sql": _1660226788_create_chat_identity_social_linksUpSql,
|
||||
|
||||
"README.md": readmeMd,
|
||||
|
||||
"doc.go": docGo,
|
||||
|
@ -1567,6 +1590,7 @@ var _bintree = &bintree{nil, map[string]*bintree{
|
|||
"1656958989_contact_verification.up.sql": &bintree{_1656958989_contact_verificationUpSql, map[string]*bintree{}},
|
||||
"1658236268_add_discord_message_authors_table.up.sql": &bintree{_1658236268_add_discord_message_authors_tableUpSql, map[string]*bintree{}},
|
||||
"1659619997_add_discord_messages_table.up.sql": &bintree{_1659619997_add_discord_messages_tableUpSql, map[string]*bintree{}},
|
||||
"1660226788_create_chat_identity_social_links.up.sql": &bintree{_1660226788_create_chat_identity_social_linksUpSql, map[string]*bintree{}},
|
||||
"README.md": &bintree{readmeMd, map[string]*bintree{}},
|
||||
"doc.go": &bintree{docGo, map[string]*bintree{}},
|
||||
}}
|
||||
|
|
|
@ -0,0 +1,11 @@
|
|||
CREATE TABLE IF NOT EXISTS chat_identity_social_links (
|
||||
chat_id VARCHAR NOT NULL,
|
||||
link_text TEXT,
|
||||
link_url TEXT,
|
||||
UNIQUE(chat_id, link_text) ON CONFLICT REPLACE
|
||||
);
|
||||
|
||||
CREATE TABLE IF NOT EXISTS chat_identity_last_received (
|
||||
chat_id VARCHAR NOT NULL PRIMARY KEY ON CONFLICT REPLACE,
|
||||
clock_value INT NOT NULL
|
||||
);
|
|
@ -17,6 +17,7 @@ import (
|
|||
"github.com/status-im/status-go/eth-node/crypto"
|
||||
"github.com/status-im/status-go/images"
|
||||
"github.com/status-im/status-go/protocol/common"
|
||||
"github.com/status-im/status-go/protocol/identity"
|
||||
"github.com/status-im/status-go/protocol/protobuf"
|
||||
"github.com/status-im/status-go/services/browsers"
|
||||
)
|
||||
|
@ -496,14 +497,14 @@ func (db sqlitePersistence) Contacts() ([]*Contact, error) {
|
|||
c.removed,
|
||||
c.has_added_us,
|
||||
c.local_nickname,
|
||||
c.contact_request_state,
|
||||
c.contact_request_clock,
|
||||
c.contact_request_state,
|
||||
c.contact_request_clock,
|
||||
i.image_type,
|
||||
i.payload,
|
||||
COALESCE(c.verification_status, 0) as verification_status,
|
||||
COALESCE(t.trust_status, 0) as trust_status
|
||||
FROM contacts c
|
||||
LEFT JOIN chat_identity_contacts i ON c.id = i.contact_id
|
||||
FROM contacts c
|
||||
LEFT JOIN chat_identity_contacts i ON c.id = i.contact_id
|
||||
LEFT JOIN ens_verification_records v ON c.id = v.public_key
|
||||
LEFT JOIN trusted_users t ON c.id = t.id;
|
||||
`)
|
||||
|
@ -618,6 +619,37 @@ func (db sqlitePersistence) Contacts() ([]*Contact, error) {
|
|||
}
|
||||
}
|
||||
|
||||
// Read social links
|
||||
for _, contact := range allContacts {
|
||||
rows, err := db.db.Query(`SELECT link_text, link_url FROM chat_identity_social_links WHERE chat_id = ?`, contact.ID)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
defer rows.Close()
|
||||
|
||||
for rows.Next() {
|
||||
var (
|
||||
text sql.NullString
|
||||
url sql.NullString
|
||||
)
|
||||
err := rows.Scan(
|
||||
&text, &url,
|
||||
)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
link := identity.SocialLink{}
|
||||
if text.Valid {
|
||||
link.Text = text.String
|
||||
}
|
||||
if url.Valid {
|
||||
link.URL = url.String
|
||||
}
|
||||
contact.SocialLinks = append(contact.SocialLinks, link)
|
||||
}
|
||||
}
|
||||
|
||||
var response []*Contact
|
||||
for key := range allContacts {
|
||||
response = append(response, allContacts[key])
|
||||
|
@ -626,14 +658,14 @@ func (db sqlitePersistence) Contacts() ([]*Contact, error) {
|
|||
return response, nil
|
||||
}
|
||||
|
||||
func (db sqlitePersistence) SaveContactChatIdentity(contactID string, chatIdentity *protobuf.ChatIdentity) (updated bool, err error) {
|
||||
func (db sqlitePersistence) SaveContactChatIdentity(contactID string, chatIdentity *protobuf.ChatIdentity) (clockUpdated, imagesUpdated bool, err error) {
|
||||
if chatIdentity.Clock == 0 {
|
||||
return false, errors.New("clock value unset")
|
||||
return false, false, errors.New("clock value unset")
|
||||
}
|
||||
|
||||
tx, err := db.db.BeginTx(context.Background(), &sql.TxOptions{})
|
||||
if err != nil {
|
||||
return false, err
|
||||
return false, false, err
|
||||
}
|
||||
defer func() {
|
||||
if err == nil {
|
||||
|
@ -644,11 +676,42 @@ func (db sqlitePersistence) SaveContactChatIdentity(contactID string, chatIdenti
|
|||
_ = tx.Rollback()
|
||||
}()
|
||||
|
||||
updateClock := func() (updated bool, err error) {
|
||||
var newerClockEntryExists bool
|
||||
err = tx.QueryRow(`SELECT EXISTS(SELECT 1 FROM chat_identity_last_received WHERE chat_id = ? AND clock_value >= ?)`, contactID, chatIdentity.Clock).Scan(&newerClockEntryExists)
|
||||
if err != nil {
|
||||
return false, err
|
||||
}
|
||||
if newerClockEntryExists {
|
||||
return false, nil
|
||||
}
|
||||
|
||||
stmt, err := tx.Prepare("INSERT INTO chat_identity_last_received (chat_id, clock_value) VALUES (?, ?)")
|
||||
if err != nil {
|
||||
return false, err
|
||||
}
|
||||
defer stmt.Close()
|
||||
_, err = stmt.Exec(
|
||||
contactID,
|
||||
chatIdentity.Clock,
|
||||
)
|
||||
if err != nil {
|
||||
return false, err
|
||||
}
|
||||
|
||||
return true, nil
|
||||
}
|
||||
|
||||
clockUpdated, err = updateClock()
|
||||
if err != nil {
|
||||
return false, false, err
|
||||
}
|
||||
|
||||
for imageType, image := range chatIdentity.Images {
|
||||
var exists bool
|
||||
err := tx.QueryRow(`SELECT EXISTS(SELECT 1 FROM chat_identity_contacts WHERE contact_id = ? AND image_type = ? AND clock_value >= ?)`, contactID, imageType, chatIdentity.Clock).Scan(&exists)
|
||||
if err != nil {
|
||||
return false, err
|
||||
return clockUpdated, false, err
|
||||
}
|
||||
|
||||
if exists {
|
||||
|
@ -657,7 +720,7 @@ func (db sqlitePersistence) SaveContactChatIdentity(contactID string, chatIdenti
|
|||
|
||||
stmt, err := tx.Prepare(`INSERT INTO chat_identity_contacts (contact_id, image_type, clock_value, payload) VALUES (?, ?, ?, ?)`)
|
||||
if err != nil {
|
||||
return false, err
|
||||
return clockUpdated, false, err
|
||||
}
|
||||
defer stmt.Close()
|
||||
if image.Payload == nil {
|
||||
|
@ -668,7 +731,7 @@ func (db sqlitePersistence) SaveContactChatIdentity(contactID string, chatIdenti
|
|||
// Validate image URI to make sure it's serializable
|
||||
_, err = images.GetPayloadDataURI(image.Payload)
|
||||
if err != nil {
|
||||
return false, err
|
||||
return clockUpdated, false, err
|
||||
}
|
||||
|
||||
_, err = stmt.Exec(
|
||||
|
@ -678,9 +741,28 @@ func (db sqlitePersistence) SaveContactChatIdentity(contactID string, chatIdenti
|
|||
image.Payload,
|
||||
)
|
||||
if err != nil {
|
||||
return false, err
|
||||
return false, false, err
|
||||
}
|
||||
imagesUpdated = true
|
||||
}
|
||||
|
||||
if clockUpdated && chatIdentity.SocialLinks != nil {
|
||||
stmt, err := tx.Prepare(`INSERT INTO chat_identity_social_links (chat_id, link_text, link_url) VALUES (?, ?, ?)`)
|
||||
if err != nil {
|
||||
return clockUpdated, imagesUpdated, err
|
||||
}
|
||||
defer stmt.Close()
|
||||
|
||||
for _, link := range chatIdentity.SocialLinks {
|
||||
_, err = stmt.Exec(
|
||||
contactID,
|
||||
link.Text,
|
||||
link.Url,
|
||||
)
|
||||
if err != nil {
|
||||
return clockUpdated, imagesUpdated, err
|
||||
}
|
||||
}
|
||||
updated = true
|
||||
}
|
||||
|
||||
return
|
||||
|
|
|
@ -836,7 +836,7 @@ func TestSqlitePersistence_GetWhenChatIdentityLastPublished(t *testing.T) {
|
|||
require.Nil(t, actualHash2)
|
||||
}
|
||||
|
||||
func TestSaveContactIdentityImage(t *testing.T) {
|
||||
func TestSaveContactChatIdentity(t *testing.T) {
|
||||
db, err := openTestDB()
|
||||
require.NoError(t, err)
|
||||
p := newSQLitePersistence(db)
|
||||
|
@ -863,25 +863,58 @@ func TestSaveContactIdentityImage(t *testing.T) {
|
|||
ImageType: protobuf.ImageType_PNG,
|
||||
}
|
||||
|
||||
images := &protobuf.ChatIdentity{
|
||||
Clock: 1,
|
||||
Images: identityImages,
|
||||
toArrayOfPointers := func(array []protobuf.SocialLink) (result []*protobuf.SocialLink) {
|
||||
result = make([]*protobuf.SocialLink, len(array))
|
||||
for i := range array {
|
||||
result[i] = &array[i]
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
result, err := p.SaveContactChatIdentity(contactID, images)
|
||||
require.NoError(t, err)
|
||||
require.True(t, result)
|
||||
chatIdentity := &protobuf.ChatIdentity{
|
||||
Clock: 1,
|
||||
Images: identityImages,
|
||||
SocialLinks: toArrayOfPointers([]protobuf.SocialLink{
|
||||
{
|
||||
Text: "Personal Site",
|
||||
Url: "status.im",
|
||||
},
|
||||
{
|
||||
Text: "Twitter",
|
||||
Url: "Status_ico",
|
||||
},
|
||||
}),
|
||||
}
|
||||
|
||||
// Save again same clock, it should return false
|
||||
result, err = p.SaveContactChatIdentity(contactID, images)
|
||||
clockUpdated, imagesUpdated, err := p.SaveContactChatIdentity(contactID, chatIdentity)
|
||||
require.NoError(t, err)
|
||||
require.False(t, result)
|
||||
require.True(t, clockUpdated)
|
||||
require.True(t, imagesUpdated)
|
||||
|
||||
// Save again same clock and data
|
||||
clockUpdated, imagesUpdated, err = p.SaveContactChatIdentity(contactID, chatIdentity)
|
||||
require.NoError(t, err)
|
||||
require.False(t, clockUpdated)
|
||||
require.False(t, imagesUpdated)
|
||||
|
||||
// Save again newer clock and no images
|
||||
chatIdentity.Clock = 2
|
||||
chatIdentity.Images = make(map[string]*protobuf.IdentityImage)
|
||||
clockUpdated, imagesUpdated, err = p.SaveContactChatIdentity(contactID, chatIdentity)
|
||||
require.NoError(t, err)
|
||||
require.True(t, clockUpdated)
|
||||
require.False(t, imagesUpdated)
|
||||
|
||||
contacts, err := p.Contacts()
|
||||
require.NoError(t, err)
|
||||
require.Len(t, contacts, 1)
|
||||
|
||||
require.Len(t, contacts[0].Images, 2)
|
||||
require.Len(t, contacts[0].SocialLinks, 2)
|
||||
require.Equal(t, "Personal Site", contacts[0].SocialLinks[0].Text)
|
||||
require.Equal(t, "status.im", contacts[0].SocialLinks[0].URL)
|
||||
require.Equal(t, "Twitter", contacts[0].SocialLinks[1].Text)
|
||||
require.Equal(t, "Status_ico", contacts[0].SocialLinks[1].URL)
|
||||
}
|
||||
|
||||
func TestSaveLinks(t *testing.T) {
|
||||
|
|
|
@ -64,13 +64,14 @@ type ChatIdentity struct {
|
|||
Images map[string]*IdentityImage `protobuf:"bytes,3,rep,name=images,proto3" json:"images,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
|
||||
// display name is the user set identity
|
||||
DisplayName string `protobuf:"bytes,4,opt,name=display_name,json=displayName,proto3" json:"display_name,omitempty"`
|
||||
// description is the user set description, valid only for organisations
|
||||
Description string `protobuf:"bytes,5,opt,name=description,proto3" json:"description,omitempty"`
|
||||
Color string `protobuf:"bytes,6,opt,name=color,proto3" json:"color,omitempty"`
|
||||
Emoji string `protobuf:"bytes,7,opt,name=emoji,proto3" json:"emoji,omitempty"`
|
||||
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
||||
XXX_unrecognized []byte `json:"-"`
|
||||
XXX_sizecache int32 `json:"-"`
|
||||
// description is the user set description
|
||||
Description string `protobuf:"bytes,5,opt,name=description,proto3" json:"description,omitempty"`
|
||||
Color string `protobuf:"bytes,6,opt,name=color,proto3" json:"color,omitempty"`
|
||||
Emoji string `protobuf:"bytes,7,opt,name=emoji,proto3" json:"emoji,omitempty"`
|
||||
SocialLinks []*SocialLink `protobuf:"bytes,8,rep,name=social_links,json=socialLinks,proto3" json:"social_links,omitempty"`
|
||||
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
||||
XXX_unrecognized []byte `json:"-"`
|
||||
XXX_sizecache int32 `json:"-"`
|
||||
}
|
||||
|
||||
func (m *ChatIdentity) Reset() { *m = ChatIdentity{} }
|
||||
|
@ -147,6 +148,13 @@ func (m *ChatIdentity) GetEmoji() string {
|
|||
return ""
|
||||
}
|
||||
|
||||
func (m *ChatIdentity) GetSocialLinks() []*SocialLink {
|
||||
if m != nil {
|
||||
return m.SocialLinks
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
// ProfileImage represents data associated with a user's profile image
|
||||
type IdentityImage struct {
|
||||
// payload is a context based payload for the profile image data,
|
||||
|
@ -225,43 +233,97 @@ func (m *IdentityImage) GetEncrypted() bool {
|
|||
return false
|
||||
}
|
||||
|
||||
// SocialLinks represents social link assosiated with given chat identity (personal/community)
|
||||
type SocialLink struct {
|
||||
Text string `protobuf:"bytes,1,opt,name=text,proto3" json:"text,omitempty"`
|
||||
Url string `protobuf:"bytes,2,opt,name=url,proto3" json:"url,omitempty"`
|
||||
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
||||
XXX_unrecognized []byte `json:"-"`
|
||||
XXX_sizecache int32 `json:"-"`
|
||||
}
|
||||
|
||||
func (m *SocialLink) Reset() { *m = SocialLink{} }
|
||||
func (m *SocialLink) String() string { return proto.CompactTextString(m) }
|
||||
func (*SocialLink) ProtoMessage() {}
|
||||
func (*SocialLink) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_7a652489000a5879, []int{2}
|
||||
}
|
||||
|
||||
func (m *SocialLink) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_SocialLink.Unmarshal(m, b)
|
||||
}
|
||||
func (m *SocialLink) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
||||
return xxx_messageInfo_SocialLink.Marshal(b, m, deterministic)
|
||||
}
|
||||
func (m *SocialLink) XXX_Merge(src proto.Message) {
|
||||
xxx_messageInfo_SocialLink.Merge(m, src)
|
||||
}
|
||||
func (m *SocialLink) XXX_Size() int {
|
||||
return xxx_messageInfo_SocialLink.Size(m)
|
||||
}
|
||||
func (m *SocialLink) XXX_DiscardUnknown() {
|
||||
xxx_messageInfo_SocialLink.DiscardUnknown(m)
|
||||
}
|
||||
|
||||
var xxx_messageInfo_SocialLink proto.InternalMessageInfo
|
||||
|
||||
func (m *SocialLink) GetText() string {
|
||||
if m != nil {
|
||||
return m.Text
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (m *SocialLink) GetUrl() string {
|
||||
if m != nil {
|
||||
return m.Url
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func init() {
|
||||
proto.RegisterEnum("protobuf.IdentityImage_SourceType", IdentityImage_SourceType_name, IdentityImage_SourceType_value)
|
||||
proto.RegisterType((*ChatIdentity)(nil), "protobuf.ChatIdentity")
|
||||
proto.RegisterMapType((map[string]*IdentityImage)(nil), "protobuf.ChatIdentity.ImagesEntry")
|
||||
proto.RegisterType((*IdentityImage)(nil), "protobuf.IdentityImage")
|
||||
proto.RegisterType((*SocialLink)(nil), "protobuf.SocialLink")
|
||||
}
|
||||
|
||||
func init() { proto.RegisterFile("chat_identity.proto", fileDescriptor_7a652489000a5879) }
|
||||
func init() {
|
||||
proto.RegisterFile("chat_identity.proto", fileDescriptor_7a652489000a5879)
|
||||
}
|
||||
|
||||
var fileDescriptor_7a652489000a5879 = []byte{
|
||||
// 435 bytes of a gzipped FileDescriptorProto
|
||||
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x54, 0x90, 0xcf, 0x6e, 0xd3, 0x40,
|
||||
0x10, 0xc6, 0xb1, 0x9d, 0xbf, 0xe3, 0x34, 0x8d, 0x36, 0x48, 0x35, 0x15, 0x07, 0x93, 0x0b, 0xb9,
|
||||
0x60, 0xa4, 0x70, 0x41, 0xe5, 0x64, 0x42, 0x90, 0xaa, 0x22, 0xa7, 0xda, 0xa4, 0x54, 0xe5, 0x62,
|
||||
0x6d, 0xed, 0x85, 0x9a, 0xd8, 0x5e, 0xcb, 0xeb, 0x20, 0xed, 0x63, 0xf1, 0x06, 0x3c, 0x1a, 0xca,
|
||||
0xac, 0x5d, 0x27, 0xa7, 0x9d, 0xf9, 0xe6, 0x9b, 0xdf, 0xce, 0x0c, 0x4c, 0xa3, 0x27, 0x56, 0x85,
|
||||
0x49, 0xcc, 0xf3, 0x2a, 0xa9, 0x94, 0x57, 0x94, 0xa2, 0x12, 0x64, 0x80, 0xcf, 0xe3, 0xfe, 0xe7,
|
||||
0xa5, 0xcd, 0xf3, 0x7d, 0x26, 0xb5, 0x3c, 0xfb, 0x67, 0xc2, 0x68, 0xf9, 0xc4, 0xaa, 0xeb, 0xda,
|
||||
0x4d, 0x5e, 0x42, 0x37, 0x4a, 0x45, 0xb4, 0x73, 0x0c, 0xd7, 0x98, 0x77, 0xa8, 0x4e, 0xc8, 0x2b,
|
||||
0x18, 0xf0, 0x5c, 0x86, 0x39, 0xcb, 0xb8, 0x63, 0xba, 0xc6, 0x7c, 0x48, 0xfb, 0x3c, 0x97, 0x01,
|
||||
0xcb, 0x38, 0xb9, 0x82, 0x5e, 0x92, 0xb1, 0x5f, 0x5c, 0x3a, 0x96, 0x6b, 0xcd, 0xed, 0xc5, 0xcc,
|
||||
0x6b, 0x7e, 0xf2, 0x8e, 0xc1, 0xde, 0x35, 0x9a, 0x56, 0x79, 0x55, 0x2a, 0x5a, 0x77, 0x90, 0x37,
|
||||
0x30, 0x8a, 0x13, 0x59, 0xa4, 0x4c, 0x69, 0x74, 0x07, 0xd1, 0x76, 0xad, 0x21, 0xde, 0x05, 0x3b,
|
||||
0xe6, 0x32, 0x2a, 0x93, 0xa2, 0x4a, 0x44, 0xee, 0x74, 0x6b, 0x47, 0x2b, 0xe1, 0xc4, 0x22, 0x15,
|
||||
0xa5, 0xd3, 0xc3, 0x9a, 0x4e, 0x0e, 0x2a, 0xcf, 0xc4, 0xef, 0xc4, 0xe9, 0x6b, 0x15, 0x93, 0x4b,
|
||||
0x0a, 0xf6, 0xd1, 0x1c, 0x64, 0x02, 0xd6, 0x8e, 0x2b, 0x5c, 0x75, 0x48, 0x0f, 0x21, 0x79, 0x07,
|
||||
0xdd, 0x3f, 0x2c, 0xdd, 0xeb, 0x2d, 0xed, 0xc5, 0x45, 0xbb, 0x4c, 0xb3, 0x08, 0xf6, 0x53, 0xed,
|
||||
0xba, 0x32, 0x3f, 0x1a, 0xb3, 0xbf, 0x26, 0x9c, 0x9d, 0x14, 0x89, 0x03, 0xfd, 0x82, 0xa9, 0x54,
|
||||
0xb0, 0x18, 0xd1, 0x23, 0xda, 0xa4, 0x64, 0x09, 0xb6, 0x14, 0xfb, 0x32, 0xe2, 0x61, 0xa5, 0x0a,
|
||||
0xfd, 0xc9, 0xf8, 0xf8, 0x62, 0x27, 0x1c, 0x6f, 0x83, 0xd6, 0xad, 0x2a, 0x38, 0x05, 0xf9, 0x1c,
|
||||
0x93, 0x05, 0x00, 0xde, 0x4f, 0x33, 0x2c, 0x64, 0x4c, 0x8f, 0x18, 0x87, 0x1a, 0x36, 0x0d, 0x93,
|
||||
0x26, 0x24, 0x6f, 0xe1, 0x9c, 0xe7, 0x51, 0xa9, 0xf0, 0x64, 0xe1, 0x8e, 0x2b, 0xe9, 0x74, 0x5c,
|
||||
0x6b, 0x3e, 0xa2, 0xe3, 0x56, 0xbe, 0xe1, 0x4a, 0x92, 0xd7, 0x30, 0xac, 0x15, 0x1e, 0xe3, 0xb5,
|
||||
0x07, 0xb4, 0x15, 0x66, 0x5f, 0x01, 0xda, 0xa1, 0xc8, 0x05, 0x4c, 0xef, 0x82, 0x9b, 0x60, 0x7d,
|
||||
0x1f, 0x84, 0x9b, 0xf5, 0x1d, 0x5d, 0xae, 0xc2, 0xed, 0xc3, 0xed, 0x6a, 0xf2, 0x82, 0x9c, 0x83,
|
||||
0x4d, 0xfd, 0xfb, 0xf0, 0xd6, 0x7f, 0xf8, 0xb6, 0xf6, 0xbf, 0x4c, 0x0c, 0x32, 0x06, 0x58, 0x05,
|
||||
0x9b, 0xd0, 0xff, 0xee, 0x6f, 0x7d, 0x3a, 0x31, 0x3f, 0x9f, 0xfd, 0xb0, 0xbd, 0xf7, 0x9f, 0x9a,
|
||||
0x91, 0x1f, 0x7b, 0x18, 0x7d, 0xf8, 0x1f, 0x00, 0x00, 0xff, 0xff, 0x76, 0x41, 0x72, 0x35, 0xba,
|
||||
0x02, 0x00, 0x00,
|
||||
// 489 bytes of a gzipped FileDescriptorProto
|
||||
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x54, 0x92, 0x4d, 0x6f, 0xd3, 0x40,
|
||||
0x10, 0x86, 0xc9, 0x47, 0xf3, 0x31, 0x9b, 0xa6, 0xd1, 0xa6, 0x52, 0x4d, 0xc5, 0x21, 0xe4, 0x42,
|
||||
0x2e, 0x18, 0x29, 0x1c, 0x40, 0xe5, 0x64, 0x42, 0x90, 0xaa, 0x56, 0x49, 0xb5, 0x49, 0xa9, 0xca,
|
||||
0xc5, 0xda, 0x3a, 0x0b, 0x5d, 0xe2, 0xec, 0x5a, 0xde, 0x0d, 0x62, 0x7f, 0x16, 0x3f, 0x8f, 0x1b,
|
||||
0xf2, 0xd8, 0xae, 0xd3, 0x93, 0xdf, 0x79, 0x67, 0xf6, 0xd9, 0xd9, 0x19, 0xc3, 0x30, 0x7a, 0xe4,
|
||||
0x36, 0x94, 0x1b, 0xa1, 0xac, 0xb4, 0xce, 0x4f, 0x52, 0x6d, 0x35, 0xed, 0xe0, 0xe7, 0x61, 0xff,
|
||||
0xe3, 0x9c, 0x08, 0xb5, 0xdf, 0x99, 0xdc, 0x1e, 0xff, 0xab, 0x43, 0x6f, 0xf6, 0xc8, 0xed, 0x65,
|
||||
0x51, 0x4d, 0x4f, 0xe1, 0x28, 0x8a, 0x75, 0xb4, 0xf5, 0x6a, 0xa3, 0xda, 0xa4, 0xc9, 0xf2, 0x80,
|
||||
0xbe, 0x84, 0x8e, 0x50, 0x26, 0x54, 0x7c, 0x27, 0xbc, 0xfa, 0xa8, 0x36, 0xe9, 0xb2, 0xb6, 0x50,
|
||||
0x66, 0xc1, 0x77, 0x82, 0x5e, 0x40, 0x4b, 0xee, 0xf8, 0x4f, 0x61, 0xbc, 0xc6, 0xa8, 0x31, 0x21,
|
||||
0xd3, 0xb1, 0x5f, 0xde, 0xe4, 0x1f, 0x82, 0xfd, 0x4b, 0x2c, 0x9a, 0x2b, 0x9b, 0x3a, 0x56, 0x9c,
|
||||
0xa0, 0xaf, 0xa1, 0xb7, 0x91, 0x26, 0x89, 0xb9, 0xcb, 0xd1, 0x4d, 0x44, 0x93, 0xc2, 0x43, 0xfc,
|
||||
0x08, 0xc8, 0x46, 0x98, 0x28, 0x95, 0x89, 0x95, 0x5a, 0x79, 0x47, 0x45, 0x45, 0x65, 0x61, 0xc7,
|
||||
0x3a, 0xd6, 0xa9, 0xd7, 0xc2, 0x5c, 0x1e, 0x64, 0xae, 0xd8, 0xe9, 0x5f, 0xd2, 0x6b, 0xe7, 0x2e,
|
||||
0x06, 0xf4, 0x03, 0xf4, 0x8c, 0x8e, 0x24, 0x8f, 0xc3, 0x58, 0xaa, 0xad, 0xf1, 0x3a, 0xd8, 0xf2,
|
||||
0x69, 0xd5, 0xf2, 0x0a, 0xb3, 0xd7, 0x52, 0x6d, 0x19, 0x31, 0x4f, 0xda, 0x9c, 0x33, 0x20, 0x07,
|
||||
0x0f, 0xa0, 0x03, 0x68, 0x6c, 0x85, 0xc3, 0x19, 0x75, 0x59, 0x26, 0xe9, 0x5b, 0x38, 0xfa, 0xcd,
|
||||
0xe3, 0x7d, 0x3e, 0x1e, 0x32, 0x3d, 0xab, 0x90, 0xe5, 0x04, 0xf0, 0x3c, 0xcb, 0xab, 0x2e, 0xea,
|
||||
0x1f, 0x6b, 0xe3, 0xbf, 0x75, 0x38, 0x7e, 0x96, 0xa4, 0x1e, 0xb4, 0x13, 0xee, 0x62, 0xcd, 0x37,
|
||||
0x88, 0xee, 0xb1, 0x32, 0xa4, 0x33, 0x20, 0x46, 0xef, 0xd3, 0x48, 0x84, 0xd6, 0x25, 0xf9, 0x25,
|
||||
0xfd, 0xc3, 0x51, 0x3f, 0xe3, 0xf8, 0x2b, 0x2c, 0x5d, 0xbb, 0x44, 0x30, 0x30, 0x4f, 0x9a, 0x4e,
|
||||
0x01, 0x70, 0xf0, 0x39, 0xa3, 0x81, 0x8c, 0xe1, 0x01, 0x23, 0xcb, 0xe1, 0xa1, 0xae, 0x2c, 0x25,
|
||||
0x7d, 0x03, 0x27, 0x42, 0x45, 0xa9, 0xc3, 0x59, 0x87, 0x5b, 0xe1, 0x8c, 0xd7, 0x1c, 0x35, 0x26,
|
||||
0x3d, 0xd6, 0xaf, 0xec, 0x2b, 0xe1, 0x0c, 0x7d, 0x05, 0xdd, 0xc2, 0x11, 0x1b, 0x5c, 0x53, 0x87,
|
||||
0x55, 0xc6, 0xf8, 0x2b, 0x40, 0xd5, 0x14, 0x3d, 0x83, 0xe1, 0xed, 0xe2, 0x6a, 0xb1, 0xbc, 0x5b,
|
||||
0x84, 0xab, 0xe5, 0x2d, 0x9b, 0xcd, 0xc3, 0xf5, 0xfd, 0xcd, 0x7c, 0xf0, 0x82, 0x9e, 0x00, 0x61,
|
||||
0xc1, 0x5d, 0x78, 0x13, 0xdc, 0x5f, 0x2f, 0x83, 0x2f, 0x83, 0x1a, 0xed, 0x03, 0xcc, 0x17, 0xab,
|
||||
0x30, 0xf8, 0x16, 0xac, 0x03, 0x36, 0xa8, 0x8f, 0xa7, 0x19, 0xa7, 0x5c, 0x0b, 0xa5, 0xd0, 0xb4,
|
||||
0xe2, 0x8f, 0x2d, 0xf6, 0x80, 0x3a, 0x5b, 0xcd, 0x3e, 0x8d, 0x8b, 0xbf, 0x34, 0x93, 0x9f, 0x8f,
|
||||
0xbf, 0x13, 0xff, 0xdd, 0xa7, 0xf2, 0x99, 0x0f, 0x2d, 0x54, 0xef, 0xff, 0x07, 0x00, 0x00, 0xff,
|
||||
0xff, 0xa2, 0xfd, 0x5e, 0x59, 0x27, 0x03, 0x00, 0x00,
|
||||
}
|
||||
|
|
|
@ -19,12 +19,14 @@ message ChatIdentity {
|
|||
// display name is the user set identity
|
||||
string display_name = 4;
|
||||
|
||||
// description is the user set description, valid only for organisations
|
||||
// description is the user set description
|
||||
string description = 5;
|
||||
|
||||
string color = 6;
|
||||
|
||||
string emoji = 7;
|
||||
|
||||
repeated SocialLink social_links = 8;
|
||||
}
|
||||
|
||||
// ProfileImage represents data associated with a user's profile image
|
||||
|
@ -60,3 +62,9 @@ message IdentityImage {
|
|||
ENS_AVATAR = 2;
|
||||
}
|
||||
}
|
||||
|
||||
// SocialLinks represents social link assosiated with given chat identity (personal/community)
|
||||
message SocialLink {
|
||||
string text = 1;
|
||||
string url = 2;
|
||||
}
|
||||
|
|
|
@ -47,7 +47,7 @@ func (s *Service) APIs() []rpc.API {
|
|||
{
|
||||
Namespace: "settings",
|
||||
Version: "0.1.0",
|
||||
Service: NewSettingsAPI(s.db, s.config),
|
||||
Service: NewSettingsAPI(&s.messenger, s.db, s.config),
|
||||
},
|
||||
{
|
||||
Namespace: "accounts",
|
||||
|
|
|
@ -7,16 +7,19 @@ import (
|
|||
"github.com/status-im/status-go/multiaccounts/settings"
|
||||
"github.com/status-im/status-go/nodecfg"
|
||||
"github.com/status-im/status-go/params"
|
||||
"github.com/status-im/status-go/protocol"
|
||||
"github.com/status-im/status-go/protocol/identity"
|
||||
)
|
||||
|
||||
func NewSettingsAPI(db *accounts.Database, config *params.NodeConfig) *SettingsAPI {
|
||||
return &SettingsAPI{db, config}
|
||||
func NewSettingsAPI(messenger **protocol.Messenger, db *accounts.Database, config *params.NodeConfig) *SettingsAPI {
|
||||
return &SettingsAPI{messenger, db, config}
|
||||
}
|
||||
|
||||
// SettingsAPI is class with methods available over RPC.
|
||||
type SettingsAPI struct {
|
||||
db *accounts.Database
|
||||
config *params.NodeConfig
|
||||
messenger **protocol.Messenger
|
||||
db *accounts.Database
|
||||
config *params.NodeConfig
|
||||
}
|
||||
|
||||
func (api *SettingsAPI) SaveSetting(ctx context.Context, typ string, val interface{}) error {
|
||||
|
@ -156,3 +159,11 @@ func (api *SettingsAPI) NotificationsSetExemptions(id string, muteAllMessages bo
|
|||
func (api *SettingsAPI) DeleteExemptions(id string) error {
|
||||
return api.db.DeleteExemptions(id)
|
||||
}
|
||||
|
||||
func (api *SettingsAPI) GetSocialLinks() (identity.SocialLinks, error) {
|
||||
return api.db.GetSocialLinks()
|
||||
}
|
||||
|
||||
func (api *SettingsAPI) SetSocialLinks(socialLinks identity.SocialLinks) error {
|
||||
return (*api.messenger).SetSocialLinks(&socialLinks)
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue