Closed ruslandoga closed 2 years ago
mirroring getsince/test5#208:
- [ ] private profile pages: store, save (incl. dealing with blurred photos created locally on frontend), manage (return blurred to feed & real to matches) add private stories #571
- [ ] upgrade pushes
- [ ] maybe move existing contact labels & even ever shared contacts (?) to private pages (?)
- [ ] seen (profile, pages) data collection for future algorithmic add seen timings #567
- [ ] probably record likes to the above as well add seen timings #567
- [ ] track opening of clickable stickers track sticker click #573
- [ ] backend-generated stories: news + voting platform add news #575
From what I understand:
@akhrail1996 what needs to be done for 2 and 3? how pushes need to be upgraded? how contact stickers look like in json? I can turn text labels with contact info into contact stickers if I know the new contact sticker structure.
2) Push-notification for users trying to do no-longer supported actions (from #560) saying that these actions are deprecated and asking to upgrade the app. Rationale: even if we keep supporting them on backend, users with the newest app version won't receive them. Alternatively we can just "force upgrade" older versions (which will require updating the min_version_requirement on backend once new version becomes available).
3) Current dicts (Kind.Type is String enum).
var dict: [String: Any] = [
"position": [position.x, position.y],
"zoom": zoom,
"rotation": rotation,
"icon": icon.absoluteString
"text": text
"kind": kind.rawValue
]
switch kind {
case .phone, .email: ()
case .deeplink:
dict["deeplink"] = deeplink!.absoluteString
dict["default_url"] = defaultURL!.absoluteString
}
References: StoryLabelContact: https://github.com/getsince/test5/blob/pivot-to-tiktok-for-profiles/Since/Story/Models/StoryLabelContact.swift StoryLabel.toDict(): https://github.com/getsince/test5/blob/pivot-to-tiktok-for-profiles/Since/Story/Models/StoryLabel.swift#L177 How Contact sticker is opened (phone & email is not done yet): https://github.com/getsince/test5/blob/pivot-to-tiktok-for-profiles/Since/Feeds/FeedCoordinator.swift#L352 Deeplinks & default urls: https://github.com/getsince/test5/blob/pivot-to-tiktok-for-profiles/Since/StoryEdit/Views/Sticker%20Selection/Inputs/ContactInputVC.swift#L169
So an example would be:
{"icon": "https://d20pncrvwjzpw9.cloudfront.net/Telegram?d=3304cb2e968756dbace49c4d6f81c3d8",
"kind": "deeplink",
"text": "@gugugui",
"zoom": 1.4656478783421008,
"deeplink": "tg://resolve?domain=gugugui",
"position": [70.3593604062259, 213.23329034850553],
"rotation": -21.53808336101298,
"default_url": "https://t.me/gugugui"}
@akhrail1996 "icon" and "text" should be removed (there's already "value"
in other labels), why are there both "default_url" and "deeplink"? "kind" is too broad and doesn't seem to be necessary. Why not reuse sticker structures (question, answer, etc.)?
{
"question": "telegram",
"answer": "https://t.me/gugugui",
"value": "@gugugui",
"zoom": 1.47,
"position": [70.36, 213.23],
"rotation": -21.54
}
https://t.me/apple-app-site-association telegram supports universal links
agree 👍
icon
, default_url
and deeplink
were designed to support new contact-types in future, but I think this is not so important
- Push-notification for users trying to do no-longer supported actions (from https://github.com/getsince/test3/pull/560) saying that these actions are deprecated and asking to upgrade the app. Rationale: even if we keep supporting them on backend, users with the newest app version won't receive them.
We can release a new minor version of the app with support for backend-supplied error messages, if we do it now, I think many users would be on that version when the new major version comes out, and we'd be able to reply with descriptive error messages when they perform deprecated actions. I say no to both push notifications and force upgrade.
icon
,default_url
anddeeplink
were designed to support new contact-types in future, but I think this is not so important
what was the logic behind that design?
- Push-notification for users trying to do no-longer supported actions (from remove interactions #560) saying that these actions are deprecated and asking to upgrade the app. Rationale: even if we keep supporting them on backend, users with the newest app version won't receive them.
We can release a new minor version of the app with support for backend-supplied error messages, if we do it now, I think many users would be on that version when the new major version comes out, and we'd be able to reply with descriptive error messages when they perform deprecated actions. I say no to both push notifications and force upgrade.
Good idea. Let's do it. I can release this version today.
icon
,default_url
anddeeplink
were designed to support new contact-types in future, but I think this is not so importantwhat was the logic behind that design?
logic was that everything is fetched from backend => doesn't depend on locally saved icons for contacts, locally created deeplink paths for different contact-types, etc.
icons urls were always coming from backend but never stored there, they are rendered in the view layer. nothing media related should be stored in the app; as for kind = deeplink, did you want to be able to add new contact types without upgrading the app? so that even thought the current version doesn't know about tiktok deeplink, having the kind=deeplink and default_url=https://tiktok.com/asdfasdf set it would still be able to open it? this can be made possible with sticker-structure
icons urls were always coming from backend but never stored there
could you please send the link to code? cannot seem to find them
anything that's stored in the story is replaced by whatever Media.known_sticker_url(answer)
returns, which are these stickers: https://backend2.getsince.app/admin/stickers
@ruslandoga there are no icons ("question") there, only stickers ("answer")
by icons I mean these:
@akhrail1996 https://d20pncrvwjzpw9.cloudfront.net/Telegram?d=3304cb2e968756dbace49c4d6f81c3d8 this is a sticker, it's in icon
, so it's an icon?
did you want to be able to add new contact types without upgrading the app? so that even thought the current version doesn't know about tiktok deeplink, having the kind=deeplink and default_url=https://tiktok.com/asdfasdf set it would still be able to open it?
yes
this can be made possible with sticker-structure
great, how would you design it?
@akhrail1996 https://d20pncrvwjzpw9.cloudfront.net/Telegram?d=3304cb2e968756dbace49c4d6f81c3d8 this is a sticker
yes, this is a sticker that we no longer use. (but not an icon)
same way that the web works, https:// or http:// schema = link -> deeplink
http://example.com <- automatically is recognised as a link
yes, this is a sticker that we no longer use. (but not an icon)
so why are you bringing them up? or why is it called icon in your payload?
yes, this is a sticker that we no longer use. (but not an icon)
so why are you bringing them up?
I never brought up stickers, only icons. Icons are currently stored only locally and not returned from backend. Adding a new contact-type requires a new icon. If icons are stored locally then there is no way to add a new contact-type without upgrading the app. That was the logic behind original StoryLabelContact design (answering your question).
However this (adding new contact-type support) is not of great importance now. I think we can release this version without it. In future we will return all sticker categories (together with corresponding icons & answer options) from backend.
it is important right now since if you release a version with that structure it'd need to be supported and I'd need to change backend, which can be easily avoided with a bit of thought
@akhrail1996 "icon" and "text" should be removed (there's already
"value"
in other labels), why are there both "default_url" and "deeplink"? "kind" is too broad and doesn't seem to be necessary. Why not reuse sticker structures (question, answer, etc.)?{ "question": "telegram", "answer": "https://t.me/gugugui", "value": "@gugugui", "zoom": 1.47, "position": [70.36, 213.23], "rotation": -21.54 }
https://t.me/apple-app-site-association telegram supports universal links
I agreed to this structure earlier (so plan to release with it), or do you want to make some changes to it?
no, it's perfect since it doesn't add anything new
@akhrail1996 checked_profiles
table now contains profiles with has_text_contact? :: bool
column.
select count(*) from checked_profiles where "has_text_contact?"; -- 401
select count(*) from checked_profiles; -- 3020
select count(*) from profiles; -- 3020
select count(distinct from_user_id) from match_interactions where data ->> 'type' = 'contact_offer'; -- 379
select count(*) from (
select user_id from checked_profiles where "has_text_contact?"
union
select distinct from_user_id from match_interactions where data ->> 'type' = 'contact_offer'
) as c; -- 644
644 / 3020 = 21% is pretty good
I looked at the users active in Feb:
select count(*) from profiles where last_active > '2022-02-01 00:00:00'; -- 1103
SELECT
count(*)
FROM (
SELECT
*
FROM (
SELECT
user_id
FROM
checked_profiles
WHERE
"has_text_contact?"
UNION
SELECT DISTINCT
from_user_id
FROM
match_interactions
WHERE
data ->> 'type' = 'contact_offer') AS c) p
INNER JOIN LATERAL (
SELECT
user_id
FROM
profiles
WHERE
last_active > '2022-02-01 00:00:00'
AND user_id = p.user_id) pip ON TRUE; -- 503
so 503 / 1103 = 45% is even better
@ruslandoga do you need help in converting them to contact stickers? (the manual part)
@akhrail1996 no need, I'll write another tool to help with conversion. But I'll need your help on deciding what to do with text labels containing more than one contact. There are multiple "Пишите мне на тг/инст @durov" labels, and there's one user with three contacts in a single text label.
select count(*) from profiles where story is not null; -- 1987
select count(*) from profiles where story is not null and last_active > '2022-02-01 00:00:00'; -- 895
So it's more like 30% and 55%.
@akhrail1996 no need, I'll write another tool to help with conversion. But I'll need your help on deciding what to do with text labels containing more than one contact. There are multiple "Пишите мне на тг/инст @durov" labels, and there's one user with three contacts in a single text label.
I think we should keep the info fully, so 2 contacts -> 2 stickers, 3 contacts -> 3 stickers probably with a small zoom value, one below another
select count(*) from profiles where story is not null; -- 1987 select count(*) from profiles where story is not null and last_active > '2022-02-01 00:00:00'; -- 895
So it's more like 30% and 55%.
even better, meaning that we are indeed making something users already want
the numbers of null stories are very high, that's why new approach to onboarding is important as well imo
@akhrail1996 this seems to be done
mirroring https://github.com/getsince/test5/issues/208: