@@ -583,7 +583,7 @@ func (h *bountyHandler) CreateOrEditBounty(w http.ResponseWriter, r *http.Reques
583
583
}
584
584
585
585
if bounty .Assignee != "" {
586
- msg := fmt .Sprintf ("You have been assigned a new ticket: %s." , bounty .Title )
586
+ msg := fmt .Sprintf ("You have been assigned a new ticket: %s. https://community.sphinx.chat/bounty/%d " , bounty .Title , bounty . ID )
587
587
assigneePubkey := bounty .Assignee
588
588
if bounty .ID != 0 {
589
589
if existingBounty .Assignee != "" && existingBounty .Assignee == bounty .Assignee {
@@ -2108,6 +2108,28 @@ func (h *bountyHandler) AddProofOfWork(w http.ResponseWriter, r *http.Request) {
2108
2108
return
2109
2109
}
2110
2110
2111
+ bounties , err := h .db .GetBountyById (bountyID )
2112
+ if err != nil {
2113
+ w .WriteHeader (http .StatusBadRequest )
2114
+ logger .Log .Error ("[bounty] Error: %v" , err )
2115
+ } else {
2116
+ var bountyResponse []db.BountyResponse = h .GenerateBountyResponse (bounties )
2117
+
2118
+ ownerPubKey := bountyResponse [0 ].Owner .OwnerPubKey
2119
+ ownerAlias := bountyResponse [0 ].Owner .OwnerAlias
2120
+ ownerRouteHint := bountyResponse [0 ].Owner .OwnerRouteHint
2121
+ assineeAlias := bountyResponse [0 ].Assignee .OwnerAlias
2122
+ bountyTitle := bountyResponse [0 ].Bounty .Title
2123
+ bountyId := bountyResponse [0 ].Bounty .ID
2124
+
2125
+ msg := fmt .Sprintf ("%s has submitted PoW on Bounty https://community.sphinx.chat/bounty/%d. %s" , assineeAlias , bountyId , bountyTitle )
2126
+
2127
+ if ownerPubKey != "" {
2128
+ processNotification (ownerPubKey , "bounty_assigned" , msg , ownerAlias , ownerRouteHint )
2129
+ }
2130
+
2131
+ }
2132
+
2111
2133
w .WriteHeader (http .StatusCreated )
2112
2134
json .NewEncoder (w ).Encode (proof )
2113
2135
}
0 commit comments