Closed toplenboren closed 1 month ago
This method is created to support only advanced usecases with custom UI and custom Scopes logic. Integrations that do not require custom UI + custom Scopes logic (such as Telegram / Viber) would not require this logic.
For messengers (telegram/viber), you can use number of group members as number of recipients
Issues
0 New issues
0 Accepted issues
Measures
0 Security Hotspots
0.0% Coverage on New Code
0.0% Duplication on New Code
Issues
0 New issues
0 Accepted issues
Measures
0 Security Hotspots
0.0% Coverage on New Code
0.0% Duplication on New Code
Add recipients counter to cross-posting integrations
Context
Context: we want to add ability to check out number of recipients before you send cross-posted news item.
Solution
I've implemented custom query that allows our partners to give their users this data. This is not a final solution, as details and architecture may be changed, (thus it is Proof of work)
How it works
newsSharing
is outside of the scope of this PR)To do this they implement
POST
method calledcustomGetRecipientsCounters
(or whatever they want to call it) and put a url link to service that expose this API tonewsSharingConfig
Example url:
https://my-news-sharing-api/getNewsInfo
We expect that this method accepts this data:
Condo expects output in this format:
Note:
This method is created to support only advanced usecases with custom UI and custom Scopes logic. Integrations that do not require custom UI + custom Scopes logic (such as Telegram / Viber) would not require this logic.
More simple solution will be introduced later this year
Bonus
Sometimes you do not want
preview
to be shown, for example when your app does not have any preview (maybe internal system?)Sometimes you do not want to show preview for push messages. For example, if your app sends push messages ONLY for emergency news items
I've introduced a setting in
newsSharingConfig
that covers this usecase