Skip to content

Commit

Permalink
[cms] #651 - Generates a message for an event which contains affiliat…
Browse files Browse the repository at this point in the history
…ion and role update
  • Loading branch information
MauroVelasco committed Feb 12, 2021
1 parent da7c942 commit 06f9eaa
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions gui/muc_room_conversation_display_affiliations_roles.go
Expand Up @@ -20,3 +20,19 @@ func getDisplayForOccupantAffiliationRoleUpdate(affiliationRoleUpdate data.Affil

return message
}

func getDisplayForSelfOccupantAffiliationRoleUpdate(affiliationRoleUpdate data.AffiliationRoleUpdate) string {

This comment has been minimized.

Copy link
@olabiniV2

olabiniV2 Feb 19, 2021

Contributor

"Get" name...

This comment has been minimized.

Copy link
@azlancpool

azlancpool Mar 10, 2021

Contributor

This functionality was removed in df37e97

d := newSelfAffiliationUpdateDisplayData(data.AffiliationUpdate{

This comment has been minimized.

Copy link
@olabiniV2

olabiniV2 Feb 19, 2021

Contributor

In this case, I don't think it's necessary to use the field names to initialize the struct.

This comment has been minimized.

Copy link
@azlancpool

azlancpool Mar 10, 2021

Contributor

This functionality was removed in df37e97

Nickname: affiliationRoleUpdate.Nickname,
Reason: affiliationRoleUpdate.Reason,
New: affiliationRoleUpdate.NewAffiliation,
Previous: affiliationRoleUpdate.PreviousAffiliation,
Actor: affiliationRoleUpdate.Actor,
})

message := displayAffiliationUpdateMessage(d, i18n.Localf("and as a result the role changed from %s to %s",

This comment has been minimized.

Copy link
@olabiniV2

olabiniV2 Feb 19, 2021

Contributor

This way of putting together the messages will simply not work in an i18n situation where the sentence structure is different. I think you'll have to go back and think about this..

This comment has been minimized.

Copy link
@azlancpool

azlancpool Mar 10, 2021

Contributor

This functionality was removed in df37e97

displayNameForRole(affiliationRoleUpdate.PreviousRole),
displayNameForRole(affiliationRoleUpdate.NewRole)))

return message
}

0 comments on commit 06f9eaa

Please sign in to comment.