Compare commits

...

5 commits

Author SHA1 Message Date
d3800584b5 Merge branch 'master' into feature/wallet-changes
# Conflicts:
#	README.md
#	apps/promotions/models.py
#	main/settings.py
2026-08-25 17:49:45 +03:30
5c10096a5f Merge pull request 'feat(notifications): accept optional click_url in notifications_push_user' (#5) from feature/notification-client-update into master
Reviewed-on: #5
2026-08-25 09:50:53 -04:00
059de2914d Merge pull request 'FEATURE(wallets): rename WALLET_RIAL/WALLET_REWARD and add WALLET_PROMOTION' (#4) from feature/wallet-refactor into master
Reviewed-on: #4
2026-08-25 09:50:35 -04:00
c7af6bb14b feat(notifications): accept optional click_url in notifications_push_user
Passes through to the notifications service, which embeds it as the
Gotify tap destination when set. Optional — no existing call site
changes, most notifications stay non-clickable.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-08-22 09:36:24 +03:30
92bea29816 FEATURE(wallets): rename WALLET_RIAL/WALLET_REWARD and add WALLET_PROMOTION
WALLET_RIAL -> WALLET_RIAL_DEPOSIT, WALLET_REWARD -> WALLET_USER_BILLBOARD_VISIT_INCOME
to match the naming used for the same wallet-service UUIDs in the advertising/settlement
repos. Also introduces WALLET_PROMOTION as this service's own pool and routes
Promotion.promote()'s payer_wallet through it instead of reusing the payee's
WALLET_REWARD value.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-08-19 14:50:42 +03:30
2 changed files with 6 additions and 3 deletions

View file

@ -391,8 +391,8 @@ WALLET_USER_BILLBOARD_VISIT_INCOME = config('WALLET_USER_BILLBOARD_VISIT_INCOME'
# wallet above. TODO(you): replace with the real wallet-type UUID from the wallet service.
WALLET_PROMOTIONS_TRANSIT = config('WALLET_PROMOTIONS_TRANSIT', cast=str)
# Same wallet-service UUID as the advertising repo's own WALLET_ADVERTISING_TRANSIT setting.
# Destination for promotion types that fund billboard/ad credit rather than a cash-like user
# reward (CAPTURE, FIRST_AD_CREATE) — see Recipient.get_wallet_category_uuid().
# Destination for a Recipient whose wallet_destination is advertising_transit — billboard/ad
# credit rather than a cash-like user reward — see Recipient.get_wallet_category_uuid().
WALLET_ADVERTISING_TRANSIT = config('WALLET_ADVERTISING_TRANSIT', cast=str)
NOTIFICATIONS_BASE_PUBLIC_URL = config('NOTIFICATIONS_BASE_PUBLIC_URL', default=None, cast=str)

View file

@ -75,7 +75,9 @@ def get_notifications_client():
return client
def notifications_push_user(user_uuid, title, message, priority=5, extras=None):
def notifications_push_user(user_uuid, title, message, priority=5, extras=None, click_url=None):
# click_url is optional — most notifications aren't clickable. When set,
# the notifications service embeds it as the tap destination.
class Tmp():
def to_dict(self):
return {
@ -83,6 +85,7 @@ def notifications_push_user(user_uuid, title, message, priority=5, extras=None):
'message': message,
'priority': priority,
'extras': extras,
'click_url': click_url,
}
push_data = Tmp()