Skip to content

Commit

Permalink
render messageid as string
Browse files Browse the repository at this point in the history
  • Loading branch information
calellowitz committed Dec 15, 2024
1 parent 3446f98 commit 73d8476
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions messaging/serializers.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ class MessageSerializer(serializers.ModelSerializer):
ciphertext = serializers.SerializerMethodField()
tag = serializers.SerializerMethodField()
nonce = serializers.SerializerMethodField()
message_id = serializers.SerializerMethodField()

class Meta:
model = Message
Expand All @@ -52,3 +53,6 @@ def get_tag(self, obj):

def get_nonce(self, obj):
return obj.content["nonce"]

def get_message_id(self, obj):
return str(obj.message_id)

0 comments on commit 73d8476

Please sign in to comment.