Skip to content

Commit c6f8530

Browse files
morethanwordsclaude
andcommitted
Tell who owns a collectible username or number, as tdesktop does
A username bought on Fragment was copied on a click in a profile like any other, so nothing told it apart from the peer's own. Now a click on one asks fragment.getCollectibleInfo and opens tdesktop's CollectibleInfoBox: the animated icon on a filled circle, "@name is a collectible username that belongs to", the owner as a chip, "bought on Fragment on <date> for <TON> (<fiat>)", Learn More (the Fragment page) and Copy Link. The name in the title copies it, as there; copying keeps the popup open, as there. A collectible is any username of the peer's but the editable one - the rule tdesktop applies through isUsernameEditable. It opens from the user's username row, from each "also @..." username, and from a channel's or group's link row (not a topic's link). A +888 number in the phone row opens the same popup for the number, as in tdesktop (Copy Phone Number there). When the server knows of no such collectible, the click copies, as it did before. The strings take the Android names (FragmentUsernameTitle and the rest), the animations are tdesktop's collectible_username and collectible_phone. Copying a username, a t.me link and a phone number with their toasts was written out in anchorCopy, the profile rows and the contact details popup (copyFormattedPhone), and the popup needed all three again, so they are one helper now (copyContact); copyFormattedPhone is its copyPhoneNumber. Verified on a signed-in preview: @ravdonikas's own username copies, its @TangoDJ opens the popup with the purchase (Apr 30, 2024, 104 TON), and Copy Link copies https://t.me/tangodj; @toncoin's link row opens it for @gram. The number popup was opened on a real +888 account by hand. Two sandbox stories cover both; with them Axe passes in all four themes and the focus sweep finds a visible focus on every control; the title copies the username, Copy Link the link, Learn More opens the page, Escape closes; the contact details popup still copies a number. The Chromium sandbox sweep passes (90 tests), as do isCollectibleUsername.test.ts, the sandbox coverage and shared contact tests, tsc and oxlint. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
1 parent c35649d commit c6f8530

16 files changed

Lines changed: 386 additions & 44 deletions

File tree

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
{"tgs":1,"v":"5.5.2","fr":60,"ip":0,"op":59,"w":512,"h":512,"nm":"1","ddd":0,"assets":[],"layers":[{"ddd":0,"ind":1,"ty":4,"nm":"1","sr":1,"ks":{"p":{"a":1,"k":[{"i":{"x":0.3,"y":1},"o":{"x":0.05,"y":0},"t":1,"s":[256,368.474,0],"to":[0,4,0],"ti":[0,3.5,0]},{"i":{"x":0.85,"y":1},"o":{"x":0.8,"y":0},"t":13,"s":[256,392.474,0],"to":[0,-3.5,0],"ti":[0,1.917,0]},{"i":{"x":0.3,"y":1},"o":{"x":0.5,"y":0},"t":28,"s":[256,347.474,0],"to":[0,-1.917,0],"ti":[0,-2.167,0]},{"i":{"x":0.4,"y":1},"o":{"x":0.29,"y":0},"t":39,"s":[256,380.974,0],"to":[0,2.167,0],"ti":[0,2.083,0]},{"i":{"x":0.71,"y":1},"o":{"x":0.29,"y":0},"t":49,"s":[256,360.474,0],"to":[0,-2.083,0],"ti":[0,-1.333,0]},{"t":58,"s":[256,368.474,0]}]},"a":{"a":0,"k":[256,368.474,0]},"s":{"a":1,"k":[{"i":{"x":[0.3,0.3,0.3],"y":[1,1,1]},"o":{"x":[0.05,0.05,0.05],"y":[0,0,0]},"t":0,"s":[100,100,100]},{"i":{"x":[0.85,0.85,0.85],"y":[1,1,1]},"o":{"x":[0.8,0.8,0.8],"y":[0,0,0]},"t":11,"s":[108,92,100]},{"i":{"x":[0.3,0.3,0.3],"y":[1,1,1]},"o":{"x":[0.5,0.5,0.5],"y":[0,0,0]},"t":26,"s":[90,117,100]},{"i":{"x":[0.4,0.4,0.4],"y":[1,1,1]},"o":{"x":[0.29,0.29,0.29],"y":[0,0,0]},"t":37,"s":[105,92,100]},{"i":{"x":[0.71,0.71,0.71],"y":[1,1,1]},"o":{"x":[0.29,0.29,0.29],"y":[0,0,0]},"t":47,"s":[99,102,100]},{"t":57,"s":[100,100,100]}]}},"ao":0,"shapes":[{"ty":"gr","it":[{"ty":"gr","it":[{"ind":0,"ty":"sh","ks":{"a":1,"k":[{"i":{"x":0.4,"y":0.905},"o":{"x":0.167,"y":0.167},"t":0,"s":[{"i":[[0,-1.866],[0,0],[4.884,7.121],[0,0],[0,0],[0,0],[0,0],[0,0],[-7.775,-3.676],[0,0],[-0.2,-0.112],[-0.575,-1.109]],"o":[[0,0],[-0.133,8.553],[0,0],[0,0],[0,0],[0,0],[0,0],[-3.333,-5.48],[0,0],[0.22,0.11],[1.506,0.844],[0.63,1.214]],"v":[[-9.813,-21.949],[-10.061,104.985],[-23.595,107.964],[-126.478,-51.435],[-128.685,-54.854],[-130.559,-57.758],[-130.614,-57.843],[-141.378,-74.519],[-131.648,-82.56],[-14.286,-29.675],[-13.656,-29.342],[-10.631,-26.481]],"c":true}]},{"i":{"x":0.833,"y":0.833},"o":{"x":0.6,"y":0.014},"t":8,"s":[{"i":[[0.656,-2.458],[0,0],[4.884,7.121],[0,0],[0,0],[0,0],[0,0],[0,0],[-7.775,-3.676],[0,0],[-0.216,-0.078],[-0.917,-0.848]],"o":[[0,0],[-1.939,6.784],[0,0],[0,0],[0,0],[0,0],[0,0],[-3.333,-5.48],[0,0],[0.22,0.11],[1.125,0.405],[1.162,1.075]],"v":[[53.969,-13.324],[15.439,104.466],[-5.595,107.925],[-120.842,-24.689],[-123.512,-27.737],[-125.78,-30.326],[-125.846,-30.402],[-138.871,-45.269],[-129.141,-53.31],[47.527,-21.925],[48.469,-21.717],[52.057,-20.012]],"c":true}]},{"i":{"x":0.833,"y":0.833},"o":{"x":0.167,"y":0.167},"t":16,"s":[{"i":[[0,-1.866],[0,0],[4.884,7.121],[0,0],[0,0],[0,0],[0,0],[0,0],[-7.775,-3.676],[0,0],[-0.2,-0.112],[-0.575,-1.109]],"o":[[0,0],[-0.133,8.553],[0,0],[0,0],[0,0],[0,0],[0,0],[-3.333,-5.48],[0,0],[0.22,0.11],[1.506,0.844],[0.63,1.214]],"v":[[-9.813,-21.949],[-10.061,104.985],[-23.595,107.964],[-126.478,-51.435],[-128.685,-54.854],[-130.559,-57.758],[-130.614,-57.843],[-141.378,-74.519],[-131.648,-82.56],[-14.286,-29.675],[-13.656,-29.342],[-10.631,-26.481]],"c":true}]},{"i":{"x":0.833,"y":0.833},"o":{"x":0.167,"y":0.167},"t":19,"s":[{"i":[[0,0],[0,0],[4.884,7.121],[0,0],[0,0],[0,0],[0,0],[0,0],[-7.775,-3.676],[0,0],[0,0],[0,0]],"o":[[0,0],[-0.133,8.553],[0,0],[0,0],[0,0],[0,0],[0,0],[-3.333,-5.48],[0,0],[0,0],[0,0],[0,0]],"v":[[-67.338,-27.899],[-13.561,104.877],[-24.095,107.857],[-109.118,-67.827],[-110.748,-71.594],[-112.134,-74.796],[-112.174,-74.889],[-120.128,-93.269],[-110.398,-101.31],[-70.686,-35.625],[-70.62,-35.475],[-68.969,-31.663]],"c":true}]},{"i":{"x":0.833,"y":0.833},"o":{"x":0.167,"y":0.167},"t":20,"s":[{"i":[[0,0],[0,0],[5.095,6.214],[1.198,3.378],[0,0],[0,0],[0,0],[0,0],[-2.33,-0.621],[0,0],[0,0],[0,0]],"o":[[0,0],[-0.067,4.276],[0,0],[-1.698,-5.003],[0,0],[0,0],[0,0],[0.006,-9.162],[0,0],[0,0],[0,0],[0,0]],"v":[[-85.763,-31.242],[-16.061,109.224],[-24.845,103.342],[-94.552,-28.372],[-90.984,-32.654],[-97.345,-52.21],[-101.503,-52.724],[-107.756,-96.338],[-99.545,-107.504],[-91.923,-55.657],[-97.366,-52.192],[-91.024,-32.662]],"c":true}]},{"i":{"x":0.833,"y":0.833},"o":{"x":0.167,"y":0.167},"t":21,"s":[{"i":[[0,0],[0,0],[5.095,6.214],[0,0],[0,0],[0,0],[0,0],[0,0],[-2.08,0.379],[0,0],[0,0],[0,0]],"o":[[0,0],[-0.067,4.276],[0,0],[0,0],[0,0],[0,0],[0,0],[1.006,-3.662],[0,0],[0,0],[0,0],[0,0]],"v":[[-98.638,-29.985],[-10.936,108.232],[-16.845,102.224],[-102.177,-28.24],[-102.909,-31.699],[-97.505,-60.262],[-98.235,-60.89],[-78.381,-112.581],[-73.42,-118.997],[-96.048,-59.961],[-97.487,-60.236],[-102.932,-31.77]],"c":true}]},{"i":{"x":0.833,"y":0.833},"o":{"x":0.167,"y":0.167},"t":26,"s":[{"i":[[0,0],[0,0],[4.904,4.808],[0,0],[0,0],[0,0],[0,0],[0,0],[-2.08,0.379],[0,0],[0,0],[0,0]],"o":[[0,0],[-0.308,2.522],[0,0],[0,0],[0,0],[0,0],[0,0],[1.006,-3.662],[0,0],[0,0],[0,0],[0,0]],"v":[[-93.513,-26.86],[-14.74,108.357],[-25.032,103.849],[-97.052,-25.115],[-97.784,-28.574],[-96.13,-60.2],[-96.86,-60.828],[-79.693,-106.831],[-74.733,-113.247],[-94.673,-59.899],[-96.112,-60.173],[-97.807,-28.645]],"c":true}]},{"i":{"x":0.833,"y":0.833},"o":{"x":0.167,"y":0.167},"t":31,"s":[{"i":[[0,0],[0,0],[2.263,3.401],[0,0],[0,0],[0,0],[0,0],[0,0],[-2.08,0.379],[0,0],[0,0],[0,0]],"o":[[0,0],[-0.395,0.768],[0,0],[0,0],[0,0],[0,0],[0,0],[1.006,-3.662],[0,0],[0,0],[0,0],[0,0]],"v":[[-88.388,-23.735],[-12.186,108.482],[-18.47,104.974],[-91.927,-21.99],[-92.659,-25.449],[-94.755,-60.137],[-95.485,-60.765],[-81.006,-101.081],[-76.045,-107.497],[-93.298,-59.836],[-94.737,-60.111],[-92.682,-25.52]],"c":true}]},{"i":{"x":0.833,"y":0.833},"o":{"x":0.167,"y":0.167},"t":32,"s":[{"i":[[0,0],[0,0],[5.095,6.214],[1.198,3.378],[0,0],[0,0],[0,0],[0,0],[-2.33,-0.621],[0,0],[0,0],[0,0]],"o":[[0,0],[-0.067,4.276],[0,0],[-1.698,-5.003],[0,0],[0,0],[0,0],[0.006,-9.162],[0,0],[0,0],[0,0],[0,0]],"v":[[-78.263,-22.992],[-10.561,106.974],[-21.095,101.842],[-87.052,-20.122],[-83.484,-24.404],[-87.845,-48.46],[-92.003,-48.974],[-101.631,-87.838],[-93.42,-99.004],[-82.423,-51.907],[-87.866,-48.442],[-83.524,-24.412]],"c":true}]},{"i":{"x":0.3,"y":1},"o":{"x":0.167,"y":0.167},"t":33,"s":[{"i":[[0,0],[0,0],[4.884,7.121],[0,0],[0,0],[0,0],[0,0],[0,0],[-4.559,-0.44],[0,0],[0,0],[0,0]],"o":[[0,0],[-0.133,8.553],[0,0],[0,0],[0,0],[0,0],[0,0],[-3.333,-5.48],[0,0],[0,0],[0,0],[0,0]],"v":[[-49.588,-20.649],[-14.811,103.877],[-25.595,105.857],[-100.118,-66.077],[-101.748,-69.844],[-103.134,-73.046],[-103.174,-73.139],[-106.878,-81.519],[-103.148,-96.06],[-52.936,-28.375],[-52.87,-28.225],[-51.219,-24.413]],"c":true}]},{"t":58,"s":[{"i":[[0,-1.866],[0,0],[4.884,7.121],[0,0],[0,0],[0,0],[0,0],[0,0],[-7.775,-3.676],[0,0],[-0.2,-0.112],[-0.575,-1.109]],"o":[[0,0],[-0.133,8.553],[0,0],[0,0],[0,0],[0,0],[0,0],[-3.333,-5.48],[0,0],[0.22,0.11],[1.506,0.844],[0.63,1.214]],"v":[[-12.813,-21.897],[-13.061,105.036],[-26.595,108.016],[-129.478,-51.384],[-131.685,-54.802],[-133.559,-57.707],[-133.614,-57.791],[-144.378,-74.468],[-134.648,-82.509],[-17.286,-29.624],[-16.656,-29.291],[-13.631,-26.429]],"c":true}]}]},"nm":"Path 1","hd":false},{"ty":"fl","c":{"a":0,"k":[1,1,1,1]},"o":{"a":0,"k":100},"r":1,"bm":0,"nm":"Fill 1","hd":false},{"ty":"tr","p":{"a":0,"k":[0,0]},"a":{"a":0,"k":[0,0]},"s":{"a":0,"k":[100,100]},"r":{"a":0,"k":0},"o":{"a":0,"k":100},"sk":{"a":0,"k":0},"sa":{"a":0,"k":0},"nm":"Transform"}],"nm":"Group 1","bm":0,"hd":false},{"ty":"tr","p":{"a":1,"k":[{"t":0,"s":[179.897,270.405],"h":1},{"t":31,"s":[329.897,270.405],"h":1}]},"a":{"a":0,"k":[-76.103,14.405]},"s":{"a":1,"k":[{"t":0,"s":[100,100],"h":1},{"t":31,"s":[-100,100],"h":1}]},"r":{"a":0,"k":0},"o":{"a":1,"k":[{"t":0,"s":[100],"h":1},{"t":21,"s":[0],"h":1},{"t":31,"s":[100],"h":1}]},"sk":{"a":0,"k":0},"sa":{"a":0,"k":0},"nm":"Transform"}],"nm":"L","bm":0,"hd":false},{"ty":"gr","it":[{"ty":"gr","it":[{"ind":0,"ty":"sh","ks":{"a":1,"k":[{"i":{"x":0.4,"y":0.905},"o":{"x":0.167,"y":0.167},"t":0,"s":[{"i":[[0,-3.797],[0,0],[-4.884,7.121],[0,0],[7.775,-3.676],[0,0]],"o":[[0,0],[0.133,8.553],[0,0],[3.333,-5.48],[0,0],[-3.693,1.845]],"v":[[9.813,-21.949],[10.061,104.985],[23.595,107.964],[141.378,-74.519],[131.648,-82.56],[14.286,-29.675]],"c":true}]},{"i":{"x":0.833,"y":0.833},"o":{"x":0.6,"y":0.014},"t":8,"s":[{"i":[[0.5,-1.926],[0,0],[-4.884,7.121],[0,0],[4.977,-6.565],[0,0]],"o":[[0,0],[0.133,8.553],[0,0],[3.122,-7.481],[0,0],[-1.098,1.55]],"v":[[69.125,-20.949],[28.061,98.403],[31.845,105.383],[108.503,-99.644],[103.898,-103.685],[73.598,-31.425]],"c":true}]},{"i":{"x":0.833,"y":0.833},"o":{"x":0.167,"y":0.167},"t":16,"s":[{"i":[[0,-3.797],[0,0],[-4.884,7.121],[0,0],[7.775,-3.676],[0,0]],"o":[[0,0],[0.133,8.553],[0,0],[3.333,-5.48],[0,0],[-3.693,1.845]],"v":[[9.813,-21.949],[10.061,104.985],[23.595,107.964],[141.378,-74.519],[131.648,-82.56],[14.286,-29.675]],"c":true}]},{"i":{"x":0.833,"y":0.833},"o":{"x":0.167,"y":0.167},"t":21,"s":[{"i":[[0,-3.797],[0,0],[-4.884,7.121],[0,0],[7.775,-3.676],[0,0]],"o":[[0,0],[3.689,6.015],[0,0],[3.333,-5.48],[0,0],[-3.693,1.845]],"v":[[-94.937,-32.699],[-5.689,106.949],[12.345,107.428],[136.128,-65.269],[126.398,-73.31],[-90.464,-40.425]],"c":true}]},{"i":{"x":0.833,"y":0.833},"o":{"x":0.167,"y":0.167},"t":26,"s":[{"i":[[0,-3.797],[0,0],[-16.33,13.572],[0,0],[8.38,-3.676],[0,0]],"o":[[0,0],[7.865,6.015],[0,0],[3.592,-5.48],[0,0],[-3.981,1.845]],"v":[[-144.476,-47.699],[-17.449,106.949],[21,107.428],[143.908,-46.269],[133.42,-54.31],[-139.655,-55.425]],"c":true}]},{"i":{"x":0.833,"y":0.833},"o":{"x":0.167,"y":0.167},"t":31,"s":[{"i":[[0,-3.797],[0,0],[-4.884,7.121],[0,0],[8.475,1.06],[0,0]],"o":[[0,0],[3.689,6.015],[0,0],[3.333,-5.48],[0,0],[-3.693,1.845]],"v":[[-138.054,-68.199],[-9.439,106.699],[5.345,104.928],[80.006,-23.269],[73.275,-36.56],[-133.581,-75.925]],"c":true}]},{"i":{"x":0.3,"y":1},"o":{"x":0.167,"y":0.167},"t":33,"s":[{"i":[[0,-3.797],[0,0],[-4.884,7.121],[0,0],[6.926,1.268],[0,0]],"o":[[0,0],[3.689,6.015],[0,0],[1.995,-5.873],[0,0],[-3.693,1.845]],"v":[[-135.164,-75.799],[-16.039,106.264],[-0.58,103.755],[31.208,-21.677],[22.074,-34.718],[-130.691,-83.525]],"c":true}]},{"t":58,"s":[{"i":[[-3.903,-6.785],[0,0],[0.28,5.393],[0,0],[4.415,1.955],[0,0]],"o":[[0,0],[3.689,6.015],[0,0],[-0.074,-7.149],[0,0],[-4.376,-2.434]],"v":[[-140.722,-74.59],[-22.314,109.377],[-9.53,106.607],[-9.739,-19.601],[-16.102,-30.267],[-134.499,-82.942]],"c":true}]}]},"nm":"Path 1","hd":false},{"ty":"fl","c":{"a":0,"k":[1,1,1,1]},"o":{"a":0,"k":100},"r":1,"bm":0,"nm":"Fill 1","hd":false},{"ty":"tr","p":{"a":0,"k":[0,0]},"a":{"a":0,"k":[0,0]},"s":{"a":0,"k":[100,100]},"r":{"a":0,"k":0},"o":{"a":0,"k":100},"sk":{"a":0,"k":0},"sa":{"a":0,"k":0},"nm":"Transform"}],"nm":"Group 1","bm":0,"hd":false},{"ty":"tr","p":{"a":0,"k":[332.103,270.405]},"a":{"a":0,"k":[76.103,14.405]},"s":{"a":0,"k":[100,100]},"r":{"a":0,"k":0},"o":{"a":0,"k":100},"sk":{"a":0,"k":0},"sa":{"a":0,"k":0},"nm":"Transform"}],"nm":"R","bm":0,"hd":false},{"ty":"gr","it":[{"ty":"gr","it":[{"ind":0,"ty":"sh","ks":{"a":1,"k":[{"i":{"x":0.4,"y":0.905},"o":{"x":0.167,"y":0.167},"t":0,"s":[{"i":[[-3.141,1.409],[0,0],[4.693,0],[0,0],[-4.282,-1.921],[0,0]],"o":[[0,0],[4.282,-1.921],[0,0],[-4.693,0],[0,0],[3.141,1.409]],"v":[[5.157,-47.3],[131.853,-103.149],[130.071,-112.474],[-129.633,-112.474],[-131.415,-103.149],[-4.719,-47.3]],"c":true}]},{"i":{"x":0.833,"y":0.833},"o":{"x":0.6,"y":0.095},"t":8,"s":[{"i":[[-4.407,9.1],[0,0],[4.693,0],[0,0],[-4.282,-1.921],[0,0]],"o":[[0,0],[3.647,-4.152],[0,0],[-4.693,0],[0,0],[3.141,1.409]],"v":[[64.407,-48.1],[94.853,-116.598],[91.071,-125.923],[-133.133,-84.474],[-134.915,-75.149],[50.281,-40.1]],"c":true}]},{"i":{"x":0.833,"y":0.833},"o":{"x":0.167,"y":0.167},"t":16,"s":[{"i":[[-3.141,1.409],[0,0],[4.693,0],[0,0],[-4.282,-1.921],[0,0]],"o":[[0,0],[4.282,-1.921],[0,0],[-4.693,0],[0,0],[3.141,1.409]],"v":[[5.157,-47.3],[131.853,-103.149],[130.071,-112.474],[-129.633,-112.474],[-131.415,-103.149],[-4.719,-47.3]],"c":true}]},{"i":{"x":0.833,"y":0.833},"o":{"x":0.167,"y":0.167},"t":20,"s":[{"i":[[-3.735,0.905],[0,0],[4.446,0.573],[0,0],[-0.281,-2.571],[0,0]],"o":[[0,0],[4.562,-1.329],[0,0],[-3.585,-0.274],[0,0],[0.147,1.766]],"v":[[-71.636,-55.66],[130.183,-92.501],[129.351,-102.532],[-80.466,-120.843],[-86.458,-115.393],[-78.274,-58.279]],"c":true}]},{"i":{"x":0.833,"y":0.833},"o":{"x":0.167,"y":0.167},"t":21,"s":[{"i":[[-3.883,0.779],[0,0],[4.384,0.717],[0,0],[0.719,-2.733],[0,0]],"o":[[0,0],[4.632,-1.181],[0,0],[-3.308,-0.343],[0,0],[-0.601,1.855]],"v":[[-85.834,-57.438],[129.765,-89.838],[129.171,-100.046],[-63.174,-122.623],[-70.219,-118.142],[-91.663,-60.712]],"c":true}]},{"i":{"x":0.833,"y":0.833},"o":{"x":0.167,"y":0.167},"t":26,"s":[{"i":[[-4.626,-0.1],[0,0],[4.076,1.204],[0,0],[1.978,-0.848],[0,0]],"o":[[0,0],[4.981,-0.064],[0,0],[-1.923,-0.576],[0,0],[-4.344,1.708]],"v":[[-130.384,-71.791],[129.552,-72.5],[130.145,-80.33],[2.522,-126.625],[-2.786,-126.422],[-132.166,-77.294]],"c":true}]},{"i":{"x":0.833,"y":0.833},"o":{"x":0.167,"y":0.167},"t":31,"s":[{"i":[[-4.626,-0.109],[0,0],[0.581,2.975],[0,0],[1.978,-0.93],[0,0]],"o":[[0,0],[6.476,1.395],[0,0],[-1.924,-0.632],[0,0],[-4.344,1.873]],"v":[[-130.187,-94.699],[80.4,-54.395],[86.669,-61.35],[66.994,-117.152],[63.936,-119.429],[-131.969,-100.731]],"c":true}]},{"i":{"x":0.3,"y":1},"o":{"x":0.167,"y":0.167},"t":33,"s":[{"i":[[-4.626,-0.111],[0,0],[-2.616,2.343],[0,0],[1.978,-0.943],[0,0]],"o":[[0,0],[5.878,0.829],[0,0],[-1.924,-0.641],[0,0],[-4.344,1.899]],"v":[[-125.399,-102.121],[37.027,-50.663],[46.116,-55.343],[93.31,-112.129],[91.152,-115.305],[-127.181,-108.239]],"c":true}]},{"t":58,"s":[{"i":[[-6.407,-2.769],[0,0],[-5.038,2.278],[0,0],[5.273,-0.726],[0,0]],"o":[[0,0],[3.157,1.572],[0,0],[6.591,-2.37],[0,0],[-7.125,0.298]],"v":[[-130.593,-103.106],[-4.907,-47.572],[7.288,-48.528],[131.034,-103.255],[128.727,-112.274],[-127.875,-113.298]],"c":true}]}]},"nm":"Path 1","hd":false},{"ty":"fl","c":{"a":0,"k":[1,1,1,1]},"o":{"a":0,"k":100},"r":1,"bm":0,"nm":"Fill 1","hd":false},{"ty":"tr","p":{"a":0,"k":[0,0]},"a":{"a":0,"k":[0,0]},"s":{"a":0,"k":[100,100]},"r":{"a":0,"k":0},"o":{"a":0,"k":100},"sk":{"a":0,"k":0},"sa":{"a":0,"k":0},"nm":"Transform"}],"nm":"Group 1","bm":0,"hd":false},{"ty":"tr","p":{"a":0,"k":[256.219,176.641]},"a":{"a":0,"k":[0.219,-79.359]},"s":{"a":0,"k":[100,100]},"r":{"a":0,"k":0},"o":{"a":0,"k":100},"sk":{"a":0,"k":0},"sa":{"a":0,"k":0},"nm":"Transform"}],"nm":"Top","bm":0,"hd":false}],"ip":0,"op":180,"st":0,"bm":0}]}

‎public/assets/tgs/collectible_username.json‎

Lines changed: 1 addition & 0 deletions
Large diffs are not rendered by default.

‎src/components/chat/bubbles.ts‎

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -183,7 +183,8 @@ import flatten from '@helpers/array/flatten';
183183
import WebPageBox, {WebPageFooterButton} from '@components/wrappers/webPage';
184184
import {makeContactPhoneFormatter} from '@components/wrappers/formatUserPhone';
185185
import parseVcard, {isVcardPhoneType} from '@helpers/parseVcard';
186-
import showContactDetailsPopup, {copyFormattedPhone} from '@components/popups/contactDetails';
186+
import showContactDetailsPopup from '@components/popups/contactDetails';
187+
import {copyPhoneNumber} from '@helpers/copyContact';
187188
import showCreateContactPopup from '@components/popups/createContact';
188189
import wrapPeerColorPattern from '@components/wrappers/peerColorPattern';
189190
import showTooltip from '@components/tooltip';
@@ -11435,7 +11436,7 @@ export default class ChatBubbles {
1143511436
lastName: contact.last_name,
1143611437
phone
1143711438
});
11438-
const copyPhone = () => copyFormattedPhone(phoneText);
11439+
const copyPhone = () => copyPhoneNumber(phoneText);
1143911440

1144011441
// * The box itself shows the vCard when there is one, as tdesktop's does; otherwise it opens
1144111442
// * the chat, or copies the phone of someone who is not on Telegram

0 commit comments

Comments
 (0)